-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProxy_Scanner.py
87 lines (77 loc) · 2.72 KB
/
Proxy_Scanner.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
#!/usr/bin/python3
import os, time, requests, sys, threading
from colorama import init, Fore
CheckVersion = str(sys.version)
init()
RED = Fore.RED
GREEN = Fore.GREEN
BLUE = Fore.BLUE
YELLOW = Fore.YELLOW
ORANGE = Fore.CYAN
RESET = Fore.RESET
def cls():
linux = 'clear'
windows = 'cls'
os.system([linux,windows][os.name == 'nt'])
cls()
def Logo():
from colorama import init, Fore
import sys, random, time
init()
clear = "\x1b[0m"
colors = [36, 32, 34, 35, 31, 37]
x = """
─┼─┼─╔═╗╦═╗╔═╗═╗ ╦╦ ╦ ╔═╗╔═╗╔═╗╔╗╔╔╗╔╔═╗╦═╗─┼─┼─
─┼─┼─╠═╝╠╦╝║ ║╔╩╦╝╚╦╝ ╚═╗║ ╠═╣║║║║║║║╣ ╠╦╝─┼─┼─
╩ ╩╚═╚═╝╩ ╚═ ╩ ╚═╝╚═╝╩ ╩╝╚╝╝╚╝╚═╝╩╚═
CS! : selecciona los proxys funcionales.
"""
for N, line in enumerate(x.split("\n")):
sys.stdout.write("\x1b[1;%dm%s%s\n" % (random.choice(colors), line, clear))
time.sleep(0.05)
Logo()
def xx(PROXY, url):
try:
sess = requests.session()
sess.proxies = {'http': PROXY}
sess.headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
' (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'}
aa = sess.get(url, timeout=5, proxies={'http': PROXY})
if aa.status_code == 200:
print (f'{YELLOW} {PROXY}' + f' {GREEN}Buena{RESET}')
with open('CSproxy.txt', 'a') as xX:
xX.write(PROXY + '\n')
else:
print (f"{ORANGE}{PROXY}" + f' {RED}Mala{RESET}')
except:
print (f'{ORANGE} {PROXY}' + f' {RED}Mala{RESET}')
def main():
try:
if '3.' in CheckVersion:
try:
fileproxy = input(" List Proxy ~# ")
except:
print(' [-] Error : Enter Your Proxy!')
sys.exit()
elif '2.' in CheckVersion:
try:
fileproxy = raw_input(" List Proxy ~# ")
except:
print(' [-] Error : Enter Your Proxy!')
sys.exit()
else:
print(' Unknown Python Version!')
except:
pass
sys.exit()
with open(fileproxy, 'r') as x:
prox = x.read().splitlines()
thread = []
for proxy in prox:
t = threading.Thread(target=xx, args=(proxy, 'https://instagram.com'))
t.start()
thread.append(t)
time.sleep(0.1)
for j in thread:
j.join()
main()