Skip to content

Commit 77947fc

Browse files
authored
updates to BAP.2.0 cmdline interface (#42)
* updates to BAP.2.0 cmdline interface Bap.2.0 has a new cmdline interface, and this PR makes `bap-ida-python` even with it * fixes readme
1 parent 2bd0cde commit 77947fc

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,20 @@ run:
111111
```
112112
opam install bap-ida-python
113113
```
114+
After the installation you'll see few commands that you need to run, e.g.:
115+
```
116+
=> In order to install bap-ida-python plugin:
117+
rm -rf $IDA_PATH/plugins/bap/
118+
cp $(opam config var prefix)/share/bap-ida-python/plugin_loader_bap.py $IDA_PATH/plugins/
119+
cp -r $(opam config var prefix)/share/bap-ida-python/bap $IDA_PATH/plugins/
120+
cp $(opam config var prefix)/share/bap-ida-python/bap.cfg $IDA_PATH/cfg/
121+
...
122+
```
123+
where `IDA_PATH` denotes the root of IDA Pro installation.
124+
125+
You need to run all the commands manually because of the sandboxing enabled in
126+
modern versions of opam, that doesn't allow to install files outside
127+
the opam directory.
114128

115129
Debugging
116130
---------

plugins/bap/utils/run.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def __init__(self, bap, input_file):
7070
if self.DEBUG:
7171
self.env['BAP_DEBUG'] = 'yes'
7272
if not Bap.plugins:
73-
with os.popen(bap + ' --list-plugins') as out:
74-
Bap.plugins = [e.split()[1] for e in out]
73+
with os.popen(bap + ' list plugins') as out:
74+
Bap.plugins = [e.split()[0] for e in out]
7575

7676
def run(self):
7777
"starts BAP process"
@@ -201,8 +201,6 @@ def _setup_symbols(self):
201201
ida.output_symbols(out)
202202
self.args += [
203203
"--read-symbols-from", out.name,
204-
"--symbolizer=file",
205-
"--rooter=file"
206204
]
207205

208206
def _setup_headers(self, bap):

tests/test_run.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def test_run_without_args(bapida):
2424
assert args[0] == backend.path
2525
assert '--no-ida' in args
2626
assert '--read-symbols-from' in args
27-
assert '--symbolizer=file' in args
2827

2928

3029
def test_disable_symbols(bapida):
@@ -38,7 +37,6 @@ def test_disable_symbols(bapida):
3837
assert args[0] == backend.path
3938
assert '--no-ida' in args
4039
assert '--read-symbols-from' not in args
41-
assert '--symbolizer=file' not in args
4240

4341

4442
def test_event_handlers(bapida):

0 commit comments

Comments
 (0)