hashtopolis / server

Hashtopolis - distributed password cracking with Hashcat
GNU General Public License v3.0
1.42k stars 212 forks source link

[ENHANCEMENT]: Agent dies with exception FileNotFoundError: [Errno 2] No such file or directory: '7zr' #1052

Open tosiara opened 5 months ago

tosiara commented 5 months ago

Version Information

0.7.2

Hashcat

No response

Description

After upgrading the server from 0.12 to the latest master agent dies on start:

Successfully registered!
Collecting agent data...
Login successful!
Hashtopolis Server version: 0.14.2 (commit f4fc2b1)
Client is up-to-date!
File download header reported wrong status code: 404
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/root/hashtopolis.zip/__main__.py", line 377, in <module>
  File "/root/hashtopolis.zip/__main__.py", line 167, in init
  File "/root/hashtopolis.zip/htpclient/binarydownload.py", line 23, in run
  File "/root/hashtopolis.zip/htpclient/binarydownload.py", line 81, in __check_utils
FileNotFoundError: [Errno 2] No such file or directory: '7zr'

7zr is available:

$ which 7zr 
/usr/bin/7zr

But for some reason the agent tries to download it from the server, and the server responds 404:

hashtopolis-backend     | 192.168.0.72 - - [24/Mar/2024:18:18:14 +0000] 
"HEAD /hashtopolis/static/7zr.bin HTTP/1.1" 404 196 "-" "s3-python-0.7.2.4"

I noticed that it looks for /hashtopolis/static/7zr.bin, and its the old path. The upgraded version has been deployed to the root and is being accessed as http://server:8081

Don't know how to proceed. Is it an issue in the migration because of changed path, or is it an agent's code's issue. And why does it need to download that binary if 7zr is available on the system?

tosiara commented 5 months ago

Changing Base url for the webpage resolves the issue. Changing this to feature request to avoid downloading 7z if it is available on the system