-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproxies.py
103 lines (95 loc) · 3.97 KB
/
proxies.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
import os
import sys
import random
import time
import requests
def Print():
Cls = '\x1b[0m'
Colors = [37, 31, 32, 36, 30, 35, 34, 33]
Logo = '''
_____________
< Proxies Grabber >
-------------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
|_) _| |
__ \ _ \ | | | _ \ __| _ \ _` | _ \ __|
| | ( | | | __| __/ ( ( | ( | __/ |
_| _|\___/ _|_|_| \___|\___|\___/ \__,_|\___|_|
'''
for N, Line in enumerate(Logo.split('\n')):
sys.stdout.write('\x1b[1;%dm%s%s\n' % (random.choice(Colors), Line, Cls))
time.sleep(0.05)
def Clear():
linux = 'clear'
windows = 'cls'
os.system([linux, windows][os.name == 'nt'])
def Http_grab():
color_array = ['\033[31m', '\033[32m', '\033[33m', '\033[34m', '\033[35m', '\033[36m', '\033[37m', '\033[39m']
print(random.choice(color_array) + 'Grabbing Http Proxies')
time.sleep(1)
print(random.choice(color_array) + '.')
time.sleep(1)
print(random.choice(color_array) + '..')
time.sleep(1)
print(random.choice(color_array) + '....')
r = requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&country=all&ssl=all&anonymity=all').text.encode('utf-8')
with open('HTTP_Grabbed.txt', 'w') as op:
op.write(r.replace(b'\r\n', b'\n').decode('utf-8'))
Clear()
print(random.choice(color_array) + 'Grab Completed!' + '\n' + random.choice(color_array) + 'Restarting...!')
time.sleep(5)
def Socks5_grab():
color_array = ['\033[31m', '\033[32m', '\033[33m', '\033[34m', '\033[35m', '\033[36m', '\033[37m', '\033[39m']
print(random.choice(color_array) + 'Grabbing Socks5 Proxies')
time.sleep(1)
print(random.choice(color_array) + '.')
time.sleep(1)
print(random.choice(color_array) + '..')
time.sleep(1)
print(random.choice(color_array) + '....')
r = requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=10000&country=all&ssl=all&anonymity=all').text.encode('utf-8')
with open('SOCKS5_Grabbed.txt', 'w') as op:
op.write(r.replace(b'\r\n', b'\n').decode('utf-8'))
Clear()
print(random.choice(color_array) + 'Grab Completed!' + '\n' + random.choice(color_array) + 'Restarting...!')
time.sleep(5)
def Socks4_grab():
color_array = ['\033[31m', '\033[32m', '\033[33m', '\033[34m', '\033[35m', '\033[36m', '\033[37m', '\033[39m']
print(random.choice(color_array) + 'Grabbing Socks4 Proxies')
time.sleep(1)
print(random.choice(color_array) + '.')
time.sleep(1)
print(random.choice(color_array) + '..')
time.sleep(1)
print(random.choice(color_array) + '....')
r = requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=10000&country=all&ssl=all&anonymity=all').text.encode('utf-8')
with open('SOCKS4_Grabbed.txt', 'w') as op:
op.write(r.replace(b'\r\n', b'\n').decode('utf-8'))
Clear()
print(random.choice(color_array) + 'Grab Completed!' + '\n' + random.choice(color_array) + 'Restarting...!')
time.sleep(5)
while True:
Clear()
Print()
color_array = ['\033[31m', '\033[32m', '\033[33m', '\033[34m', '\033[35m', '\033[36m', '\033[37m', '\033[39m']
print(random.choice(color_array) + '[?]Enter The Proxy Type Number:' + '\n' + random.choice(color_array) + '[1]HTTP/S' + '\n' + random.choice(color_array) + '[2]SOCKS5' + '\n' + random.choice(color_array) + '[3]SOCKS4')
tYpe = input('> ')
if tYpe == '1':
Clear()
Http_grab()
elif tYpe == '2':
Clear()
Socks5_grab()
elif tYpe == '3':
Clear()
Socks4_grab()