Properly sorted IPs.

This commit is contained in:
Lee Baird 2019-01-12 15:49:05 -06:00
parent a54276f44d
commit c0861014f7
4 changed files with 7 additions and 6 deletions

View file

@ -6,7 +6,7 @@
* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *
* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *
* *
* theHarvester 3.0.6 v174 *
* theHarvester 3.0.6 v183 *
* Coded by Christian Martorella *
* Edge-Security Research *
* cmartorella@edge-security.com *

View file

@ -61,9 +61,9 @@ class MissingKey(Exception):
def __init__(self, identity_flag):
if identity_flag:
self.message = '\n\n\033[93m[!] Missing API key.\n\n \033[0m'
self.message = '\n\033[93m[!] Missing API key.\n \033[0m'
else:
self.message = '\n\n\033[93m[!] Missing CSE id.\n\n \033[0m'
self.message = '\n\033[93m[!] Missing CSE id.\n \033[0m'
def __str__(self):
return self.message

View file

@ -15,7 +15,7 @@ def banner():
print("* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *")
print("* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *")
print('* *')
print('* theHarvester 3.0.6 v174 *')
print('* theHarvester 3.0.6 v183 *')
print('* Coded by Christian Martorella *')
print('* Edge-Security Research *')
print('* cmartorella@edge-security.com *')

View file

@ -9,6 +9,7 @@
from lib import statichtmlgenerator
import datetime
import getopt
import ipaddress
import re
import stash
import time
@ -630,8 +631,8 @@ def start(argv):
else:
print('\n[*] IPs found: ' + str(len(all_ip)))
print('-------------------')
for ip in sorted(list(set(all_ip))):
print(ip)
ips = sorted(ipaddress.ip_address(line.strip()) for line in all_ip)
print('\n'.join(map(str, ips)))
if len(all_emails) == 0:
print('\n[*] No emails found.')