diff --git a/modules/Googling.py b/modules/Googling.py index 67f9409..c49dded 100644 --- a/modules/Googling.py +++ b/modules/Googling.py @@ -1,5 +1,4 @@ -from bs4 import BeautifulSoup -import re, requests +from googlesearch import search from insides.bcolors import bcolors @@ -7,29 +6,12 @@ def Googling(mail,_verbose=None): if _verbose != None: try: print(f"{bcolors.WARNING} -- Google Searching... [Pastebin & Throwbin]{bcolors.ENDC}") - print(f"{bcolors.FAIL}!{bcolors.ENDC}"+"Google Search may not work properly.") - print("") - x = mail.replace("@", "%40") - searchurlP="https://s.sudonull.com/?q=site%3Apastebin.com+intext%3A%22" - u = (searchurlP+x+"%22") - response = requests.get(u) - html = response.content - soup=BeautifulSoup(html,"html.parser") - rgx = str(soup) - urls = re.findall('http[s]?://pastebin.com(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+<', rgx) - for x in range(len(urls)): - p = urls[x].replace("<", "") - print(f"{bcolors.OKGREEN}|-- {bcolors.ENDC}"+p) - x = mail.replace("@", "%40") - searchurlT="https://s.sudonull.com/?q=site%3Athrowbin.io+intext%3A%22" - u = (searchurlT+x+"%22") - response = requests.get(u) - html = response.content - soup=BeautifulSoup(html,"html.parser") - rgx = str(soup) - urls = re.findall('http[s]?://throwbin.io(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+<', rgx) - for x in range(len(urls)): - t = urls[x].replace("<", "") - print(f"{bcolors.OKGREEN}|-- {bcolors.ENDC}"+t) + print(f"{bcolors.FAIL}!{bcolors.ENDC}"+"Google Search may not work properly.\n") + urls = search(f'site:throwbin.io intext:"{mail}"') + search(f'site:pastebin.com intext:"{mail}"') + if len(urls): + for x in urls: + print(f"{bcolors.OKGREEN}|-- {bcolors.ENDC}"+x) + else: + print(f"{bcolors.FAIL}No Google Search result found!{bcolors.ENDC}") except: print(f"{bcolors.FAIL}Google Search error!{bcolors.ENDC}") diff --git a/requirements.txt b/requirements.txt index 620f532..5641341 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ prettytable==0.7.2 anytree==2.8.0 beautifulsoup4==4.9.3 socialscan==1.4.1 +googlesearch-python \ No newline at end of file