-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.py
More file actions
77 lines (64 loc) · 3.83 KB
/
build.py
File metadata and controls
77 lines (64 loc) · 3.83 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
import os
import json
import time
from main import checkProxy
from utils import log,log_error_p,log_info,log_success,logo
pathProxies = os.getcwd()+"/Input/proxy.txt"
pathGoodProxies = os.getcwd()+"/Output/goodProxy.txt"
pathBadProxies = os.getcwd()+"/Output/badProxy.txt"
while True:
logo("""
██████╗ ██████╗ ██████╗ ██╗ ██╗██╗ ██╗ ████████╗███████╗███████╗████████╗███████╗██████╗
██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝╚██╗ ██╔╝ ╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝██╔════╝██╔══██╗
██████╔╝██████╔╝██║ ██║ ╚███╔╝ ╚████╔╝ ██║ █████╗ ███████╗ ██║ █████╗ ██████╔╝
██╔═══╝ ██╔══██╗██║ ██║ ██╔██╗ ╚██╔╝ ██║ ██╔══╝ ╚════██║ ██║ ██╔══╝ ██╔══██╗
██║ ██║ ██║╚██████╔╝██╔╝ ██╗ ██║ ██║ ███████╗███████║ ██║ ███████╗██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ BY RAFAL6750
""")
log_info("1 | Proxy Tester")
log_info("2 | Settings")
option = input("Option: ")
if option == "1":
proxyListToCheck = []
with open(pathProxies,"r") as f:
for line in f:
proxyListToCheck.append(str(line).replace("\n",""))
with open("settings.json",'r') as f:
jsonLoad = json.load(f)
websiteUrl = jsonLoad['websiteUrl']
if len(proxyListToCheck) > 0:
checkedProxies = checkProxy(websiteUrl,proxyListToCheck)
goodProxies = checkedProxies[0]
badProxies = checkedProxies[1]
if len(goodProxies) > 0:
with open(pathGoodProxies,"w",encoding="UTF-8") as file:
for line in goodProxies:
file.write(line)
log_info(f"Saved {len(goodProxies)}/{len(proxyListToCheck)} working proxies")
if len(badProxies) > 0:
with open(pathBadProxies,"w",encoding="UTF-8") as file:
for line in badProxies:
file.write(line)
log_info(f"Saved {len(badProxies)} not working proxies")
optionGoBack = input("Press any key to go back: ")
os.system('cls')
else:
log_error_p(f"Fill /Input/proxy.txt")
optionGoBack = input("Press any key to go back: ")
os.system('cls')
if option == "2":
log_info(f"1 | Paste new websiteURL to test your proxies")
log_info(f"2 | Go Back")
optionNew = input("Option: ")
if optionNew == "1":
newWebsiteUrl = input("New websiteURL: ")
with open("settings.json",'r') as f:
data = json.load(f)
data['websiteUrl'] = newWebsiteUrl
with open("settings.json",'w') as f:
json.dump(data,f,indent=4)
log_success(f"New websiteURL saved")
time.sleep(2)
os.system('cls')
if optionNew == "2":
os.system('cls')