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

Error #3

Open
Teicu opened this issue Dec 17, 2019 · 9 comments
Open

Error #3

Teicu opened this issue Dec 17, 2019 · 9 comments

Comments

@Teicu
Copy link

Teicu commented Dec 17, 2019

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

@chrispetrou
Copy link
Owner

@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!

@Teicu
Copy link
Author

Teicu commented Dec 17, 2019

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

@chrispetrou
Copy link
Owner

chrispetrou commented Dec 17, 2019

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.

@Teicu
Copy link
Author

Teicu commented Dec 17, 2019

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. :/

@chrispetrou
Copy link
Owner

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.

@Teicu
Copy link
Author

Teicu commented Dec 17, 2019

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

@chrispetrou
Copy link
Owner

For python 2, urlparse is pre-installed.

@Teicu
Copy link
Author

Teicu commented Dec 20, 2019

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 :(

@chrispetrou
Copy link
Owner

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants