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
GNU General Public License v3.0
49 stars 10 forks source link

`AttributeError` while creating `ELF` dataset #20

Closed smarbal closed 1 year ago

smarbal commented 1 year ago

When creating a dataset of ELF files packed with UPX, the following error occurs :

dataset -v make elf-upx-dataset -f ELF -a -p upx -n 40
<<a few files are successfully packed>>
15%|██████████████████▉                                                                                                           | 6/40 [00:01<00:06,  5.62executable/s]00:00:12.845 [DEBUG   ] dataset            - handling /sbin/runuser...
00:00:12.850 [DEBUG   ] upx                - upx '/home/user/.packing-box/datasets/elf-upx-dataset/files/870bd1760cb04f965eff8ffa5a76e6987b7aa5820a6664f76fc5a925472f0505'
00:00:12.896 [DEBUG   ] upx                - packed successfully
00:00:12.897 [DEBUG   ] dataset            - adding 870bd1760cb04f965eff8ffa5a76e6987b7aa5820a6664f76fc5a925472f0505...
00:00:12.900 [DEBUG   ] dataset            - handling /usr/bin/X11/pathchk...

Traceback (most recent call last):
  File "/home/user/.opt/tools/dataset", line 149, in <module>
    getattr(ds, args.command)(**vars(args))
  File "/home/user/.local/lib/python3.10/site-packages/pbox/common/utils.py", line 152, in _wrapper
    return f(s, *a, **kw)
  File "/home/user/.local/lib/python3.10/site-packages/pbox/common/dataset.py", line 428, in make
    dest = exe.copy(extension=True).absolute()
AttributeError: 'NoneType' object has no attribute 'absolute'
smarbal commented 1 year ago

Local repository was not up-to-date. Solved on the latest version.