class htmlgenerator: def __init__(self, word): self.domain = word def generatepreviousscanresults(self, previousscanresults): try: if previousscanresults[0]=='No results': html='''
Date | Domain | Plugin | Record type | Result | |
' + str(i) + " | " html += '' + str(i) + " | " html += '' + str(i) + " | " html += '' + str(i) + " | " html += '' + str(i) + " | " html += '
Date | Domain | Plugin | Record type | Result |
' + str(i[0]) + " | " html += '' + str(i[1]) + " | " html += '' + str(i[2]) + " | " html += '' + str(i[3]) + " | " html += '' + str(i[4]) + " | " html += '
''' return html except Exception as e: print('Error generating the previous scan results HTML code: ' + str(e)) def generatelatestscanresults(self, latestscanresults): try: html='''
Date | Domain | Plugin | Record type | Result |
' + str(i[0]) + " | " html += '' + str(i[1]) + " | " html += '' + str(i[2]) + " | " html += '' + str(i[3]) + " | " html += '' + str(i[4]) + " | " html += '
''' return html except Exception as e: print('Error generating the latest scan results HTML code: ' + str(e)) def beginhtml(self): html = '''
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 = '''
Domain | Date | Recordtype | Source | Total results |
' + str(i[0]) + " | " html += '' + str(i[1]) + " | " html += '' + str(i[2]) + " | " html += '' + str(i[3]) + " | " html += '' + str(i[4]) + " | " html += '
''' return html except Exception as e: print('Error generating scan statistics HTML code: ' + str(e))