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

ERROR: using detector (With possible Fix) #87

Closed jramhani closed 11 months ago

jramhani commented 11 months ago
00:00:01.423 [INFO] Superdetector: DIE, PEiD, PyPackerDetect, RetDec
00:00:02.314 [ERROR] name 'BasePath' is not defined
00:00:00.377 [ERROR   ] superdetector      - name 'BasePath' is not defined
Traceback (most recent call last):
  File "/home/user/.opt/tools/detector", line 60, in <module>
    for out in Detector.detect(args.executable, **kw):
  File "/home/user/.local/lib/python3.11/site-packages/pbox/helpers/files.py", line 184, in _wrapper
    kwargs['label'] = l.get(BasePath(exe).stem, NOT_LABELLED)
                            ^^^^^^^^
NameError: name 'BasePath' is not defined

Potential fix (idk if correct)

Edited docker-packing-box/src/lib/src/pbox/helpers/files.py (BasePath in not exported in the tinyscript lib)

from tinyscript.helpers import is_file, is_folder, is_hash, set_exception,Path, TempPath
from tinyscript.helpers import Path as BasePath

from .utils import pd

__all__ = ["data_to_temp_file", "edit_file", "figure_path", "file_or_folder_or_dataset", "find_files_in_folder",
           "Locator", "Path", "BasePath"]