QoL changes

This commit is contained in:
2024-12-07 15:57:51 +08:00
parent 9ec1f604dc
commit 9750d6e2fc
3 changed files with 6 additions and 4 deletions

View File

@@ -12,9 +12,9 @@ from unicorn.x86_const import *
# rdx would never be set to 0xbabe unless we set zf to 1
CODE = (
b"\x48\x31\xc0" # xor rax, rax
b"\x48\xb8\x04\x00\x00\x00\x00\x00\x00\x00" # movabs rax, 0x4
b"\x48\x3d\x05\x00\x00\x00" # cmp rax, 0x5 <-- never true, zf is cleared
b"\x74\x05" # je 0x1a
b"\x48\xb8\x04\x00\x00\x00\x00\x00\x00\x00" # 03: movabs rax, 0x4
b"\x48\x3d\x05\x00\x00\x00" # 0d: cmp rax, 0x5 <-- never true, zf is cleared
b"\x74\x05" # 13: je 0x1a
b"\xe9\x0f\x00\x00\x00" # jmp 0x29
b"\x48\xba\xbe\xba\x00\x00\x00\x00\x00\x00" # 1a: movabs rdx, 0xbabe <-- never reached unless we set zf
b"\xe9\x0f\x00\x00\x00" # jmp 0x38

View File

@@ -29,7 +29,7 @@ def __setup_logger(name):
logger = __setup_logger('UnicornRegress')
logger.setLevel(logging.INFO)
logger.setLevel(os.environ.get("UNICORN_DEBUG", "INFO").upper())
def main():