-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscript.py
More file actions
77 lines (52 loc) · 2.17 KB
/
script.py
File metadata and controls
77 lines (52 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import requests
import urllib.parse
from bs4 import BeautifulSoup
banner = '''
_______ _______ _______ _______ ___ _______ ___ __ __ __ _ ___ _
| || || || || | | | | || | | || | | || | | |
| ___|| _ || _ || ___|| | | ___| | || | | || |_| || |_| |
| | __ | | | || | | || | __ | | | |___ | || |_| || || _|
| || || |_| || |_| || || || |___ | ___| ___| || || _ || |_
| |_| || || || |_| || || |___ | || || | | || _ |
|_______||_______||_______||_______||_______||_______| |_______||_______||_| |__||___| |_|
Script by Agun
'''
blacklist = ['support.google.com', 'accounts.google.com']
print(banner)
dorks = input("Enter Your dork: ")
page_num = input(" Enter Page Number: ")
int_page_num = int(page_num)
mainurl = f"https://www.google.com/search?q={dorks}&start="
proxie = {
'http': "88.198.50.103:3128",
'http': "88.198.24.108:8080",
'http': "176.9.75.42:3128",
}
def single_scrap(url, page, proxie):
try:
request = requests.get(url+str(page), proxies=proxie).text
soup = BeautifulSoup(request, 'html.parser')
links = soup.findAll('a')
idnt = "&sa"
for x in links:
y = x['href']
if y.startswith("/url?q="):
gg = y.replace("/url?q=", "")
hr = gg.split("&sa=")
hk = hr[0]
gf = hk.split("//")[1]
k = gf.split("/")[0]
if k in blacklist:
pass
else:
enc = urllib.parse.unquote(hk)
print(enc)
out = open("output.txt", "a")
out.write(enc+"\n")
out.close()
except Exception:
pass
page = 0
for x in range(int_page_num):
single_scrap(mainurl, page, proxie)
page += 10