-
Notifications
You must be signed in to change notification settings - Fork 0
/
aro.py
97 lines (77 loc) · 3.12 KB
/
aro.py
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import sys
import base64
import json
class BaseZh_Encoder:
@staticmethod
def decode(string):
decoded_string = ""
for i, char in enumerate(string):
i2 = i % 4
if i2 == 0:
decoded_string += chr(30482 ^ ord(char))
elif i2 == 1:
decoded_string += chr(14551 ^ ord(char))
elif i2 == 2:
decoded_string += chr(22566 ^ ord(char))
else:
decoded_string += chr(ord(char) ^ 0xFFFF)
return decoded_string
def decode_and_add_18(encoded_string):
decoded_modified_string = base64.b64decode(encoded_string)
decoded_modified_string = bytes((x + 18) % 256 for x in decoded_modified_string)
return decoded_modified_string
def safe_base64_decode(s):
try:
return base64.b64decode(s).decode('latin-1')
except:
return s
def decode_all_base64_values(config):
for key, value in config.items():
if isinstance(value, str):
if value == "":
config[key] = "mkldec1"
else:
try:
decoded_value = base64.b64decode(safe_base64_decode(value)).decode('latin-1')
config[key] = decoded_value
except:
pass
elif isinstance(value, dict):
decode_all_base64_values(value)
def main():
if len(sys.argv) != 2:
print("Usage: python ar.py <file_path>")
sys.exit(1)
file_path = sys.argv[1]
try:
with open(file_path, 'r') as file:
encoded_string = file.read()
decrypted_json = decode_and_add_18(encoded_string)
# Parse JSON
config = json.loads(decrypted_json)
# Decrypt and decode values in the CONFIG object
decode_all_base64_values(config)
print("\n┌───────────────\n│𝗞𝟭 - 𝗗𝗘𝗖𝗢𝗗𝗘 (.aro)\n│bot: @mujta1nsshbot\n├───────────────")
try:
server_config = json.loads(config["CONFIG"]["Server"])
for key, value in server_config.items():
decrypted_value = BaseZh_Encoder.decode(value)
server_config[key] = decrypted_value
config["CONFIG"]["Server"] = json.dumps(server_config)
except:
pass
try:
ps_install_config = json.loads(config["CONFIG"]["PSInstall"])
for key, value in ps_install_config.items():
# Lakukan pemrosesan yang diperlukan di sini
pass
config["CONFIG"]["PSInstall"] = json.dumps(ps_install_config)
except:
pass
for key, value in config["CONFIG"].items():
print(f"│[☬] {key}: {value}")
print("├───────────────\n│[☬] 𝗚𝗥𝗢𝗨𝗣 : @mkldec \n│[☬] 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 : https://t.me/mkldec1\n└───────────────\n")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
main()