Skip to content

Commit 3a64cf9

Browse files
gitolegivg
authored andcommitted
Ida 7 integration + minor fixes (#37)
* minor fix to makel bap plugins woth with IDA 7 * few fixes to increase robustness
1 parent f1cdd95 commit 3a64cf9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ disassembly and decompilation views.
4545
BAP has the ability to tag a lot of possible attributes to
4646
instructions. These BIR attributes can be tagged automatically as
4747
comments in IDA, by running arbitrary plugins in BAP. Just hit
48-
`Ctrl+S`.
48+
`Shift+S`.
4949

5050
Here's an example of output for Saluki showing that a certain malloc
5151
is unchecked (pointing to a potential vulnerability).
@@ -68,7 +68,7 @@ to the attribute location by selecting it.
6868
### BAP Task Manager and Viewer
6969

7070
Every instance of BAP will have a corresponding view, that will
71-
accumulate all data written by BAP. The BAP Viewer (`Ctrl-Alt-F5`)
71+
accumulate all data written by BAP. The BAP Viewer (`Ctrl-Shift-F5`)
7272
provides an easy way to switch between multiple BAP Views.
7373

7474
Since you can run multiple instances of BAP asynchronously, it is

plugins/bap/plugins/bap_trace.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ def location(self):
402402
if self.level == 2:
403403
top = index_up(self.index, 1)
404404
location_id = self.incident.locations[top.row()]
405-
return self.model.locations[location_id]
405+
if self.model.locations is None:
406+
return None
407+
else:
408+
return self.model.locations.get(location_id)
406409

407410
@property
408411
def point(self):
@@ -523,7 +526,7 @@ def number_of_locations(msg):
523526

524527
@defmethod('row-count', level=1, column=0)
525528
def backtrace_length(msg):
526-
return len(msg.location)
529+
return 0 if msg.location is None else len(msg.location)
527530

528531

529532
class Incident(object):

plugins/plugin_loader_bap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def init(self):
2929
path = os.path.join(plugin_path, plugin)
3030
if not plugin.endswith('.py') or plugin.startswith('__'):
3131
continue # Skip non-plugins
32-
idc.Message('BAP> Loading {}\n'.format(plugin))
32+
idaapi.msg('BAP> Loading {}\n'.format(plugin))
3333
self.plugins.append(idaapi.load_plugin(path))
3434
return idaapi.PLUGIN_KEEP
3535

0 commit comments

Comments
 (0)