-
Notifications
You must be signed in to change notification settings - Fork 22
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
Crash when finding a broken link #2
Comments
Can you tell me what the directory is you're scanning, and what the symbolic link is pointed at? I've never tested it with symbolic links, just the directory where the files are or just outside of public_html (or /var/www/). Will make a note of this and check it out. Edit to add: What happens when you run |
So I'm trying to recreate this. I've created a test scan where I've included six different broken symbolic links. steved3@steved3-lab:/media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan$ tree 3 directories, 8 files When I scan, the output and function works as expected. steved3@steved3-lab:/media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan$ ./kit_hunter_2.py -qlm Kit Hunter Starting... Examining Folder: /media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan Examining Folder: /media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan/scan2 Examining Folder: /media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan/scan2/scan3 Examining Folder: /media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan/scan2/scan3/scan4 Examining Archive: /media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan/scan2/scan3/scan4/censor.be_CA 3.0.zip ========================= Done! All file processing is complete. ========================= Kit Hunter processed all files in 00h : 00m : 00.12s ========================= The finished report is located at: /media/steved3/PHISHING/Kit-Hunter-2/Scanner/scan/Kit_Hunter_Report_2021-Sep-18-0243.log ========================= |
I tried it with a valid symbolic link, and got the same results. It skipped the broken symbolic links and the valid one. |
Tried this using ./kit_hunter.py as well. No flags, full scan. Same results. Scan worked as expected. Debian 10 steved3@steved3-lab:~$ which python steved3@steved3-lab:~$ python --version |
The date files were simply created with Running the script from the /tmp/test_kit_hunter and with the IMHO it would be nice:
|
The error is showing me that you don't have your tag paths set.
At the top of the kit_hunter_2.py (lines 27 and 28), there is a config option, where you set the paths of your tag files. Mine looks like this:
and
Set those options and let me know if you get the same error. I'll place the direct path parameter on the development list for sure. Will be something good for me to learn. Thanks for taking the time to report this error though, and offer feedback. I really appreciate it. |
Quick update, got this aspect working for you tonight, will test it for a bit and then release it. So far it is working as expected, but I'm still seeing what I can throw at it. |
So, I modified the 2 values (kh_quick_scan and kh_full_scan) it still stops when a broken link is found !
As the folders tag_files/ and tag_files/quick_scan/ are subfolders of the folder where kit_hunter_2.py is located, couldn't it use its own path to set them (at least by default)? |
It's taken some time, but I've almost got this fixed. Will be releasing a new version soon with error checking, which will log errors, but allow the scan to continue. Once I am done with testing, I will release it. Also, your request for switching has been added as well. So -d /path/to/folder/ will work, that change is live now in the repository. As for the tag paths, those are directed like that so that the tags can be stored anywhere and called, but I will consider making that change in a future release. -Steve Example:
|
OK, I'll be glad to test the new version ASAP! :-) About the symlinks, I am wondering if it wouldn't be more appropriate to skip (and log) those that point outside the checked directory... |
It will log errors. So if the Symlinks are broken, and pointed outside, or internal, it should log them all. |
Yes, now it works as expected - thanks! |
I am on Linux (Ubuntu); when running kit_hunter_2.py if it finds a broken symbolic link somewhere in the indicated path, then the application stops:
The text was updated successfully, but these errors were encountered: