Skip to content

Commit

Permalink
feat(r2): interactive shell
Browse files Browse the repository at this point in the history
  • Loading branch information
chinggg committed Sep 2, 2022
1 parent a77adac commit 023c3a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions qiling/extensions/r2/r2.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,5 +336,14 @@ def enable_trace(self, mode='full'):
elif mode == 'history':
trace.enable_history_trace(self.ql)

def shell(self):
while True:
offset = self._r2c.contents.offset
print(f"[{offset:#x}]> ", end="")
cmd = input()
if cmd.strip() == "q":
break
print(self._cmd(cmd))

def __del__(self):
libr.r_core.r_core_free(self._r2c)

0 comments on commit 023c3a3

Please sign in to comment.