FastAudit icon indicating copy to clipboard operation
FastAudit copied to clipboard

Error

Open Teicu opened this issue 4 years ago • 9 comments

Hi, can you help me please to fix this issue? Thanks

Traceback (most recent call last): File "./fastaudit.py", line 26, in from wp.validations import * File "/Users/FastAudit/wp/validations.py", line 31, in sys.exit(0) NameError: name 'sys' is not defined

Note that I already did

pip install -r requirements.txt --upgrade --user

I try from Mac OS btw

Teicu avatar Dec 17 '19 16:12 Teicu

@Teicu Hi! Thanks for pointing that out! I checked the script and I indeed had forgotten to import the sys module in /wp/validations.py. I fixed that with the latest commit so try again and please tell me if it's fixed now!

chrispetrou avatar Dec 17 '19 16:12 chrispetrou

Hi again

Thanks a lot, you were very quick.

Works now, but I continue to get "[!] Please install missing modules!"

You think I'm missing something?

Cheers

Teicu avatar Dec 17 '19 17:12 Teicu

Hm, that's probably due to shodan module. I hadn't add it to the requirements.txt since in order to be able to use it you have to have a shodan API key (there is a free version). I updated the requirements.txt to also include shodan module. You can install it by running again: pip install -r requirements.txt --upgrade --user but if you want to use the shodan functionality of the script you should also add your shodan API key in config.cfg.

chrispetrou avatar Dec 17 '19 17:12 chrispetrou

Hi

I have shodan pro, I have already added the API key, also I already run pip install -r requirements.txt --upgrade --user but still useless. :/

Teicu avatar Dec 17 '19 17:12 Teicu

For me works fine which means that probably I had a module pre-installed and forgot that it's not part of the standard python library. So I updated the requirements.txt with all the modules used so please try again with pip install... and now I think it will work.

chrispetrou avatar Dec 17 '19 17:12 chrispetrou

The only thing I can't install is the urlparse

ERROR: Could not find a version that satisfies the requirement urlparse (from -r requirements.txt (line 5)) (from versions: none) ERROR: No matching distribution found for urlparse (from -r requirements.txt (line 5))

even if I do

pip install urlparse2

, not works.

This is what I have now:

pip search urlparse urlparse2 (1.1.1) - urlparse for humans. INSTALLED: 1.1.1 (latest) murl (0.5.1) - murl is a tiny wrapper for the Python module urlparse. urlparse4 (0.1.3) - Performance-focused replacement for Python's urlparse module

Teicu avatar Dec 17 '19 17:12 Teicu

For python 2, urlparse is pre-installed.

chrispetrou avatar Dec 17 '19 18:12 chrispetrou

Hi again

./fastaudit.py -u https://www.site.com

[!] Please install missing modules!

Pentest@root FastAudit % sudo pip install -r requirements.txt --upgrade --user

Requirement already up-to-date: bs4 in /Library/Python/3.7/site-packages (from -r requirements.txt (line 1)) (0.0.1) Requirement already up-to-date: shodan in /Users/Library/Python/3.7/lib/python/site-packages (from -r requirements.txt (line 2)) (1.21.0) Collecting argparse Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl Requirement already up-to-date: requests in /Library/Python/3.7/site-packages (from -r requirements.txt (line 4)) (2.22.0) ERROR: Could not find a version that satisfies the requirement urlparse (from -r requirements.txt (line 5)) (from versions: none) ERROR: No matching distribution found for urlparse (from -r requirements.txt (line 5))

Pentest@root FastAudit % pip search urlparse

urlparse2 (1.1.1) - urlparse for humans. INSTALLED: 1.1.1 (latest) murl (0.5.1) - murl is a tiny wrapper for the Python module urlparse. urlparse4 (0.1.3) - Performance-focused replacement for Python's urlparse module

So to be honest I really don't know where is the problem :(

Teicu avatar Dec 20 '19 10:12 Teicu

@Teicu If you try to import every module separately as it's imported in the script in a python2 interactive shell do you face any problem?

chrispetrou avatar Dec 28 '19 10:12 chrispetrou