aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--SystemCalls.py25
m---------miasm0
3 files changed, 16 insertions, 12 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..dfe4df9
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "miasm"]
+ path = miasm
+ url = https://github.com/cea-sec/miasm.git
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
diff --git a/miasm b/miasm
new file mode 160000
+Subproject 6f43586f6e4e8314861b2ddadaba452b829be4c