diff --git a/discovery/trello.py b/discovery/trello.py index 297d57b8..14a6bae9 100644 --- a/discovery/trello.py +++ b/discovery/trello.py @@ -17,12 +17,13 @@ def __init__(self, word, limit): def do_search(self): try: - urly= "https://" + self.server + "/search?num=100&start=" + str(self.counter) + "&hl=en&meta=&q=site%3Atrello.com%20" + self.word + urly = "https://" + self.server + "/search?num=100&start=" + str( + self.counter) + "&hl=en&meta=&q=site%3Atrello.com%20" + self.word except Exception as e: print(e) headers = {'User-Agent': googleUA} try: - r=requests.get(urly,headers=headers) + r = requests.get(urly, headers=headers) time.sleep(getDelay()) except Exception as e: print(e) @@ -34,17 +35,18 @@ def get_emails(self): return rawres.emails() def get_urls(self): + print('\tSearching Trello Urls..') try: rawres = myparser.parser(self.totalresults, "trello.com") - urls = rawres.urls() + trello_urls = rawres.urls() visited = set() - for url in urls: - #iterate through urls gathered and visit them - if url not in visited: + for url in trello_urls: + # iterate through trello urls gathered and visit them, append text to totalresults + if url not in visited: # make sure visiting unique urls visited.add(url) self.totalresults += requests.get(url=url, headers={'User-Agent': googleUA}).text rawres = myparser.parser(self.totalresults, self.word) - return rawres.hostnames() + return rawres.hostnames(), trello_urls except Exception as e: print("Error occurred: " + str(e)) @@ -53,4 +55,4 @@ def process(self): self.do_search() time.sleep(getDelay()) self.counter += 100 - print("\tSearching " + str(self.counter) + " results..") \ No newline at end of file + print("\tSearching " + str(self.counter) + " results..") diff --git a/theHarvester.py b/theHarvester.py index 166a8e81..de20149a 100755 --- a/theHarvester.py +++ b/theHarvester.py @@ -102,6 +102,7 @@ def start(argv): limit = 500 all_ip = [] full = [] + trello_info = ([], False) dnsserver = "" for value in enumerate(opts): opt = value[1][0] @@ -375,7 +376,9 @@ def start(argv): search.process() emails = search.get_emails() all_emails.extend(emails) - hosts = search.get_urls() + info = search.get_urls() + hosts = info[0] + trello_info = (info[1], True ) all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, hosts, 'host', 'trello') @@ -573,10 +576,21 @@ def start(argv): pass else: host_ip.append(ip.lower()) - db = stash.stash_manager() db.store_all(word, host_ip, 'ip', 'DNS-resolver') + if trello_info[1] == True: #indicates user selected Trello + print("\033[1;33;40m \n[+] Urls found from Trello:") + print("------------------------------------") + trello_urls = trello_info[0] + if trello_urls == []: + print('\nNo trello urls found') + else: + total = len(trello_urls) + print(("\nTotal urls: " + str(total) + "\n")) + for url in sorted(list(set(trello_urls))): + print(url) + # DNS Brute force#################################################### dnsres = [] if dnsbrute == True: @@ -708,6 +722,8 @@ def start(argv): else: pass + + ################################################################### # Here i need to add explosion mode. # Tengo que sacar los TLD para hacer esto.