add the scripts

This commit is contained in:
a-bad-dev 2026-06-03 01:25:28 -03:00
commit fcecf1a04b
12 changed files with 490 additions and 0 deletions

35
cloakcatcher/extract_config.py Executable file
View file

@ -0,0 +1,35 @@
# extract_config.py
# Made by user333_
# Meant to be included with main.py
from ast import literal_eval
from sys import exit
CONFIG_FILE = "cloakcatcher.conf"
def extract_config() -> dict:
try:
with open(CONFIG_FILE, "r") as f:
config_data = f.read().strip()
config = literal_eval(config_data)
restructured_config = {
"username": config["cloakv4_username"],
"passwd": config["cloakv4_password"],
"address": config["server_ip"],
"port": config["server_port"],
"serverlist_url": config["serverlist_url"]}
return restructured_config
except Exception as e:
print(f"[WARNING] {CONFIG_FILE} is empty, missing, or incorrectly structured.")
return {}
if __name__ == "__main__":
raise Exception("[ERROR] You ran the wrong script, run main.py instead.")
exit(1)