packing-box / docker-packing-box

Docker image gathering packers and tools for making datasets of packed executables and training machine learning models for packing detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`KeyError` on `packer upx /path/to/file.exe`

rjzak opened this issue · comments

I ran docker system prune -a to make sure everything would be pristine. I updated to the latest commit, c88a26e, and rebuilt.

┌──[user@packing-box]──[/mnt/share]────────
$ packer --help
Traceback (most recent call last):
  File "/home/user/.opt/tools/packer", line 24, in <module>
    parser.add_argument("-A", "--alteration", choices=Alterations.names(), action="extend", nargs="*",
                                                      ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/pbox/common/alterations/__init__.py", line 114, in names
    l.extend(list(Alterations.registry[c].keys()))
                  ~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 'ELF32'

──[user@packing-box]──[/mnt/share]────────                                                                                                                                                                      ────[172.17.0.2]──[19:52:41]────
$ packer upx hello.x86.exe --prefix "upx_"
Traceback (most recent call last):
  File "/home/user/.opt/tools/packer", line 24, in <module>
    parser.add_argument("-A", "--alteration", choices=Alterations.names(), action="extend", nargs="*",
                                                      ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/pbox/common/alterations/__init__.py", line 114, in names
    l.extend(list(Alterations.registry[c].keys()))
                  ~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 'ELF32'
commented

Hi @rjzak !
Thank you for mentioning this and sorry for the long response delay.
This should have been fixed in the meantime with the latest improvements.
Can you retest and give me feedback, please ?

Sorry... I haven't forgotten but haven't had a chance to try again.

commented

No worry ! Since then, I made significant changes anyway that should have fixed the issue. However, I figured out yesterday evening that there is another bug that makes execution of the daraset tool.