about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDuncan Ogilvie <mr.exodia.tpodt@gmail.com>2024-01-06 18:36:38 +0100
committerDuncan Ogilvie <mr.exodia.tpodt@gmail.com>2024-01-06 18:37:15 +0100
commitf2335970fea3670c261c162e65e72ebef2a4de2e (patch)
tree38caaaa8b45693e178ea4560191203319f92765e
parent0d031c8a558a70664b7ce1e7f580472cff73c2b8 (diff)
downloadfocaccia-miasm-f2335970fea3670c261c162e65e72ebef2a4de2e.tar.gz
focaccia-miasm-f2335970fea3670c261c162e65e72ebef2a4de2e.zip
Remove trailing whitespace
-rw-r--r--example/jitter/unpack_generic.py2
-rw-r--r--miasm/arch/aarch64/sem.py10
-rw-r--r--miasm/expression/simplifications_common.py6
-rw-r--r--miasm/jitter/loader/pe.py18
-rw-r--r--miasm/os_dep/win_api_x86_32.py4
5 files changed, 20 insertions, 20 deletions
diff --git a/example/jitter/unpack_generic.py b/example/jitter/unpack_generic.py
index 3329d2a9..e389a4b5 100644
--- a/example/jitter/unpack_generic.py
+++ b/example/jitter/unpack_generic.py
@@ -35,7 +35,7 @@ def stop(jitter):
 if options.oep:
     # Set callbacks
     sb.jitter.add_breakpoint(int(options.oep, 0), stop)
-    
+
 # Run until an error is encountered - IT IS UNLIKELY THE ORIGINAL ENTRY POINT
 try:
     sb.run()
diff --git a/miasm/arch/aarch64/sem.py b/miasm/arch/aarch64/sem.py
index 8cbab90b..eaa01228 100644
--- a/miasm/arch/aarch64/sem.py
+++ b/miasm/arch/aarch64/sem.py
@@ -179,7 +179,7 @@ system_regs = {
 
     (3, 0, 2, 3, 0): APGAKeyLo_EL1,
     (3, 0, 2, 3, 1): APGAKeyHi_EL1,
-    
+
     (3, 0, 4, 1, 0): SP_EL0,
     (3, 0, 4, 6, 0): ICC_PMR_EL1, # Alias ICV_PMR_EL1
 
@@ -285,7 +285,7 @@ system_regs = {
     (3, 0, 0, 0, 1): CTR_EL0,
 
     (3, 3, 0, 0, 7): DCZID_EL0,
-    
+
     (3, 3, 4, 4, 0): FPCR,
     (3, 3, 4, 4, 1): FPSR,
 
@@ -1578,13 +1578,13 @@ def msr(ir, instr, arg1, arg2, arg3, arg4, arg5, arg6):
         e.append(ExprAssign(zf, arg6[30:31]))
         e.append(ExprAssign(cf, arg6[29:30]))
         e.append(ExprAssign(of, arg6[28:29]))
-    
+
     elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(7):
         e.append(ExprAssign(tco, arg6[25:26]))
 
     elif arg1.is_int(3) and arg2.is_int(3) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(0):
         e.append(ExprAssign(dit, arg6[24:25]))
-    
+
     elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(4):
         e.append(ExprAssign(uao, arg6[23:24]))
 
@@ -1599,7 +1599,7 @@ def msr(ir, instr, arg1, arg2, arg3, arg4, arg5, arg6):
         e.append(ExprAssign(af, arg6[8:9]))
         e.append(ExprAssign(iff, arg6[7:8]))
         e.append(ExprAssign(ff, arg6[6:7]))
-    
+
     elif arg1.is_int(3) and arg2.is_int(0) and arg3.is_id("c4") and arg4.is_id("c2") and arg5.is_int(2):
         e.append(ExprAssign(cur_el, arg6[2:4]))
 
diff --git a/miasm/expression/simplifications_common.py b/miasm/expression/simplifications_common.py
index 835f8723..a1dce84e 100644
--- a/miasm/expression/simplifications_common.py
+++ b/miasm/expression/simplifications_common.py
@@ -1146,7 +1146,7 @@ def simp_cmp_bijective_op(expr_simp, expr):
     # a + b + c == a + b
     if not args_b:
         return ExprOp(TOK_EQUAL, ExprOp(op, *args_a), ExprInt(0, args_a[0].size))
-    
+
     arg_a = ExprOp(op, *args_a)
     arg_b = ExprOp(op, *args_b)
     return ExprOp(TOK_EQUAL, arg_a, arg_b)
@@ -1782,7 +1782,7 @@ def simp_bcdadd_cf(_, expr):
     for i in range(0,16,4):
         nib_1 = (arg1.arg >> i) & (0xF)
         nib_2 = (arg2.arg >> i) & (0xF)
-        
+
         j = (carry + nib_1 + nib_2)
         if (j >= 10):
             carry = 1
@@ -1807,7 +1807,7 @@ def simp_bcdadd(_, expr):
     for i in range(0,16,4):
         nib_1 = (arg1.arg >> i) & (0xF)
         nib_2 = (arg2.arg >> i) & (0xF)
-        
+
         j = (carry + nib_1 + nib_2)
         if (j >= 10):
             carry = 1
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 = []
diff --git a/miasm/os_dep/win_api_x86_32.py b/miasm/os_dep/win_api_x86_32.py
index e9c5fd4a..b60ff879 100644
--- a/miasm/os_dep/win_api_x86_32.py
+++ b/miasm/os_dep/win_api_x86_32.py
@@ -2452,7 +2452,7 @@ def user32_GetKeyboardType(jitter):
 
     jitter.func_ret_stdcall(ret_ad, ret)
 
-    
+
 class startupinfo(object):
     """
         typedef struct _STARTUPINFOA {
@@ -2528,7 +2528,7 @@ def kernel32_GetStartupInfo(jitter, funcname, set_str):
 
         Retrieves the contents of the STARTUPINFO structure that was specified
         when the calling process was created.
-        
+
         https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getstartupinfow
 
     """