diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | example/jitter/mips32.py | 2 | ||||
| -rw-r--r-- | example/jitter/sandbox_elf_aarch64l.py | 2 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_32.py | 2 | ||||
| -rw-r--r-- | example/jitter/sandbox_pe_x86_64.py | 2 | ||||
| -rw-r--r-- | example/jitter/test_x86_32_seh.py | 2 | ||||
| -rw-r--r-- | example/jitter/trace.py | 2 | ||||
| -rw-r--r-- | example/jitter/unpack_upx.py | 2 | ||||
| -rw-r--r-- | example/jitter/x86_32.py | 2 | ||||
| -rw-r--r-- | example/jitter/x86_64.py | 2 | ||||
| -rw-r--r-- | example/symbol_exec/dse_strategies.py | 5 | ||||
| -rw-r--r-- | miasm/analysis/sandbox.py | 2 | ||||
| -rw-r--r-- | miasm/jitter/jitload.py | 5 | ||||
| -rw-r--r-- | miasm/os_dep/linux/syscall.py | 2 | ||||
| -rw-r--r-- | test/arch/x86/qemu/testqemu.py | 2 | ||||
| -rw-r--r-- | test/arch/x86/qemu/testqemu64.py | 2 | ||||
| -rw-r--r-- | test/jitter/bad_block.py | 2 | ||||
| -rw-r--r-- | test/jitter/jit_options.py | 8 | ||||
| -rw-r--r-- | test/jitter/jitload.py | 4 | ||||
| -rw-r--r-- | test/jitter/jmp_out_mem.py | 2 | ||||
| -rw-r--r-- | test/os_dep/linux/test_env.py | 2 |
21 files changed, 28 insertions, 28 deletions
diff --git a/README.md b/README.md index b341f592..f322a790 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Create a sentinelle to catch the return of the shellcode: ```Python def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True diff --git a/example/jitter/mips32.py b/example/jitter/mips32.py index b84dc4e5..0e0c334e 100755 --- a/example/jitter/mips32.py +++ b/example/jitter/mips32.py @@ -31,7 +31,7 @@ parser.add_argument("addr", machine = Machine("mips32l") def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True diff --git a/example/jitter/sandbox_elf_aarch64l.py b/example/jitter/sandbox_elf_aarch64l.py index 7ad91118..e3daf53e 100644 --- a/example/jitter/sandbox_elf_aarch64l.py +++ b/example/jitter/sandbox_elf_aarch64l.py @@ -20,4 +20,4 @@ log_func.setLevel(logging.ERROR) # Run sb.run() -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) diff --git a/example/jitter/sandbox_pe_x86_32.py b/example/jitter/sandbox_pe_x86_32.py index de7af95d..934dd505 100644 --- a/example/jitter/sandbox_pe_x86_32.py +++ b/example/jitter/sandbox_pe_x86_32.py @@ -15,4 +15,4 @@ sb = Sandbox_Win_x86_32(loc_db, options.filename, options, globals()) # Run sb.run() -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) diff --git a/example/jitter/sandbox_pe_x86_64.py b/example/jitter/sandbox_pe_x86_64.py index a168c325..98426078 100644 --- a/example/jitter/sandbox_pe_x86_64.py +++ b/example/jitter/sandbox_pe_x86_64.py @@ -16,4 +16,4 @@ sb = Sandbox_Win_x86_64(loc_db, options.filename, options, globals()) # Run sb.run() -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) diff --git a/example/jitter/test_x86_32_seh.py b/example/jitter/test_x86_32_seh.py index e2c354a0..65a211e0 100644 --- a/example/jitter/test_x86_32_seh.py +++ b/example/jitter/test_x86_32_seh.py @@ -59,4 +59,4 @@ sb.jitter.add_breakpoint(win_api_x86_32_seh.return_from_exception, return_from_s # Run sb.run() -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) diff --git a/example/jitter/trace.py b/example/jitter/trace.py index 968626f4..92134f33 100644 --- a/example/jitter/trace.py +++ b/example/jitter/trace.py @@ -58,5 +58,5 @@ start_time = time.time() sb.run() stop_time = time.time() -assert sb.jitter.run is False +assert sb.jitter.running is False print("Instr speed: %02.f / sec" % (instr_count / (stop_time - start_time))) diff --git a/example/jitter/unpack_upx.py b/example/jitter/unpack_upx.py index 59f7389a..502d6844 100644 --- a/example/jitter/unpack_upx.py +++ b/example/jitter/unpack_upx.py @@ -84,7 +84,7 @@ def stop(jitter): logging.info('OEP reached') # Stop execution - jitter.run = False + jitter.running = False return False # Set callbacks diff --git a/example/jitter/x86_32.py b/example/jitter/x86_32.py index 427cd021..da9e375b 100644 --- a/example/jitter/x86_32.py +++ b/example/jitter/x86_32.py @@ -13,7 +13,7 @@ parser.add_argument("-j", "--jitter", args = parser.parse_args() def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True diff --git a/example/jitter/x86_64.py b/example/jitter/x86_64.py index 943f5624..e4147062 100644 --- a/example/jitter/x86_64.py +++ b/example/jitter/x86_64.py @@ -34,7 +34,7 @@ SYSCALL = { def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True diff --git a/example/symbol_exec/dse_strategies.py b/example/symbol_exec/dse_strategies.py index 933a51db..76b5be8c 100644 --- a/example/symbol_exec/dse_strategies.py +++ b/example/symbol_exec/dse_strategies.py @@ -64,7 +64,7 @@ jitter.push_uint32_t(0) # Handle return def code_sentinelle(jitter): - jitter.run = False + jitter.running = False return False ret_addr = 0x1337beef @@ -108,7 +108,7 @@ while todo: # Restore state, while keeping already found solutions dse.restore_snapshot(snapshot, keep_known_solutions=True) - # Reinit jitter (reset jitter.run, etc.) + # Reinit jitter (reset jitter.running, etc.) jitter.init_run(run_addr) # Set the argument value in the jitter context @@ -140,4 +140,3 @@ print( len(reaches) ) ) - diff --git a/miasm/analysis/sandbox.py b/miasm/analysis/sandbox.py index 542e31f9..e51fd45a 100644 --- a/miasm/analysis/sandbox.py +++ b/miasm/analysis/sandbox.py @@ -25,7 +25,7 @@ class Sandbox(object): @staticmethod def code_sentinelle(jitter): - jitter.run = False + jitter.running = False return False @classmethod diff --git a/miasm/jitter/jitload.py b/miasm/jitter/jitload.py index 34c4d157..d991d728 100644 --- a/miasm/jitter/jitload.py +++ b/miasm/jitter/jitload.py @@ -212,6 +212,7 @@ class Jitter(object): self.arch = lifter.arch self.attrib = lifter.attrib arch_name = lifter.arch.name # (lifter.arch.name, lifter.attrib) + self.running = False try: if arch_name == "x86": @@ -418,7 +419,7 @@ class Jitter(object): """ self.run_iterator = self.runiter_once(pc) self.pc = pc - self.run = True + self.running = True def continue_run(self, step=False, trace=False): """PRE: init_run. @@ -430,7 +431,7 @@ class Jitter(object): if trace: self.set_trace_log() - while self.run: + while self.running: try: return next(self.run_iterator) except StopIteration: diff --git a/miasm/os_dep/linux/syscall.py b/miasm/os_dep/linux/syscall.py index acebe2cb..32aaea83 100644 --- a/miasm/os_dep/linux/syscall.py +++ b/miasm/os_dep/linux/syscall.py @@ -291,7 +291,7 @@ def sys_generic_exit_group(jitter, linux_env): # Stub log.debug("Exit with status code %d", status) - jitter.run = False + jitter.running = False def sys_generic_read(jitter, linux_env): diff --git a/test/arch/x86/qemu/testqemu.py b/test/arch/x86/qemu/testqemu.py index 6a516ac3..4de3ccf5 100644 --- a/test/arch/x86/qemu/testqemu.py +++ b/test/arch/x86/qemu/testqemu.py @@ -141,4 +141,4 @@ sb.jitter.vm.add_memory_page(0x7fff0000 + 0x14, PAGE_READ | PAGE_WRITE, b"AAAA") # Run sb.run(addr) -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) diff --git a/test/arch/x86/qemu/testqemu64.py b/test/arch/x86/qemu/testqemu64.py index b17abe66..bb2f853a 100644 --- a/test/arch/x86/qemu/testqemu64.py +++ b/test/arch/x86/qemu/testqemu64.py @@ -137,4 +137,4 @@ sb.jitter.vm.add_memory_page(0x7fff0000 + 0x28, PAGE_READ | PAGE_WRITE, b"AAAAAA # Run sb.run(addr) -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) diff --git a/test/jitter/bad_block.py b/test/jitter/bad_block.py index e7484c9e..a1743847 100644 --- a/test/jitter/bad_block.py +++ b/test/jitter/bad_block.py @@ -5,7 +5,7 @@ from miasm.analysis.machine import Machine from miasm.core.locationdb import LocationDB def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True diff --git a/test/jitter/jit_options.py b/test/jitter/jit_options.py index f1258323..3b61cff8 100644 --- a/test/jitter/jit_options.py +++ b/test/jitter/jit_options.py @@ -25,7 +25,7 @@ run_addr = 0x40000000 loc_db = LocationDB() def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True @@ -50,7 +50,7 @@ myjit = init_jitter(loc_db) myjit.init_run(run_addr) myjit.continue_run() -assert myjit.run is False +assert myjit.running is False assert myjit.cpu.EAX == 0x0 ## Let's specify a max_exec_per_call @@ -74,7 +74,7 @@ myjit.init_run(run_addr) myjit.exec_cb = cb myjit.continue_run() -assert myjit.run is True +assert myjit.running is True # Use a '>=' because it's a 'max_...' assert myjit.cpu.EAX >= 0xA @@ -94,7 +94,7 @@ myjit.init_run(run_addr) myjit.exec_cb = cb myjit.continue_run() -assert myjit.run is False +assert myjit.running is False assert myjit.cpu.EAX == 0x00 ## main(2) + (loop_main(3))*(0x10) + loop_end(1) + 0x1337beef (1) assert counter == 52 diff --git a/test/jitter/jitload.py b/test/jitter/jitload.py index 7a72d1d5..d93414b9 100644 --- a/test/jitter/jitload.py +++ b/test/jitter/jitload.py @@ -21,7 +21,7 @@ myjit.vm.add_memory_page(run_addr, PAGE_READ | PAGE_WRITE, data) # Sentinelle called on terminate def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True @@ -33,7 +33,7 @@ myjit.init_run(run_addr) myjit.continue_run() # Check end -assert myjit.run is False +assert myjit.running is False # Check resulting state / accessors assert myjit.cpu.EAX == 0 diff --git a/test/jitter/jmp_out_mem.py b/test/jitter/jmp_out_mem.py index 3d01aacc..b4d4600b 100644 --- a/test/jitter/jmp_out_mem.py +++ b/test/jitter/jmp_out_mem.py @@ -6,7 +6,7 @@ from miasm.core.locationdb import LocationDB def code_sentinelle(jitter): - jitter.run = False + jitter.running = False jitter.pc = 0 return True diff --git a/test/os_dep/linux/test_env.py b/test/os_dep/linux/test_env.py index 5bf3d2a0..c9eb53dd 100644 --- a/test/os_dep/linux/test_env.py +++ b/test/os_dep/linux/test_env.py @@ -36,4 +36,4 @@ sb = sandbox(loc_db, options.filename, options, globals()) # Run sb.run() -assert(sb.jitter.run is False) +assert(sb.jitter.running is False) |