Skip to content

Commit

Permalink
Fix Python 3 samples (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay authored and aquynh committed May 15, 2017
1 parent 014ccfb commit 85e0a54
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bindings/python/sample_arm64.py
Expand Up @@ -53,7 +53,7 @@ def test_arm64():

# now print out some registers
print(">>> Emulation done. Below is the CPU context")
print(">>> As little endian, X15 should be 0x78:");
print(">>> As little endian, X15 should be 0x78:")

x11 = mu.reg_read(UC_ARM64_REG_X11)
x13 = mu.reg_read(UC_ARM64_REG_X13)
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/sample_arm64eb.py
Expand Up @@ -54,7 +54,7 @@ def test_arm64():

# now print out some registers
print(">>> Emulation done. Below is the CPU context")
print(">>> As big endian, X15 should be 0x12:");
print(">>> As big endian, X15 should be 0x12:")

x11 = mu.reg_read(UC_ARM64_REG_X11)
x13 = mu.reg_read(UC_ARM64_REG_X13)
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/sample_x86.py
Expand Up @@ -431,7 +431,7 @@ def test_i386_inout():
def test_i386_context_save():
print("Save/restore CPU context in opaque blob")
address = 0
code = '\x40' # inc eax
code = b'\x40' # inc eax
try:
# Initialize emulator
mu = Uc(UC_ARCH_X86, UC_MODE_32)
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/shellcode.py
Expand Up @@ -10,7 +10,7 @@

X86_CODE32_SELF = b"\xeb\x1c\x5a\x89\xd6\x8b\x02\x66\x3d\xca\x7d\x75\x06\x66\x05\x03\x03\x89\x02\xfe\xc2\x3d\x41\x41\x41\x41\x75\xe9\xff\xe6\xe8\xdf\xff\xff\xff\x31\xd2\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xca\x7d\x41\x41\x41\x41\x41\x41\x41\x41"

X86_CODE64 = "\x48\x31\xff\x57\x57\x5e\x5a\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xef\x08\x57\x54\x5f\x6a\x3b\x58\x0f\x05"
X86_CODE64 = b"\x48\x31\xff\x57\x57\x5e\x5a\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xef\x08\x57\x54\x5f\x6a\x3b\x58\x0f\x05"

# memory address where emulation starts
ADDRESS = 0x1000000
Expand Down

0 comments on commit 85e0a54

Please sign in to comment.