diff options
author | n0p <0x90@n0p.cc> | 2018-03-10 00:56:20 +0100 |
---|---|---|
committer | n0p <0x90@n0p.cc> | 2018-03-10 00:56:20 +0100 |
commit | 474a8d0100873376b0bca77ecdcd0d12bb1002d8 (patch) | |
tree | 909120234cfe68bb272e4872cb34d7e9ff696076 /SystemCalls.py | |
parent | ce63c6edf4c54e317ce5de1bca972151c465b728 (diff) | |
download | idaSystemCalls-474a8d0100873376b0bca77ecdcd0d12bb1002d8.tar.gz idaSystemCalls-474a8d0100873376b0bca77ecdcd0d12bb1002d8.zip |
Added miasm as submodule and adjusted SystemCalls.py to this miasm version.
Diffstat (limited to 'SystemCalls.py')
-rw-r--r-- | SystemCalls.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/SystemCalls.py b/SystemCalls.py index 6f4a0c7..7b007f9 100644 --- a/SystemCalls.py +++ b/SystemCalls.py @@ -9,25 +9,26 @@ by n0p """ -try: - from miasm2.core.bin_stream_ida import bin_stream_ida - from miasm2.analysis.depgraph import DependencyGraph - - from utils import guess_machine -except: - guess_machine = None - import idaapi -import idc import ida_idaapi import ida_bytes import ida_gdl import ida_idp import ida_search import ida_segment +import idautils +import idc import time +try: + from miasm2.core.bin_stream_ida import bin_stream_ida + from miasm2.analysis.depgraph import DependencyGraph + + from utils import guess_machine +except: + guess_machine = None + from SystemCalls_constants import * @@ -194,7 +195,7 @@ class SystemCall(): self.ir_arch = self.ira(self.mdis.symbol_pool) # Populate symbols with ida names - for ad, name in Names(): + for ad, name in idautils.Names(): if name is None: continue self.mdis.symbol_pool.add_label(name, ad) @@ -277,8 +278,8 @@ class SystemCall(): cur_bloc = list(self.ir_arch.getby_offset(addr))[0] cur_label = cur_bloc.label - for line_nb, l in enumerate(cur_bloc.lines): - if l.offset == addr: + for line_nb, l in enumerate(cur_bloc): + if l.instr.offset == addr: break # Get dependency graphs |