class Formatter:
def __init__(self):
pass
@staticmethod
def format(value, username="default_user", password="default_pass"):
try:
with open(value) as f:
lines = f.read().split('\n')
formatted_lines = []
for line in lines:
if line.strip():
parts = line.split(':')
if len(parts) == 2:
ip, port = parts
formatted_line = '{}:{}@{}:{}\n'.format(username, password, ip, port)
formatted_lines.append(formatted_line)
else:
print(f"wrong format and u r animal: {line}")
with open('formatted.txt', 'w') as f:
f.writelines(formatted_lines)
print("Gratz you did IT!")
except Exception as e:
print(f"An error has occured: {e}")
# add your shit proxy format
Formatter().format('proxy.txt', username="user", password="password")
thanks for the code Lol