-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenc-rename.py
More file actions
45 lines (36 loc) · 1.34 KB
/
enc-rename.py
File metadata and controls
45 lines (36 loc) · 1.34 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
import requests
import json
def obfuscate_code_from_file(file_path):
with open(file_path, 'r', encoding='utf-8') as file:
source_code = file.read()
payload = {
"append_source": True,
"remove_docstrings": True,
"rename_nondefault_parameters": True,
"rename_default_parameters": False,
"preserve": "",
"source": source_code
}
headers = {
"Content-Type": "application/json",
"Origin": "https://pyob.oxyry.com",
"Referer": "https://pyob.oxyry.com/",
"User-Agent": "Mozilla/5.0 (Linux; Android 10)"
}
try:
response = requests.post("https://pyob.oxyry.com/obfuscate", headers=headers, json=payload)
response.raise_for_status()
# Ambil hasil obfuscasi dari key 'dest'
result = response.json()
obfuscated_code = result.get("dest", "")
# Simpan ke file baru
with open("output_obfuscated.py", "w", encoding="utf-8") as out:
out.write(obfuscated_code)
print("[✓] Obfuscate selesai! Hasil disimpan di: output_obfuscated.py")
except requests.RequestException as e:
print(f"[!] Gagal kirim ke server: {e}")
except Exception as e:
print(f"[!] Error lain: {e}")
if __name__ == "__main__":
file = input("Input File Source: ")
obfuscate_code_from_file(file)