fkie-cad / RoAMer

Robust Automated Malware Unpacker
GNU Affero General Public License v3.0
84 stars 15 forks source link

Win filepath #29

Closed fishfacegit closed 1 year ago

fishfacegit commented 1 year ago

I currently try to make this unpacker work on a Ubuntu Host with Win10 Guest. It seems that pyinstaller has troubles with escaped paths '\', creating a Errno 22 on open(...) Therefore i changed most paths to os.path.join([...]), i think that's the proper way to do it.

UrmelAusDemEis commented 1 year ago

Hey! Thanks for the PR! However, I think that you can't use os.path.join() with a list. The strings you want to join have to be separate arguments. In most cases you added the star to unpack the list, however I think not in all cases :)

import os os.path.join(["path1", "path2"]) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/posixpath.py", line 76, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not list os.path.join("path1", "path2") 'path1/path2'

UrmelAusDemEis commented 1 year ago

I have made some cosmetic changes. Can you maybe test if it still works on your end? cries in no tests

fishfacegit commented 1 year ago

Hi Urmel, This is my first PR. Thank you for your help!

UrmelAusDemEis commented 1 year ago

Don't worry. If you have changes, that aren't commited yet, you can pull with --rebase

fishfacegit commented 1 year ago

Worked for me! image

fishfacegit commented 1 year ago

My setup was: i set up a docker container, inside docker i run a qemu instance of win10. Docker is basically the ubuntu host, and qemu the win10 sandbox/client.

UrmelAusDemEis commented 1 year ago

Awesome! Thank you for your contribution! :)