-
Notifications
You must be signed in to change notification settings - Fork 755
feat: R2Qiling with refactored memory and de-flatten plugin #1244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chinggg
wants to merge
15
commits into
qilingframework:dev
Choose a base branch
from
chinggg:r2qiling
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0510096
feat(r2): CallStack and fuzzy backtrace hook
chinggg 287e5f6
feat(r2): interactive shell
chinggg 4f81f62
fix(r2): skip ill instruction in disassembler
chinggg c336675
test(mem): mmap2 syscall
chinggg d6b88b9
feat(r2): `oba` to load bininfo and update flags
chinggg e9c8631
feat(r2): new APIs enhancing fine-grained analysis
chinggg e310cb8
feat(r2): PoC of de-flatten plugin
chinggg b16e2c7
feat(r2): wrapper class R2Qiling and R2Mem
chinggg 5e33859
test(mem): remove assert_mem_equal, add option to use R2Qiling
chinggg 2de22d1
chore: add example source code for deflat
chinggg 7a1beb1
feat(r2): load symbols from file if possible
chinggg dd679e9
refactor(r2): add addr wrap and move wrap to utils
chinggg 580a758
refactor(r2): move R2Qiling and utils out of __init__.py
chinggg ab41d49
refactor(r2): improve shell and examples
chinggg a53790e
refactor(r2): assume compatibility with ql.mem
chinggg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(r2): add addr wrap and move wrap to utils
@wrap_arg_addr makes function accept name/R2Data as addr and return same func when args is empty rename: get_fcn_at -> get_fcn rename: get_bb_at -> get_bb
- Loading branch information
commit dd679e945368b4f11cb0b981d9e1e07cdc55eeb5
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from functools import wraps | ||
|
||
|
||
def wrap_aaa(fun): | ||
@wraps(fun) | ||
def wrapper(self, *args, **kwargs): | ||
if self.analyzed is False: | ||
self._cmd("aaa") | ||
self.analyzed = True | ||
return fun(self, *args, **kwargs) | ||
return wrapper | ||
|
||
def wrap_arg_addr(fun): | ||
@wraps(fun) | ||
def wrapper(self, *args, **kwargs): | ||
if not args: # just return same func if not args | ||
return fun(self, *args, **kwargs) | ||
# parse first argument to address | ||
target = args[0] | ||
if isinstance(target, int): # first arg is address | ||
addr = target | ||
elif isinstance(target, str): # first arg is name | ||
addr = self.where(args[0]) | ||
else: # isinstance(target, R2Data) | ||
addr = target.start_ea | ||
newargs = (addr,) + args[1:] | ||
return fun(self, *newargs, **kwargs) | ||
return wrapper |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.