qiling
qiling copied to clipboard
add_fs_mapper for directories on host
Hi,
add_fs_mapper only allows you to map specific files to specific files on the host, e.g. add_fs_mapper("/tmp/file1", "/tmp/file1") will map uses of /tmp/file1 in the emulated environment to /tmp/file1 on the host.
Quite often I need to map a directory (such as /tmp) from the host to the emulated environment. The emulated code will then create files in /tmp which I want to analyze later (by reading them from my host /tmp directory). Unfortunately this isn't possible by using add_fs_mapper.
Allowing add_fs_mapper to map directories would save a lot of time in this case
Thank you
Thanks for the enhancement idea.
fs_mapper could be used also to map objects or classes, maybe this method could be used to work around the gap you identify. That said, why not just create a tmp directory in your rootfs? It will stay there after the emulation finishes.
Ah yes I tried adding tmp to the rootfs and it worked exactly how I wanted it to. Thanks for the tip!