mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
22 lines
537 B
Python
22 lines
537 B
Python
#!/usr/bin/env python3
|
|
#
|
|
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
|
|
#
|
|
|
|
import sys
|
|
sys.path.append("..")
|
|
|
|
from qiling import Qiling
|
|
from qiling.os.const import STRING
|
|
from qiling.const import QL_VERBOSE
|
|
|
|
def my_puts(ql: Qiling):
|
|
params = ql.os.resolve_fcall_params({'s': STRING})
|
|
|
|
print(f'puts("{params["s"]}")')
|
|
|
|
if __name__ == "__main__":
|
|
ql = Qiling(["rootfs/mips32_linux/bin/mips32_hello"], "rootfs/mips32_linux", verbose=QL_VERBOSE.DEBUG)
|
|
ql.os.set_api("puts", my_puts)
|
|
ql.run()
|