-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathseen.py
214 lines (198 loc) · 9.31 KB
/
seen.py
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
##
# Github https://github.com/aDarkDev/Telegram-Seen
#
# By aDarkDev
#
# Telegram Seen
#
# Python 3
##
import requests , random , sys , threading , psutil , os
#=================================[PROXY]==========================================
def http():
hit = []
try:
zxcvv = requests.get("https://proxylist.geonode.com/api/proxy-list?limit=500&page=1&sort_by=lastChecked&sort_type=desc&protocols=http%2Chttps",timeout=8).json()["data"]
for okeys in zxcvv:
hit.append(okeys['ip']+":"+okeys['port'])
except:
pass
try:
r = requests.get("https://api.proxyscrape.com/v2/?request=getproxies&protocol=http&timeout=10000&country=all", allow_redirects=True)
r2 = requests.get("https://www.proxy-list.download/api/v1/get?type=http", allow_redirects=True)
r3 = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt", allow_redirects=True)
for x1 in r.content.decode().replace("\r",'').split("\n"):
hit.append(x1)
for x3 in r2.content.decode().replace("\r",'').split("\n"):
hit.append(x3)
for x4 in r3.content.decode().replace("\r",'').split("\n"):
hit.append(x4)
except:
r2 = requests.get("https://www.proxy-list.download/api/v1/get?type=http", allow_redirects=True)
r3 = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt", allow_redirects=True)
for x3 in r2.content.decode().replace("\r",'').split("\n"):
hit.append(x3)
for x4 in r3.content.decode().replace("\r",'').split("\n"):
hit.append(x4)
hit = set(hit)
hit = "\n".join(hit)
return hit.split()
def socks4():
hit = []
try:
zxcvv = requests.get("https://proxylist.geonode.com/api/proxy-list?limit=500&page=1&sort_by=lastChecked&sort_type=desc&protocols=socks4",timeout=8).json()["data"]
for okeys in zxcvv:
hit.append(okeys['ip']+":"+okeys['port'])
except:
pass
try:
r = requests.get("https://api.proxyscrape.com/v2/?request=getproxies&protocol=socks4&timeout=10000&country=all", allow_redirects=True)
r2 = requests.get("https://www.proxy-list.download/api/v1/get?type=socks4", allow_redirects=True)
r3 = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt", allow_redirects=True)
for x1 in r.content.decode().replace("\r",'').split("\n"):
hit.append(x1)
for x3 in r2.content.decode().replace("\r",'').split("\n"):
hit.append(x3)
for x4 in r3.content.decode().replace("\r",'').split("\n"):
hit.append(x4)
except:
r2 = requests.get("https://www.proxy-list.download/api/v1/get?type=socks4", allow_redirects=True)
r3 = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt", allow_redirects=True)
for x3 in r2.content.decode().replace("\r",'').split("\n"):
hit.append(x3)
for x4 in r3.content.decode().replace("\r",'').split("\n"):
hit.append(x4)
hit = set(hit)
hit = "\n".join(hit)
return hit.split()
def socks5():
hit = []
try:
zxcvv = requests.get("https://proxylist.geonode.com/api/proxy-list?limit=50&page=1&sort_by=lastChecked&sort_type=desc&protocols=socks5",timeout=8).json()["data"]
for okeys in zxcvv:
hit.append(okeys['ip']+":"+okeys['port'])
except:
pass
try:
r = requests.get("https://api.proxyscrape.com/v2/?request=getproxies&protocol=socks5&timeout=10000&country=all", allow_redirects=True)
r2 = requests.get("https://www.proxy-list.download/api/v1/get?type=socks5", allow_redirects=True)
r3 = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks5.txt", allow_redirects=True)
for x1 in r.content.decode().replace("\r",'').split("\n"):
hit.append(x1)
for x3 in r2.content.decode().replace("\r",'').split("\n"):
hit.append(x3)
for x4 in r3.content.decode().replace("\r",'').split("\n"):
hit.append(x4)
except:
r2 = requests.get("https://www.proxy-list.download/api/v1/get?type=socks5", allow_redirects=True)
r3 = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks5.txt", allow_redirects=True)
for x3 in r2.content.decode().replace("\r",'').split("\n"):
hit.append(x3)
for x4 in r3.content.decode().replace("\r",'').split("\n"):
hit.append(x4)
hit = set(hit)
hit = "\n".join(hit)
return hit.split()
#=================================[DEF]==========================================
def socks4_start(link):
global proxy_4, count, req_count
while proxy_4 != []:
if req_count >= int(count):
p = psutil.Process(os.getpid())
p.terminate()
proxy = random.choice(proxy_4)
try:
session = requests.session()
session.proxies.update({'http': f'socks4://{proxy}', 'https': f'socks4://{proxy}'})
session.headers.update({
'accept-language': 'en-US,en;q=0.9',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36',
'x-requested-with': 'XMLHttpRequest'
})
main_res = session.get(link)
_token = main_res.text.split('data-view="')[1].split('"')[0]
views_req = session.get("https://t.me/v/?views=" + _token)
print(' [+] View Sent ' + 'Stats Code: '+str(views_req.status_code))
proxy_4.remove(proxy)
req_count += 1
except:
pass
def socks5_start(link):
global proxy_5, count, req_count
while proxy_5 != []:
if req_count >= int(count):
p = psutil.Process(os.getpid())
p.terminate()
proxy = random.choice(proxy_5)
try:
session = requests.session()
session.proxies.update({'http': f'socks5://{proxy}', 'https': f'socks5://{proxy}'})
session.headers.update({
'accept-language': 'en-US,en;q=0.9',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36',
'x-requested-with': 'XMLHttpRequest'
})
main_res = session.get(link)
_token = main_res.text.split('data-view="')[1].split('"')[0]
views_req = session.get("https://t.me/v/?views=" + _token)
print(' [+] View Sent ' + 'Stats Code: '+str(views_req.status_code))
proxy_5.remove(proxy)
req_count += 1
except:
pass
def http_start(link):
global proxy_h , count , req_count
while proxy_h != []:
if req_count >= int(count):
p = psutil.Process(os.getpid())
p.terminate()
proxy = random.choice(proxy_h)
try:
session = requests.session()
session.proxies.update({'http': f'http://{proxy}', 'https': f'http://{proxy}'})
session.headers.update({
'accept-language': 'en-US,en;q=0.9',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36',
'x-requested-with': 'XMLHttpRequest'
})
main_res = session.get(link)
_token = main_res.text.split('data-view="')[1].split('"')[0]
views_req = session.get("https://t.me/v/?views=" + _token)
print(' [+] View Sent ' + 'Stats Code: '+str(views_req.status_code))
proxy_h.remove(proxy)
req_count += 1
except:
pass
#=================================[START]==========================================
try:
count = sys.argv[3]
req_count = 0
link = sys.argv[1].strip().replace('https://', '').replace('http://', '')
url_fin = f'https://{link}?embed=1'
if sys.argv[2] == "socks4":
proxy_4 = socks4()
for ii in range(600):
threading.Thread(target=socks4_start,args=(url_fin,)).start()
elif sys.argv[2] == "socks5":
proxy_5 = socks5()
for ii in range(600):
threading.Thread(target=socks5_start,args=(url_fin,)).start()
elif sys.argv[2] == "http":
proxy_h = http()
for ii in range(600):
threading.Thread(target=http_start,args=(url_fin,)).start()
elif sys.argv[2] == "mix":
proxy_h = http()
proxy_5 = socks5()
proxy_4 = socks4()
for ii in range(600):
threading.Thread(target=http_start,args=(url_fin,)).start()
for ii in range(600):
threading.Thread(target=socks5_start,args=(url_fin,)).start()
for ii in range(600):
threading.Thread(target=socks4_start,args=(url_fin,)).start()
except Exception as e:
print(e)
print("""Error . Help : python3 seen.py <link> <type> <count>
Types : http , socks4 , socks5 , mix
""")