Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tosiara opened this issue Mar 24, 2024 · 1 comment
Labels
agent Hashtopolis Agent related enhancement Enhancement of existing features / Small addition

Comments

@tosiara
Copy link

tosiara commented Mar 24, 2024

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 tosiara added the bug Something isn't working label Mar 24, 2024
@tosiara
Copy link
Author

tosiara commented Mar 24, 2024

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

@tosiara tosiara changed the title [BUG]: Agent dies with exception FileNotFoundError: [Errno 2] No such file or directory: '7zr' [FEATURE]: Agent dies with exception FileNotFoundError: [Errno 2] No such file or directory: '7zr' Mar 24, 2024
@zyronix zyronix added enhancement Enhancement of existing features / Small addition and removed bug Something isn't working labels Mar 27, 2024
@zyronix zyronix changed the title [FEATURE]: Agent dies with exception FileNotFoundError: [Errno 2] No such file or directory: '7zr' [ENHANCEMENT]: Agent dies with exception FileNotFoundError: [Errno 2] No such file or directory: '7zr' Mar 27, 2024
@zyronix zyronix added the agent Hashtopolis Agent related label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Hashtopolis Agent related enhancement Enhancement of existing features / Small addition
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants