qilingframework / qiling

A True Instrumentable Binary Emulation Framework
https://qiling.io
GNU General Public License v2.0
5.12k stars 743 forks source link

Unable to emulate bin/RegDemo.exe #1502

Open chintanhshah opened 5 days ago

chintanhshah commented 5 days ago

*Describe the bug Trying to emulate the example binary bin/RegDemo.exe with qiling . Unable to emulate and Unicorn throws an error. All DLLs have been provided in the rootfs/x86_windows/Windows using dllscollector batch script Sample Code

from qiling import *
from qiling.const import QL_VERBOSE
import sys
sys.path.append("..")

# sandbox to emulate the EXE
def my_sandbox(path, rootfs):
    # setup Qiling engine
    ql = Qiling(path,rootfs)
    # now emulate the EXE
    ql.run()

if __name__ == "__main__":
    # execute Windows EXE under our rootfs
    my_sandbox(["qiling/examples/rootfs/x86_windows/bin/RegDemo.exe"],"qiling/examples/rootfs/x86_windows")

Expected behavior Binary should be emulated correctly.

Screenshots image

Additional context Let me know if there is anything else I need to setup to be able to emulate correctly.

wtdcode commented 5 days ago

please use pip install unicorn==2.0.1 at this moment.

chintanhshah commented 4 days ago

Hi @wtdcode , Thanks that has worked for now..