forked from alpkeskin/mosint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Google search package integreted, 3rd partysearch website removed, code cleaned
- Loading branch information
1 parent
a9b6ceb
commit d1893cb
Showing
2 changed files
with
9 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,17 @@ | ||
from bs4 import BeautifulSoup | ||
import re, requests | ||
from googlesearch import search | ||
from insides.bcolors import bcolors | ||
|
||
|
||
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}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ prettytable==0.7.2 | |
anytree==2.8.0 | ||
beautifulsoup4==4.9.3 | ||
socialscan==1.4.1 | ||
googlesearch-python |