Skip to content

Commit

Permalink
Merge pull request #2 from killswitch-GUI/Dev
Browse files Browse the repository at this point in the history
Version 0.2 Merge
  • Loading branch information
killswitch-GUI committed Nov 10, 2015
2 parents 95f26d8 + 03f5738 commit f5cb36e
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Common/SimplyEmail.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Funcoming=Green
# Settings for HTML Scrapping module
# Save can add in a path - default is the SimpleEmail folder with domain name
[HtmlScrape]
Depth: 1
Depth: 2
Wait: 0
LimitRate: 10000k
Timeout: 2
Timeout: 1
Save:
RemoveHTML: Yes

Expand All @@ -27,7 +27,7 @@ Hostname: pgp.rediris.es
# Settings for Google Search
[GoogleSearch]
StartQuantity: 100
QueryLimit: 400
QueryLimit: 500
QueryStart: 0

#Flickr Settings
Expand All @@ -54,7 +54,7 @@ QueryStart: 0

#Canary PasteBin Search NON-API
[CanaryPasteBin]
PageDepth: 1
PageDepth: 2
QueryStart: 1
MaxPastesToSearch: 50

Expand Down
6 changes: 3 additions & 3 deletions Common/TaskController.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self):
self.Emails = []
self.ConsumerList = []
self.Tasks = []
self.version = "0.1"
self.version = "0.2"
self.ResultsList = []

def ConfigSectionMap(section):
Expand Down Expand Up @@ -107,7 +107,7 @@ def printer(self, FinalEmailList):
item = item + "\n"
if x == 0:
try:
with open('Email_list.txt', "a") as myfile:
with open('Email_List.txt', "a") as myfile:
myfile.write(PrintTitle)
except Exception as e:
print e
Expand Down Expand Up @@ -210,7 +210,7 @@ def TaskSelector(self, domain):
# We want to wait till we have no procs left, before we join
if len(LeftOver) == 0:
# Block untill all results are consumed
time.sleep(5)
time.sleep(2)
Results_queue.put(None)
# t.join()
try:
Expand Down
6 changes: 6 additions & 0 deletions Helpers/Parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ def GrepFindEmails(self):
for item in output:
FinalOutput.append(item.rstrip("\n"))
return FinalOutput

def CleanListOutput(self):
FinalOutput = []
for item in self.InputData:
FinalOutput.append(item.rstrip("\n"))
return FinalOutput
60 changes: 60 additions & 0 deletions Modules/EmailHunter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env python
import requests
import configparser
from pprint import pprint
from Helpers import Parser
from Helpers import helpers

# Class will have the following properties:
# 1) name / description
# 2) main name called "ClassName"
# 3) execute function (calls everthing it neeeds)
# 4) places the findings into a queue

# https://emailhunter.co/trial/v1/search?offset=0&domain=any.com&format=json

class ClassName:

def __init__(self, domain):
self.name = "EmailHunter Trial API"
self.description = "Search the EmailHunter DB for potential emails"
self.domain = domain
config = configparser.ConfigParser()
self.results = []
try:
config.read('Common/SimplyEmail.ini')
self.UserAgent = str(config['GlobalSettings']['UserAgent'])
except:
print helpers.color("[*] Major Settings for EmailHunter are missing, EXITING!\n", warning=True)

def execute(self):
self.process()
FinalOutput = self.get_emails()
return FinalOutput

def process(self):
try:
# This returns a JSON object
url = "https://emailhunter.co/trial/v1/search?offset=0&domain=" + \
self.domain + "&format=json"
r = requests.get(url)
except Exception as e:
error = "[!] Major issue with PGP Search:" + str(e)
print helpers.color(error, warning=True)
results = r.json()
# pprint(results)
# Check to make sure we got data back from the API
if results['status'] == "success":
# The API starts at 0 for the first value
x = 0
EmailCount = int(results['results'])
# We will itirate of the Json object for the index objects
while x < EmailCount:
self.results.append(results['emails'][int(x)]['value'])
x += 1

def get_emails(self):
# Make sure you remove any newlines
Parse = Parser.Parser(self.results)
FinalOutput = Parse.CleanListOutput()
return FinalOutput
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,17 @@ $$ $$/$$ $$ | $$ | $$ $$ $$ $$ $$ |
- shinichiro.hamaji--at--gmail.com

##Build Log:
####Changelog in 0.1:
####Changelog in of v0.2:
```
Modules Added in v0.2:
-----------------------------
(x) EmailHunter Trial API
Issues Fixed in v0.2:
-----------------------------
(x) Fixed Issues with SetupScript
(x) Changes Output Text file name
Modules Added in v0.1:
-----------------------------
(x) HtmlScrape Added to Modules
Expand Down
2 changes: 2 additions & 0 deletions Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func_install_requests(){
#sudo apt-get -q update
#sudo apt-get -q upgrade
sudo git pull
sudo apt-get install wget -y
sudo apt-get grep wget -y
sudo pip install --upgrade requests
sudo pip install configparser --upgrade
sudo pip install BeautifulSoup --upgrade
Expand Down

0 comments on commit f5cb36e

Please sign in to comment.