6abd / horus

An OSINT / digital forensics tool built in Python
https://horusdocs.gitbook.io
GNU General Public License v3.0
327 stars 38 forks source link

[FIX]: add helper utils #29

Closed tpegl closed 1 week ago

tpegl commented 1 month ago

Addresses #4 by moving output functions and variables to utils.py and importing from it in modules.

This PR moves a lot and touches almost every file so there's no rush on checking it. Please take as long as you need and if it's too much (or just not how you'd like it done), please let me know :pray: thanks for letting me contribute more!

6abd commented 2 weeks ago

Sorry for the late response, will check it out this weekend!

6abd commented 2 weeks ago

Everything seems good, but I get the following warning after running a command:

/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

Does this only happen on my machine?

tpegl commented 2 weeks ago

What OS and what command?

I don't see it when I run ovpn and config but I'm on EndeavourOS. I'll check on Windows too and see if I can get some MacOS to try on

6abd commented 1 week ago

MacOS, apicon and falcon when I tested them, but I think it's on every command for me.

tpegl commented 1 week ago

Reproduced it on a Mac, Python 3.11.4. I think it might be Mac specific but I'll need to investigate it. It's just a warning at least but it appears to be Mac specific 🤔 I'll investigate. Oddly it is most likely from my previous PR, that was the only place I used multiprocessing.

tpegl commented 1 week ago

I haven't been able to find any useful threads on this specific issue but I had a suspicion that the os._exit calls might be causing it so swapped them out to sys.exit and it removed the warning. Do you remember why os._exit was used instead of sys.exit?

6abd commented 1 week ago

I honestly couldn't tell you, but that seems to have been the issue. Could you update your changes for that fix? I can merge it once that's done. Thanks!

tpegl commented 1 week ago

Absolutely, I'll update it now!