about summary refs log tree commit diff stats
path: root/miasm/jitter/loader/pe.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2024-01-07 22:48:37 +0100
committerGitHub <noreply@github.com>2024-01-07 22:48:37 +0100
commit3a2fb2472c0e8e01f84ed29be29a929775ed07ab (patch)
tree17718031046a1e912072db057993b478aa0ce06e /miasm/jitter/loader/pe.py
parente9dee4eb5e8b8dc0b81e22598b754c8df29f1674 (diff)
parent2bf07ad1eb835e12b4b3dbaf42f71adf888a8cc1 (diff)
downloadfocaccia-miasm-3a2fb2472c0e8e01f84ed29be29a929775ed07ab.tar.gz
focaccia-miasm-3a2fb2472c0e8e01f84ed29be29a929775ed07ab.zip
Merge pull request #1464 from mrexodia/python312
Python 3.12 support
Diffstat (limited to 'miasm/jitter/loader/pe.py')
-rw-r--r--miasm/jitter/loader/pe.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/miasm/jitter/loader/pe.py b/miasm/jitter/loader/pe.py
index c988fc59..9af068e4 100644
--- a/miasm/jitter/loader/pe.py
+++ b/miasm/jitter/loader/pe.py
@@ -23,12 +23,12 @@ log.setLevel(logging.INFO)
 
 def get_pe_dependencies(pe_obj):
     """Collect the shared libraries upon which this PE depends.
-    
+
     @pe_obj: pe object
     Returns a set of strings of DLL names.
-    
+
     Example:
-    
+
         pe = miasm.analysis.binary.Container.from_string(buf)
         deps = miasm.jitter.loader.pe.get_pe_dependencies(pe.executable)
         assert sorted(deps)[0] == 'api-ms-win-core-appcompat-l1-1-0.dll'
@@ -63,12 +63,12 @@ def get_import_address_pe(e):
     """Compute the addresses of imported symbols.
     @e: pe object
     Returns a dict mapping from tuple (dll name string, symbol name string) to set of virtual addresses.
-    
+
     Example:
-    
+
         pe = miasm.analysis.binary.Container.from_string(buf)
         imports = miasm.jitter.loader.pe.get_import_address_pe(pe.executable)
-        assert imports[('api-ms-win-core-rtlsupport-l1-1-0.dll', 'RtlCaptureStackBackTrace')] == {0x6b88a6d0}    
+        assert imports[('api-ms-win-core-rtlsupport-l1-1-0.dll', 'RtlCaptureStackBackTrace')] == {0x6b88a6d0}
     """
     import2addr = defaultdict(set)
     if e.DirImport.impdesc is None:
@@ -732,7 +732,7 @@ class ImpRecStateMachine(object):
             "entry_module_addr": func_addr,
             "entry_memory_addr": self.cur_address,
         }
-        
+
     def transition(self, data):
         if self.state == self.STATE_SEARCH:
             if data in self.func_addrs:
@@ -760,7 +760,7 @@ class ImpRecStateMachine(object):
             self.transition(data)
         else:
             raise ValueError()
-        
+
     def run(self):
         while True:
             data, address = yield
@@ -804,7 +804,7 @@ class ImpRecStrategy(object):
         @update_libs: if set (default), update `libs` object with founded addresses
         @align_hypothesis: if not set (default), do not consider import
             addresses are written on aligned addresses
-        
+
         Return the list of candidates
         """
         candidates = []