Skip to content

Commit

Permalink
Python 3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavsec committed Dec 24, 2018
1 parent 261e47d commit df5c265
Show file tree
Hide file tree
Showing 13 changed files with 213 additions and 145 deletions.
70 changes: 59 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h1 align="center">
<a href="https://github.com/bhavsec/reconspider"><img src="http://reconspider.com/images/reconspider.png" alt="ReconSpider height="200" width="200""></a>
<a href="https://github.com/bhavsec/reconspider"><img src="http://reconspider.com/images/reconspider.png" alt="ReconSpider height="200" width="200""></a>
</h1>
<h4 align="center"> Most advanced Open Source Intelligence (OSINT) Framework </h4>
<p align="center">
<img src="https://img.shields.io/badge/release-1.0.2%20(beta)-blue.svg">
</p>

# ReconSpider

Expand All @@ -11,12 +15,29 @@ ReconSpider can be used by Infosec Researchers, Penetration Testers, Bug Hunters
ReconSpider aggregate all the raw data, visualize it on a dashboard and facilitate alerting and monitoring on the data.



# Table Of Contents

1. [Version (beta)](https://github.com/bhavsec/reconspider#version-beta)
2. [Overview of the tool](https://github.com/bhavsec/reconspider#overview-of-the-tool)
3. [Mind Map (v1)](https://github.com/bhavsec/reconspider#mind-map-v1)
4. [License Information](https://github.com/bhavsec/reconspider#license-information)
5. [ReconSpider Banner](https://github.com/bhavsec/reconspider#reconspider-banner)
6. [Required Setup](https://github.com/bhavsec/reconspider#required-setup)
7. [Documentation](https://github.com/bhavsec/reconspider#documentation)
8. [Setting up the environment (Linux Operating System)](https://github.com/bhavsec/reconspider#setting-up-the-environment-linux-operating-system)
9. [Setting up the environment (Windows Operating System)](https://github.com/bhavsec/reconspider#setting-up-the-environment-windows-operating-system)
10. [Setting up the environment using (Termux) in Android](https://github.com/bhavsec/reconspider#setting-up-the-environment-using-termux-in-android)
11. [Adding API Keys](https://github.com/bhavsec/reconspider#adding-api-keys)
12. [Usage](https://github.com/bhavsec/reconspider#usage)



# Version (beta)

File Name : README
Developer : @bhavsec
Version : 0.0.1
Website : reconspider.com
ReconSpider : 1.0.2
Python : 3.7.1
Website : reconspider.com



Expand All @@ -38,14 +59,14 @@ http://reconspider.com/mindmap.html



# Licenses information
# License Information
```
ReconSpider and its documents are covered under GPL-3.0 (General Public License v3.0)
```



## Using ReconSpider
## ReconSpider Banner

```
__________ _________ __ ___
Expand All @@ -72,9 +93,9 @@ OPTIONS:



# Required setup
# Required Setup

* Python 2.7 Download latest version from here: [python.org](https://www.python.org/downloads/)
* Python 3.7 Download latest version from here: [python.org](https://www.python.org/downloads/)
* Use install.py For installing all dependencies and libraries


Expand All @@ -93,7 +114,7 @@ Let's Begin !!

### Setting up the environment (Linux Operating System)

Step 1 - cloning ReconSpider on your linux system.
Step 1 - Cloning ReconSpider on your linux system.

In order to download ReconSpider simply clone the github repository. Below is the command which you can use in order to clone ReconSpider repository.
```
Expand Down Expand Up @@ -132,7 +153,34 @@ After unzipping, go to that directory using Command Prompt and type the followin
python install.py
```

### Generating and adding API Keys


### Setting up the environment using (Termux) in Android

Step 1 - Cloning ReconSpider on your Termux in Android operating system.

In order to download ReconSpider from github you need to install git package using this command.
```
pkg install git
```


Step 2 - After installing git package, Simply clone the github repository. Below is the command which you can use in order to clone ReconSpider repository.
```
git clone https://github.com/bhavsec/reconspider.git
```


Step 3 - Installing all dependencies.

Once you clone, you will find directory name as **reconspider**. Just go to that directory and install using these commands:
```
cd reconspider
python install.py
```


### Adding API Keys

We need some API Keys before using this tool. Following are the API's which we are using in this tool for a time being.

Expand Down
20 changes: 12 additions & 8 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
import sys
import platform

def exec_api():
os.system('python main/gen_api.py')
os.system('python reconspider.py')
def exec_api_linux():
os.system('python3 main/gen_api.py')
os.system('python3 reconspider.py')

if sys.version_info[0] < 3:
def exec_api_win():
os.system('py -3 main/gen_api.py')
os.system('py -3 reconspider.py')

if sys.version_info[0] > 2:
if (platform.system() != "Windows"):
os.system('sudo apt-get install python-pip')
os.system('sudo pip install python-whois clearbit shodan fullcontact.py requests')
exec_api()
exec_api_linux()
else:
os.system('C:\Python27\Scripts\pip install python-whois clearbit shodan fullcontact.py requests')
exec_api()
os.system('pip3 install python-whois clearbit shodan fullcontact.py requests')
exec_api_win()
else:
print("Your System Python Version "+ str(sys.version_info[0]) + " isn't compatible with ReconSpider. Use Python 2.7")
print(("Your System Python Version "+ str(sys.version_info[0]) + " isn't compatible with ReconSpider. Use Python 3.7"))
2 changes: 1 addition & 1 deletion main/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from args import *
from .args import *
16 changes: 8 additions & 8 deletions main/gen_api.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
print "\n\n[+] Enter your API Keys below\n"
print("\n\n[+] Enter your API Keys below\n")

sd = raw_input("Enter your Shodan API Key: ").replace(" ", "")
cb = raw_input("Enter your Clearbit Secret API Key: ").replace(" ", "")
fc = raw_input("Enter your Full Contact API Key: ").replace(" ", "")
sd = input("Enter your Shodan API Key: ").replace(" ", "")
cb = input("Enter your Clearbit Secret API Key: ").replace(" ", "")
fc = input("Enter your Full Contact API Key: ").replace(" ", "")


fout = open('modules/config.py', 'w')
fout.write("shodan_api = "+"\"" + sd + "\""+"\n")
fout.write("clearbit_api = "+"\"" + cb + "\""+"\n")
fout.write("fullcontact_api = "+"\"" + fc + "\""+"\n")
fout = open("modules/config.py", "w")
fout.write("shodan_api = " + '"' + sd + '"' + "\n")
fout.write("clearbit_api = " + '"' + cb + '"' + "\n")
fout.write("fullcontact_api = " + '"' + fc + '"' + "\n")
fout.close()
12 changes: 6 additions & 6 deletions modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from company import *
from email import *
from ip import *
from person import *
from url import *
from who_is import *
from .company import *
from .email import *
from .ip import *
from .person import *
from .url import *
from .who_is import *
24 changes: 12 additions & 12 deletions modules/company.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
from config import clearbit_api
from .config import clearbit_api
import requests, json, clearbit, os

clearbit.key=clearbit_api
def comDetail(domain):
try:
company=clearbit.Company.find(domain=domain,stream=True)
if company != None:
print "\n-------------------------------------------------\n"
print "[+] Gathering Company Information from [clearbit]...\n"
print "Location-------------> "+str(company['name'])
print "Domain Name----------> "+str(company['domain'])
print "Location-------------> "+str(company['location'])
print "Email Address--------> "+str(company['site']['emailAddresses'])
print "Number of Employees--> "+str(company['metrics']['employees'])
print "Contact Number-------> "+str(company['phone'])
print "Description----------> "+str(company['description'])
print("\n-------------------------------------------------\n")
print("[+] Gathering Company Information from [clearbit]...\n")
print("Location-------------> "+str(company['name']))
print("Domain Name----------> "+str(company['domain']))
print("Location-------------> "+str(company['location']))
print("Email Address--------> "+str(company['site']['emailAddresses']))
print("Number of Employees--> "+str(company['metrics']['employees']))
print("Contact Number-------> "+str(company['phone']))
print("Description----------> "+str(company['description']))

else:
print "No information"
print("No information")
except:
print "Try Again"
print("Try Again")
40 changes: 20 additions & 20 deletions modules/email.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from fullcontact import FullContact
from config import fullcontact_api
from person import perDetail
from .config import fullcontact_api
from .person import perDetail
import json
fc = FullContact(fullcontact_api)

Expand All @@ -9,37 +9,37 @@ def fetchData(email_id):
person = fc.person(email=email_id)
data = person.json()
try:
print "\n-------------------------------------------------\n"
print "[+] Gathering Personal Details from [FullContact]\n"
print "Full Name: ----> "+data['contactInfo']['fullName']
print "Gender: -------> "+str(data['demographics']['gender'])
print "State: --------> "+str(data['demographics']['locationDeduced']['state']['name'])
print "Country: ------> "+str(data['demographics']['locationDeduced']['country']['name'])
print("\n-------------------------------------------------\n")
print("[+] Gathering Personal Details from [FullContact]\n")
print("Full Name: ----> "+data['contactInfo']['fullName'])
print("Gender: -------> "+str(data['demographics']['gender']))
print("State: --------> "+str(data['demographics']['locationDeduced']['state']['name']))
print("Country: ------> "+str(data['demographics']['locationDeduced']['country']['name']))
for u in data['contactInfo']['websites']:
print "Website: ------> "+u['url']
print("Website: ------> "+u['url'])

except:
print "Unavailable"
print("Unavailable")

try:
print "\n\n[+] Gathering Employment Details from [FullContact]\n"
print("\n\n[+] Gathering Employment Details from [FullContact]\n")
for org in data['organizations']:
print "Organisation Name: "+org['name']+" "+"\nJob Title: "+" "+org['title']+" "+"\nStart date: "+" "+org['startDate']+"\n"
print("Organisation Name: "+org['name']+" "+"\nJob Title: "+" "+org['title']+" "+"\nStart date: "+" "+org['startDate']+"\n")

except:
print "Unavailable"
print("Unavailable")


try:
print "\n\n[+] Gathering Social Accounts from [FullContact]\n"
print("\n\n[+] Gathering Social Accounts from [FullContact]\n")
for soc in data['socialProfiles']:
print ""+soc['typeName'] + ": " +soc['url']
print "\n-------------------------------------------------\n"
print(""+soc['typeName'] + ": " +soc['url'])
print("\n-------------------------------------------------\n")

print perDetail(email_id)
print(perDetail(email_id))

except:
print "Unavailable"
print "\n-------------------------------------------------\n"
print("Unavailable")
print("\n-------------------------------------------------\n")

print perDetail(email_id)
print(perDetail(email_id))
24 changes: 12 additions & 12 deletions modules/ip.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import shodan
from config import shodan_api
from .config import shodan_api
api = shodan.Shodan(shodan_api)


def ipEnum(IP):
try:
host = api.host(IP)
print "\n-------------------------------------------------\n"
print "[+] Gathering IP Address Information from [shodan]\n"
print "IP Address ----> "+str(host['ip_str'])
print "Country -------> "+str(host['country_name'])
print "City ----------> "+str(host['city'])
print "Organization --> "+str(host['org'])
print "ISP -----------> "+str(host['isp'])
print "Open ports ----> "+str(host['ports'])
print "\n-------------------------------------------------\n"
print("\n-------------------------------------------------\n")
print("[+] Gathering IP Address Information from [shodan]\n")
print("IP Address ----> "+str(host['ip_str']))
print("Country -------> "+str(host['country_name']))
print("City ----------> "+str(host['city']))
print("Organization --> "+str(host['org']))
print("ISP -----------> "+str(host['isp']))
print("Open ports ----> "+str(host['ports']))
print("\n-------------------------------------------------\n")
except:
print "Unavailable"
print "\n-------------------------------------------------\n"
print("Unavailable")
print("\n-------------------------------------------------\n")
60 changes: 30 additions & 30 deletions modules/person.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from config import clearbit_api
from .config import clearbit_api
import requests, json, clearbit, os
clearbit.key=clearbit_api

Expand All @@ -7,40 +7,40 @@ def perDetail(email_id):
person=clearbit.Person.find(email=email_id,stream=True)
if person != None:

print "\n[+] Gathering Personal Information from [clearbit]\n"
print "First Name: ---------> "+str(person['name']['givenName'])
print "Last Name: ----------> "+str(person['name']['familyName'])
print "Full Name: ----------> "+str(person['name']['fullName'])
print "Description: --------> "+str(person['bio'])
print "Website: ------------> "+str(person['site'])
print("\n[+] Gathering Personal Information from [clearbit]\n")
print("First Name: ---------> "+str(person['name']['givenName']))
print("Last Name: ----------> "+str(person['name']['familyName']))
print("Full Name: ----------> "+str(person['name']['fullName']))
print("Description: --------> "+str(person['bio']))
print("Website: ------------> "+str(person['site']))


print "\n[+] Gathering Location Information from [clearbit]\n"
print "City:----------------> "+str(person['geo']['city'])
print "State: --------------> "+str(person['geo']['state'])
print "Country: ------------> "+str(person['geo']['country'])
print "Full Location: ------> "+str(person['location'])
print "Time Zone: ----------> "+str(person['timeZone'])
print "Latitude: -----------> "+str(person['geo']['lat'])
print "Longitude: ----------> "+str(person['geo']['lng'])
print("\n[+] Gathering Location Information from [clearbit]\n")
print("City:----------------> "+str(person['geo']['city']))
print("State: --------------> "+str(person['geo']['state']))
print("Country: ------------> "+str(person['geo']['country']))
print("Full Location: ------> "+str(person['location']))
print("Time Zone: ----------> "+str(person['timeZone']))
print("Latitude: -----------> "+str(person['geo']['lat']))
print("Longitude: ----------> "+str(person['geo']['lng']))


print "\n[+] Gathering Employment Information from [clearbit]\n"
print "Company Name: -------> "+str(person['employment']['name'])
print "Title: --------------> "+str(person['employment']['title'])
print "Role: ---------------> "+str(person['employment']['role'])
print "Seniority: ----------> "+str(person['employment']['seniority'])
print "Domain: -------------> "+str(person['employment']['domain'])
print("\n[+] Gathering Employment Information from [clearbit]\n")
print("Company Name: -------> "+str(person['employment']['name']))
print("Title: --------------> "+str(person['employment']['title']))
print("Role: ---------------> "+str(person['employment']['role']))
print("Seniority: ----------> "+str(person['employment']['seniority']))
print("Domain: -------------> "+str(person['employment']['domain']))


print "\n[+] Gathering Social Accounts Information from [clearbit]\n"
print "Facebook: -----------> "+str(person['facebook']['handle'])
print "Github: -------------> "+str(person['github']['handle'])
print "Twitter: ------------> "+str(person['twitter']['handle'])
print "LinkedIn: -----------> "+str(person['linkedin']['handle'])
print "Google Plus: --------> "+str(person['googleplus']['handle'])
print "\n-------------------------------------------------\n"
print("\n[+] Gathering Social Accounts Information from [clearbit]\n")
print("Facebook: -----------> "+str(person['facebook']['handle']))
print("Github: -------------> "+str(person['github']['handle']))
print("Twitter: ------------> "+str(person['twitter']['handle']))
print("LinkedIn: -----------> "+str(person['linkedin']['handle']))
print("Google Plus: --------> "+str(person['googleplus']['handle']))
print("\n-------------------------------------------------\n")
else:
print "No information"
print("No information")
except:
print "Try Again"
print("Try Again")
Loading

0 comments on commit df5c265

Please sign in to comment.