MCPcopy Create free account
hub / github.com/qilingframework/qiling / test_elf_partial_linux_x8664

Method test_elf_partial_linux_x8664

tests/test_elf.py:43–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 del ql
42
43 def test_elf_partial_linux_x8664(self):
44 snapshot_file = r'/tmp/snapshot.bin'
45
46 def dump(ql: Qiling, *args, **kw):
47 ql.save(reg=False, cpu_context=True, snapshot=snapshot_file)
48 ql.emu_stop()
49
50 ql = Qiling(["../examples/rootfs/x8664_linux/bin/sleep_hello"], "../examples/rootfs/x8664_linux", verbose=QL_VERBOSE.DEFAULT)
51 load_address = ql.profile.getint("OS64", "load_address")
52 ql.hook_address(dump, load_address + 0x1094)
53 ql.run()
54
55 ql = Qiling(["../examples/rootfs/x8664_linux/bin/sleep_hello"], "../examples/rootfs/x8664_linux", verbose=QL_VERBOSE.DEBUG)
56 load_address = ql.profile.getint("OS64", "load_address")
57 ql.restore(snapshot=snapshot_file)
58
59 begin_point = load_address + 0x109e
60 end_point = load_address + 0x10bc
61
62 ql.run(begin_point, end_point)
63
64 del ql
65
66 def test_elf_x_only_segment(self):
67 def stop(ql: Qiling):

Callers

nothing calls this directly

Calls 4

runMethod · 0.95
restoreMethod · 0.95
QilingClass · 0.90
hook_addressMethod · 0.80

Tested by

no test coverage detected