Closed xwings closed 4 years ago
We had a chat in gitter and lets do some planning here.
level will be defined during
ql.dprint(0, "some msg %s %i" % (str1, int2))
so, i added verbose option, by default verbose is 0 and verbose only can use with
ql.output in (QL_OUT_DEBUG, QL_OUT_DUMP)
example, says we need to set verbose to 1
def stopatkillerswtich(ql):
print("killerswtch found")
ql.uc.emu_stop()
if __name__ == "__main__":
ql = Qiling(["rootfs/x86_windows/bin/wannacry.bin"], "rootfs/x86_windows", output = "debug", verbose = 1)
ql.hook_address(stopatkillerswtich, 0x40819a)
ql.run()
to read register
ql.reg.read("EAX")
or
ql.reg.read(UC_X86_REG_EAX)
or
eax = ql.reg.eax
to write register
ql.reg.write("EAX", 0xFF)
or
ql.reg.write(UC_X86_REG_EAX, 0xFF)
or
ql.reg.eax = 0xFF
issue #184
qiling (output, log_console, verbose) usage
output takes in 'default', 'disasm', 'debug', 'dump' log_console = True or False verbose takes in 1-99
output = 'default' means standard strace output output = 'disasm' means disasmble printout output = 'debug' means debug printout output = 'dump' mean debug + disasm print out
log_console = print nothing to console. but if log_dir is enabled. it will still write to log
verbose will only work with output = 'debug' or output = 'dump' depends on how many level of output we want
for documentation purposed, this is for @chfl4gs to build documentation
this is to record registry changes