buffer / thug

Python low-interaction honeyclient
GNU General Public License v2.0
967 stars 204 forks source link

Failed building wheel for thug: No such file or directory: 'conf' #344

Closed lennyzeltser closed 1 year ago

lennyzeltser commented 1 year ago

Running pip3 install thug on Ubuntu 20.04 produces the following error:

installing to build/bdist.linux-x86_64/wheel
running install
error: [Errno 2] No such file or directory: 'conf'
...
ERROR: Failed building wheel for thug
ERROR: Could not build wheels for thug, which is required to install pyproject.toml-based projects

This wasn't happening a couple of weeks ago.

This issue is affecting people trying to install or update Thug on REMnux.

buffer commented 1 year ago

Hey Lenny, I can reproduce the issue.

FYI there was a change starting from version 4.6. Thug is now installed through pyproject.toml and the new installation workflow allows to install Thug as a non-privileged user. In that case the conf directory should be copied to a folder the user is granted write permission to. The folder is determined by appdirs and usually is

Linux    /home/<user>/.config/thug
MacOS X  /Users/<user>/Library/Application Support/thug

At runtime Thug checks if /etc/thug folder exists as first option. If it doesn't exist it attempts to use the user configuration folder.

A quick workaround while I figure out why it does not work (if you install locally with pip install . it just works...) is to copy the conf folder at one of such location. But this is not a real solution, I know.

buffer commented 1 year ago

I released Thug v4.6.1 which should solve the issue. Can you please confirm it works for you too? Thanks!

UPDATE: the patch works fine but I am still slightly improving it. FYI in a few hours I am going to release Thug v4.7 which includes a very relevant change about meta refresh loops prevention. By that time I should be finally satisfied with the fix and include it in the new release. Thanks for your patience.

lennyzeltser commented 1 year ago

Thank you for the quick fix, @buffer! I can confirm that Thug v4.6.1 installs fine now.

buffer commented 1 year ago

Glad it works for you too @lennyzeltser! FYI I just released Thug v4.7 which slightly improves the install workflow. Tested here and apparently I didn't break anything this time :)

lennyzeltser commented 1 year ago

v4.7 installed fine for me, too. Thanks!