class htmlgenerator: def __init__(self,word): self.domain = word def generatelatestscanresults(self, latestscanresults): try: html='''

theHarvester Scan Report

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 =''' ''' 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)) def generatescandetailsdomain(self, word, latestscandomain): #This is the old scan details try: emails = latestscandomain['scandetailsemail'] hosts = latestscandomain['scandetailshost'] ips = latestscandomain['scandetailsip'] vhosts = latestscandomain['scandetailsvhost'] shodans = latestscandomain['scandetailsshodan'] html='''

 

 

Latest scan details for '''+ word + ''' on: '''+str(latestscandomain['latestdate'])+'''

Emails found:

Hosts found:

IP found:

vhosts found:

Shodan results:

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