DataSploit / datasploit

An #OSINT Framework to perform various recon techniques on Companies, People, Phone Number, Bitcoin Addresses, etc., aggregate all the raw data, and give data in multiple formats.
GNU General Public License v3.0
2.98k stars 426 forks source link

After installing all the missing requirements WhoIS error #46

Closed wifiuk closed 7 years ago

wifiuk commented 7 years ago

i get the following error

---> Finding Whois Information. Traceback (most recent call last): File "domainOsint.py", line 432, in main() File "domainOsint.py", line 428, in main do_everything(domain) File "domainOsint.py", line 122, in do_everything whoisdata = whoisnew(domain) File "/home/XXXXXXXX/Apps/datasploit/domain_whois.py", line 15, in whoisnew w = whois.whois(domain) AttributeError: 'module' object has no attribute 'whois'

ccsplit commented 7 years ago

What is the output of pip freeze | grep whois? It is possible it may not have installed the requirements as expected. When I tried installing the requirements (using pip install -r requirements.txt) I had issues with lxml, which caused the entire install to be aborted.

SudhanshuC commented 7 years ago

@wifiuk try-> pip install python-whois

upgoingstar commented 7 years ago

Can you please share the error you are facing while installing lxml.

ccsplit commented 7 years ago

@upgoingstar The issue I had with lxml was that I didn't have the libxml2 and libxslt headers on my distribution. Which was resolved with this SO question.

ebrinkster commented 7 years ago

I am encountering the same issue on Kali Linux (Rolling), even after "pip install -r requirements" as root and installing other packages mentioned on @ccsplit 's stackoverflow link.

root@workstation:~# pip freeze | grep whois

Results in Warning: cannot find svn location for chirp===daily-20160717 python-whois==0.6.2 pythonwhois==2.4.3 whois==0.7

Output of running initial command (mongodb is running) root@workstation:~/tools/datasploit# python domainOsint.py -d microsoft.com

      ____/ /____ _ / /_ ____ _ _____ ____   / /____  (_)/ /_
      / __  // __ `// __// __ `// ___// __ \ / // __ \ / // __/
     / /_/ // /_/ // /_ / /_/ /(__  )/ /_/ // // /_/ // // /_
     \__,_/ \__,_/ \__/ \__,_//____// .___//_/ \____//_/ \__/
                                   /_/

               Open Source Assistant for #OSINT
                 website: www.datasploit.info

No earlier scans found for microsoft.com, Launching fresh scan in 3, 2, 1..

---> Finding Whois Information. Traceback (most recent call last): File "domainOsint.py", line 432, in main() File "domainOsint.py", line 428, in main do_everything(domain) File "domainOsint.py", line 122, in do_everything whoisdata = whoisnew(domain) File "/root/tools/datasploit/domain_whois.py", line 15, in whoisnew w = whois.whois(domain) AttributeError: 'module' object has no attribute 'whois'

ccsplit commented 7 years ago

@ebrinkster I believe the issue with yours is that you have pythonwhois and whois. Which whois doesn't allow the code to do whois.whois because there is no attribute for it. You can test this by opening python and running:

>>> import whois
>>> whois.__file__
'/usr/local/lib/python2.7/site-packages/whois/__init__.pyc'

As you can see when I have pythonwhois and whois installed it loads whois instead of pythonwhois.

Installed pip modules:

$ pip freeze | grep whois                 [ruby-2.3.1p112]
pythonwhois==2.4.3
whois==0.7

EDIT: Also it appears that instead of pythonwhois, the dependency is python-whois which will create a module/install a module named whois. So I would suggest removing at least whois and then installing python-whois using pip install python-whois==0.6.2.

ebrinkster commented 7 years ago

@ccsplit I was thinking that might be it... Thanks for the information. Appears to be in working order now.