Skip to content
Permalink
Browse files

push

  • Loading branch information...
iGio90 committed Jul 5, 2019
0 parents commit 4ac48d8645a16db8dc9d1c525e0a2109a4f47f39
Showing with 37 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +8 −0 README.md
  3. +28 −0 plugin.py
@@ -0,0 +1 @@
__pycache__
@@ -0,0 +1,8 @@
### Installation

```
1) cd to Dwarf directory
2) create plugins folder if not existing
3) cd inside plugins folder and git clone
```
@@ -0,0 +1,28 @@
import r2pipe

from ui.widget_console import DwarfConsoleWidget


class R2Dwarf:
def __init__(self, dwarf, pid):
self.dwarf = dwarf
self.pipe = r2pipe.open("frida://attach/usb//%d" % pid)
self.console = DwarfConsoleWidget(dwarf._app_window, input_placeholder='r2', completer=False)
self.console.onCommandExecute.connect(self.on_r2_command)
self.dwarf._app_window.console.qtabs.addTab(self.console, 'r2')

def on_r2_command(self, cmd):
self.console.log(self.pipe.cmd(cmd), time_prefix=False)


r2 = None


def init(dwarf):
pass


def on_target_attached(dwarf, pid):
global r2

r2 = R2Dwarf(dwarf, pid)

0 comments on commit 4ac48d8

Please sign in to comment.
You can’t perform that action at this time.