From c966acf537ddb2f3d388e8f9ca78db85f197cda0 Mon Sep 17 00:00:00 2001
From: jzold
Date: Sun, 16 Dec 2018 16:37:36 +0000
Subject: [PATCH 1/6] added scanning history report for domain
---
lib/reportgraph.py | 47 ++++++++++++++++++++----------------
report.html | 16 ++++++-------
stash.py | 60 ++++++++++++++++++++++++++++++----------------
theHarvester.py | 14 +++++++++--
4 files changed, 86 insertions(+), 51 deletions(-)
diff --git a/lib/reportgraph.py b/lib/reportgraph.py
index d4d5281fd40..24c94fe5a12 100644
--- a/lib/reportgraph.py
+++ b/lib/reportgraph.py
@@ -3,6 +3,7 @@
import plotly.plotly as py
import plotly
import stash
+ from datetime import datetime
try:
db=stash.stash_manager()
db.do_init()
@@ -15,8 +16,13 @@ def __init__(self, domain):
self.domain = domain
self.bardata = []
self.barcolumns = []
- self.scatterxhosts = []
- self.scatteryhosts = []
+ self.scatterxdata = []
+ self.scattercountemails = []
+ self.scattercounthosts = []
+ self.scattercountips = []
+ self.scattercountshodans = []
+ self.scattercountvhosts = []
+
def drawlatestscangraph(self,domain,latestscandata):
self.barcolumns= ['email','host','ip','shodan','vhost']
@@ -25,8 +31,6 @@ def drawlatestscangraph(self,domain,latestscandata):
self.bardata.append(latestscandata['ip'])
self.bardata.append(latestscandata['shodan'])
self.bardata.append(latestscandata['vhost'])
- # for i in scandata:
- # self.bardata.append(scandata[i])
layout = dict(title = "Last scan - number of targets identified for "+ domain +" on "+str(latestscandata["latestdate"]),
xaxis = dict(title = 'Targets'),
yaxis = dict(title = 'Hits'),)
@@ -36,43 +40,46 @@ def drawlatestscangraph(self,domain,latestscandata):
}, auto_open=False,include_plotlyjs=False,filename='report.html', output_type='div')
return barchartcode
- def drawscattergraph(self,domain,latestscandata):
- scandata = latestscandata
- for i in scandata['scandetails']:
- self.scatterxhosts.append(i)
- self.scatteryhosts.append(scandata[i])
+ def drawscattergraphscanhistory(self,domain,scanhistorydomain):
+ scandata = scanhistorydomain
+ for i in scandata:
+ self.scatterxdata.append(datetime.date(datetime.strptime(i['date'],'%Y-%m-%d')))
+ self.scattercountemails.append(int(i['email']))
+ self.scattercounthosts.append(int(i['hosts']))
+ self.scattercountips.append(int(i['ip']))
+ self.scattercountshodans.append(int(i['shodan']))
+ self.scattercountvhosts.append(int(i['vhost']))
trace0 = go.Scatter(
- x=[date1,date2,date3,date4,date5],
- y=[3, 10, 9, 17,10],
+ x=self.scatterxdata,
+ y=self.scattercounthosts,
mode = 'lines+markers',
name = 'hosts')
trace1 = go.Scatter(
- x=[date1,date2,date3,date4,date5],
- y=[2, 6, 9, 10, 5],
+ x=self.scatterxdata,
+ y=self.scattercountips,
mode = 'lines+markers',
name = 'IP address')
trace2 = go.Scatter(
- x=[date1,date2,date3,date4,date5],
- y=[1, 2, 4, 6, 2],
+ x=self.scatterxdata,
+ y=self.scattercountvhosts,
mode = 'lines+markers',
name = 'vhost')
trace3 = go.Scatter(
- x=[date1,date2,date3,date4,date5],
- y=[2, 3, 2, 5, 7],
+ x=self.scatterxdata,
+ y=self.scattercountshodans,
mode = 'lines+markers',
name = 'shodan')
trace4 = go.Scatter(
- x=[date1,date2,date3,date4,date5],
- y=[12, 14, 20, 24, 20],
+ x=self.scatterxdata,
+ y=self.scattercountemails,
mode = 'lines+markers',
name = 'email')
-
data = [trace0, trace1, trace2, trace3, trace4]
layout = dict(title = "Scanning history for " + domain,
xaxis = dict(title = 'Date'),
diff --git a/report.html b/report.html
index 3a16e7fae73..256fef67c2d 100644
--- a/report.html
+++ b/report.html
@@ -16,10 +16,10 @@ TheHarvester scanning dashboard
2 |
- 247 |
- 183 |
+ 534 |
+ 380 |
0 |
- 15 |
+ 25 |
0 |
@@ -31,18 +31,18 @@ TheHarvester scanning dashboard
- Latest scan details for google.com on: 2018-12-15
+ Latest scan details for google.com on: 2018-12-16
Emails found:
-
+ - generationgoogle@google.com
- nicksauer@google.com
- generationgoogle@google.com
- nicksauer@google.com
- sroz@google.com
- winsonc@google.com
- android-build@google.com
- sroz@google.com
- winsonc@google.com
- android-build@google.com
Hosts found:
- - play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- Mail.google.com
- news.google.com
- images.google.com
- mx.google.com
- plus.google.com
- www.docs.google.com
- scholar.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- Mail.google.com
- news.google.com
- images.google.com
- mx.google.com
- plus.google.com
- www.docs.google.com
- scholar.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- Mail.google.com
- news.google.com
- images.google.com
- docs.google.com
- video.google.com
- .news.google.com
- plus.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- Mail.google.com
- edu.google.com
- images.google.com
- gotonet.google.com
- news.google.com
- docs.google.com
- video.google.com
- .news.google.com
- plus.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- Mail.google.com
- edu.google.com
- images.google.com
- gotonet.google.com
- news.google.com
- docs.google.com
- video.google.com
- .news.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- Mail.google.com
- edu.google.com
- images.google.com
- gotonet.google.com
- news.google.com
- docs.google.com
- video.google.com
- .news.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- account.google.com
- adssettings.google.com
- Mail.google.com
- images.google.com
- ...google.com
- plus.google.com
- ...google-com
- support.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- account.google.com
- adssettings.google.com
- images.google.com
- photos.google.com
- books.google.com
- mx.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- account.google.com
- adssettings.google.com
- Mail.google.com
- images.google.com
- ...google.com
- plus.google.com
- ...google-com
- support.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- account.google.com
- adssettings.google.com
- Mail.google.com
- images.google.com
- ...google.com
- plus.google.com
- ...google-com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- account.google.com
- adssettings.google.com
- Mail.google.com
- images.google.com
- ...google.com
- plus.google.com
- ...google-com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- account.google.com
- adssettings.google.com
- Mail.google.com
- images.google.com
- code.google.com
- www.support.google.com
- .mail.google.com
- screenshot-www.google.com
- docs.google.com
- www.docs.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- account.google.com
- Mail.google.com
- images.google.com
- code.google.com
- www.support.google.com
- .mail.google.com
- screenshot-www.google.com
- docs.google.com
- www.docs.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
+ - play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- account.google.com
- images.google.com
- santatracker.google.com
- ns2.google.com
- code.google.com
- books.google.com
- news.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- account.google.com
- images.google.com
- hangouts.google.com
- books.google.com
- mx.google.com
- .google.com
- sites.google.com
- support.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- account.google.com
- images.google.com
- santatracker.google.com
- ns2.google.com
- code.google.com
- books.google.com
- news.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- adssettings.google.com
- account.google.com
- images.google.com
- hangouts.google.com
- books.google.com
- mx.google.com
- .google.com
- sites.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- news.google.com
- Mail.google.com
- adssettings.google.com
- account.google.com
- hangouts.google.com
- docs.google.com
- books.google.com
- developers.google.com
- support.google.com
- tools.google.com
- sites.google.com
- .google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- news.google.com
- adssettings.google.com
- Mail.google.com
- account.google.com
- hangouts.google.com
- docs.google.com
- books.google.com
- developers.google.com
- support.google.com
- tools.google.com
- sites.google.com
- .google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- news.google.com
- adssettings.google.com
- Mail.google.com
- account.google.com
- hangouts.google.com
- books.google.com
- developers.google.com
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- checkout.google.com
- .checkout.google.com
- plus.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- news.google.com
- adssettings.google.com
- Mail.google.com
- account.google.com
- hangouts.google.com
- books.google.com
- developers.google.com
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- checkout.google.com
- .checkout.google.com
- plus.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- news.google.com
- adssettings.google.com
- Mail.google.com
- account.google.com
- hangouts.google.com
- books.google.com
- developers.google.com
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- checkout.google.com
- .checkout.google.com
- plus.google.com
- play.google.com
- mail.google.com
- drive.google.com
- accounts.google.com
- www.google.com
- maps.google.com
- translate.google.com
- news.google.com
- adssettings.google.com
- Mail.google.com
- account.google.com
- hangouts.google.com
- books.google.com
- developers.google.com
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- checkout.google.com
- .checkout.google.com
- plus.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
- www.google.com
- support.google.com
IP found:
- - 216.58.201.5
- 216.58.206.45
- 216.58.206.78
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.78
- 216.58.213.100
- 108.177.15.189
- 216.58.204.4
- 216.58.201.5
- 216.58.206.45
- 216.58.206.78
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.110
- 216.58.213.100
- 108.177.15.189
- 216.58.204.4
- 216.58.201.5
- 216.58.206.45
- 216.58.206.78
- 216.58.213.110
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.204.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.45
- 216.58.206.78
- 216.58.213.110
- 216.58.208.142
- 216.58.198.238
- 216.58.206.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.78
- 216.58.204.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.45
- 216.58.206.78
- 216.58.213.110
- 216.58.208.142
- 216.58.198.238
- 216.58.206.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.204.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.45
- 216.58.206.78
- 216.58.213.110
- 216.58.208.142
- 216.58.198.238
- 216.58.206.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.204.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 216.58.206.46
- 216.58.213.110
- 172.217.17.46
- 216.58.204.4
- 216.58.206.78
- 216.58.206.45
- 216.58.198.110
- 216.58.206.110
- 216.58.201.5
- 216.58.198.174
- 216.58.213.110
- 216.58.206.46
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 216.58.206.46
- 216.58.213.110
- 216.58.198.238
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 216.58.206.46
- 216.58.213.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 216.58.206.46
- 216.58.213.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.214.14
- 216.58.213.110
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 216.58.206.46
- 108.177.15.189
- 216.58.204.4
- 216.239.32.27
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.214.14
- 216.58.213.110
- 216.58.198.110
- 216.58.206.110
- 216.58.198.174
- 216.58.206.46
- 108.177.15.189
- 216.58.204.4
- 216.239.32.27
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
+ - 216.58.206.78
- 216.58.206.45
- 216.58.214.14
- 216.58.208.142
- 216.58.206.110
- 216.58.201.5
- 216.58.198.174
- 172.217.23.14
- 216.239.34.10
- 216.58.206.46
- 216.58.204.4
- 216.58.206.78
- 216.58.206.45
- 216.58.208.142
- 216.58.206.110
- 216.58.201.5
- 216.58.198.174
- 216.58.206.46
- 216.58.198.238
- 216.58.204.4
- 216.58.206.78
- 216.58.206.45
- 216.58.214.14
- 216.58.198.110
- 216.58.206.110
- 216.58.201.5
- 216.58.198.174
- 172.217.23.14
- 216.239.34.10
- 216.58.206.46
- 216.58.204.4
- 216.58.206.78
- 216.58.206.45
- 216.58.198.110
- 216.58.206.110
- 216.58.201.5
- 216.58.198.174
- 216.58.206.46
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.213.110
- 216.58.198.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.198.238
- 216.58.214.14
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 216.58.213.78
- 216.58.198.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.198.238
- 216.58.214.14
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 108.177.14.26
- 64.233.167.26
- 216.58.198.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 108.177.14.26
- 64.233.167.26
- 216.58.198.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 108.177.14.26
- 64.233.167.26
- 216.58.198.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.78
- 216.58.204.4
- 216.58.201.5
- 216.58.206.78
- 216.58.206.45
- 108.177.14.27
- 108.177.15.27
- 216.58.198.110
- 216.58.198.174
- 172.217.23.14
- 216.58.206.46
- 216.58.213.78
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
- 216.58.198.238
- 216.58.204.4
vhosts found:
@@ -52,7 +52,7 @@ Shodan results:
- Report generated on 2018-12-15 17:19:32.865421
+ Report generated on 2018-12-16 16:35:19.594086