Skip to content

Commit

Permalink
Merge pull request #1929 from xclusivor/master
Browse files Browse the repository at this point in the history
Remove semicolons in python files
  • Loading branch information
wtdcode authored Mar 8, 2024
2 parents 24f898f + 4a694d8 commit d1da4de
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bindings/python/sample_x86.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def hook_code(uc, address, size, user_data):
def hook_code64(uc, address, size, user_data):
print(">>> Tracing instruction at 0x%x, instruction size = 0x%x" %(address, size))
rip = uc.reg_read(UC_X86_REG_RIP)
print(">>> RIP is 0x%x" %rip);
print(">>> RIP is 0x%x" %rip)


# callback for tracing invalid memory access (READ or WRITE)
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/shellcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def read_string(uc, address):
def hook_intr(uc, intno, user_data):
# only handle Linux syscall
if intno != 0x80:
print("got interrupt %x ???" %intno);
print("got interrupt %x ???" %intno)
uc.emu_stop()
return

Expand Down
2 changes: 1 addition & 1 deletion tests/regress/hang.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def hook_intr(uc, intno, user_data):
# only handle Linux syscall
rip = uc.reg_read(UC_X86_REG_RIP)
if intno != 0x80:
print("=== 0x%x: got interrupt %x, quit" %(rip, intno));
print("=== 0x%x: got interrupt %x, quit" %(rip, intno))
uc.emu_stop()
return

Expand Down
4 changes: 2 additions & 2 deletions tests/regress/hook_readonly_write_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def hook_mem_read(uc, access, address, size, value, data):
print("Reading at " + str(address))
uc.mem_write(address, CODE);
uc.mem_write(address, CODE)

class REP(regress.RegressTest):

Expand All @@ -21,7 +21,7 @@ def test_rep(self):

mu.mem_map(0, PAGE_SIZE)
mu.mem_write(0, CODE)
mu.mem_map(ACCESS_ADDR, PAGE_SIZE, UC_PROT_READ);
mu.mem_map(ACCESS_ADDR, PAGE_SIZE, UC_PROT_READ)
mu.hook_add(UC_HOOK_MEM_READ, hook_mem_read, begin = ACCESS_ADDR, end = ACCESS_ADDR + PAGE_SIZE)

mu.emu_start(0, len(CODE))
Expand Down
4 changes: 2 additions & 2 deletions tests/regress/jmp_ebx_hang.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def runTest(self):
# If EBX is zero then an exception is raised, as expected
mu.reg_write(unicorn.x86_const.UC_X86_REG_EBX, 0x0)

print(">>> jmp ebx (ebx = 0)");
print(">>> jmp ebx (ebx = 0)")
with self.assertRaises(UcError) as m:
mu.emu_start(CODE_ADDR, CODE_ADDR + 2, count=1)

self.assertEqual(m.exception.errno, UC_ERR_FETCH_UNMAPPED)

print(">>> jmp ebx (ebx = 0xaa96a47f)");
print(">>> jmp ebx (ebx = 0xaa96a47f)")
mu = unicorn.Uc(UC_ARCH_X86, UC_MODE_32)
mu.mem_map(CODE_ADDR, 1024 * 4)
# If we write this address to EBX then the emulator hangs on emu_start
Expand Down

0 comments on commit d1da4de

Please sign in to comment.