-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
61 lines (56 loc) · 1.47 KB
/
main.py
File metadata and controls
61 lines (56 loc) · 1.47 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
import requests
from colorama import Fore
def check_proxy(ip, port):
proxies = {
"http": f"http://{ip}:{port}",
"https": f"https://{ip}:{port}",
}
try:
response = requests.get("http://www.google.com", proxies=proxies, timeout=2)
if response.status_code == 200:
print(f"Proxy {ip}:{port} Valid!")
else:
print(f"Proxy {ip}:{port} Invalid.")
except requests.RequestException:
print(f"Proxy {ip}:{port} Invalid.")
def read_proxy_list(file_path):
try:
with open(file_path, "r") as file:
proxies = file.readlines()
return [proxy.strip() for proxy in proxies]
except FileNotFoundError:
print("File Not Found.")
return []
def main():
print(Fore.GREEN +"""
________$________
_______$_$_______
______$___$______
_____$_____$_____
____$_______$____
____$_______$____
____$_______$____
____$_______$____
____$_______$____
____$_______$____
____$_______$____
____$_______$____
____$_______$____
___$__$___$__$___
__$__$_$_$_$__$__
_$__$__$$$__$__$_
_$$$____$____$$$_
_$______$______$_
$_______$_______$
RexProxyChecker
""")
file_path = input(Fore.WHITE + "Proxy File Path: ")
proxy_list = read_proxy_list(file_path)
for proxy in proxy_list:
try:
ip, port = proxy.split(":")
check_proxy(ip, port)
except ValueError:
print(f"Invalid proxy format: {proxy}")
if __name__ == "__main__":
main()