1 | | - | from bs4 import BeautifulSoup |
2 | | - | import re, requests |
| 1 | + | from googlesearch import search |
3 | 2 | | from insides.bcolors import bcolors |
4 | 3 | | |
5 | 4 | | |
| skipped 1 lines |
7 | 6 | | if _verbose != None: |
8 | 7 | | try: |
9 | 8 | | print(f"{bcolors.WARNING} -- Google Searching... [Pastebin & Throwbin]{bcolors.ENDC}") |
10 | | - | print(f"{bcolors.FAIL}!{bcolors.ENDC}"+"Google Search may not work properly.") |
11 | | - | print("") |
12 | | - | x = mail.replace("@", "%40") |
13 | | - | searchurlP="https://s.sudonull.com/?q=site%3Apastebin.com+intext%3A%22" |
14 | | - | u = (searchurlP+x+"%22") |
15 | | - | response = requests.get(u) |
16 | | - | html = response.content |
17 | | - | soup=BeautifulSoup(html,"html.parser") |
18 | | - | rgx = str(soup) |
19 | | - | urls = re.findall('http[s]?://pastebin.com(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+<', rgx) |
20 | | - | for x in range(len(urls)): |
21 | | - | p = urls[x].replace("<", "") |
22 | | - | print(f"{bcolors.OKGREEN}|-- {bcolors.ENDC}"+p) |
23 | | - | x = mail.replace("@", "%40") |
24 | | - | searchurlT="https://s.sudonull.com/?q=site%3Athrowbin.io+intext%3A%22" |
25 | | - | u = (searchurlT+x+"%22") |
26 | | - | response = requests.get(u) |
27 | | - | html = response.content |
28 | | - | soup=BeautifulSoup(html,"html.parser") |
29 | | - | rgx = str(soup) |
30 | | - | urls = re.findall('http[s]?://throwbin.io(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+<', rgx) |
31 | | - | for x in range(len(urls)): |
32 | | - | t = urls[x].replace("<", "") |
33 | | - | print(f"{bcolors.OKGREEN}|-- {bcolors.ENDC}"+t) |
| 9 | + | print(f"{bcolors.FAIL}!{bcolors.ENDC}"+"Google Search may not work properly.\n") |
| 10 | + | urls = search(f'site:throwbin.io intext:"{mail}"') + search(f'site:pastebin.com intext:"{mail}"') |
| 11 | + | if len(urls): |
| 12 | + | for x in urls: |
| 13 | + | print(f"{bcolors.OKGREEN}|-- {bcolors.ENDC}"+x) |
| 14 | + | else: |
| 15 | + | print(f"{bcolors.FAIL}No Google Search result found!{bcolors.ENDC}") |
34 | 16 | | except: |
35 | 17 | | print(f"{bcolors.FAIL}Google Search error!{bcolors.ENDC}") |
36 | 18 | | |