class htmlgenerator: def __init__(self, word): self.domain = word def generatepreviousscanresults(self, previousscanresults): try: if previousscanresults[0]=='No results': html='''

Previous scan report

 

''' for i in previousscanresults: html += '" html += '" html += '" html += '" html += '" html += '' else: html = '''

Previous scan report

 

Date Domain Plugin Record type Result
' + str(i) + "' + str(i) + "' + str(i) + "' + str(i) + "' + str(i) + "
''' for i in previousscanresults: html += '" html += '" html += '" html += '" html += '" html += '' html += '''
Date Domain Plugin Record type Result
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "

 

 

 

 

''' return html except Exception as e: print('Error generating the previous scan results HTML code: ' + str(e)) def generatelatestscanresults(self, latestscanresults): try: html='''

Latest scan report

 

''' for i in latestscanresults: html += '" html += '" html += '" html += '" html += '" html += '' html += '''
Date Domain Plugin Record type Result
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "

 

 

 

 

''' return html except Exception as e: print('Error generating the latest scan results HTML code: ' + str(e)) def beginhtml(self): html = '''

theHarvester Scan Report

''' return html def generatedashboardcode(self, scanboarddata): try: totalnumberofdomains = scanboarddata['domains'] totalnumberofhosts = scanboarddata['host'] totalnumberofip = scanboarddata['ip'] totalnumberofvhost= scanboarddata['vhost'] totalnumberofemail= scanboarddata['email'] totalnumberofshodan= scanboarddata['shodan'] html='''

Scan dashboard

Domains

Hosts

IP Addresses

Vhosts

Emails

Shodan

'''+str(totalnumberofdomains)+'''

'''+str(totalnumberofhosts)+'''

'''+str(totalnumberofip)+'''

'''+str(totalnumberofvhost)+'''

'''+str(totalnumberofemail)+'''

'''+str(totalnumberofshodan)+'''

 

 

''' return html except Exception as e: print('Error generating dashboard HTML code: ' + str(e)) def generatepluginscanstatistics(self, scanstatistics): try: html = '''

theHarvester plugin statistics

 

''' for i in scanstatistics: html += '" html += '" html += '" html += '" html += '" html += '' html += '''
Domain Date Recordtype Source Total results
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "

 

 

''' return html except Exception as e: print('Error generating scan statistics HTML code: ' + str(e))