Replies: 1 comment 6 replies
-
Yeah, of course you can run arbitrary functions without running main() in the target binary. I called this partial emulation, and have used it many times. Here is a related issue: #593. The following is an example of how to run arbitrary functions I did. def partial_emulation():
def partial_run(ql):
# set up context for function calls
# ...
ql.arch.regs.arch_pc = 0x4508A0 # hijack control flow to target function
ql = Qiling([bin_path], rootfs, console=True, verbose=QL_VERBOSE.DEBUG)
ql.hook_address(partial_run, 0x455240) # hook at the first instruction in main()
ql.run() |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an elf linux mipsel uClibc and I'm running on linux x86_64.
How can I find the addresses of functions at runtime? As with dlsym. I can't find an example.
Can I call a function with arguments, without run main?
I tried this example but doesn't work. At 0x00476163 there is the function which I want run. It want 2 arguments, but with stack_push I got always the same situation, as if I didn't pass the arguments on to it.
Beta Was this translation helpful? Give feedback.
All reactions