├── README.md ├── pycdas.exe ├── pycdc.exe └── spectered.py /README.md: -------------------------------------------------------------------------------- 1 | # Spectered 2 | 3 | NB: Certains caractères spéciaux peuvent ne pas s'afficher dans le rendu final 4 | -------------------------------------------------------------------------------- /pycdas.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDRALOU/Spectered/31f614a272be1eff8bb04bf778c6b24e54725a78/pycdas.exe -------------------------------------------------------------------------------- /pycdc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDRALOU/Spectered/31f614a272be1eff8bb04bf778c6b24e54725a78/pycdc.exe -------------------------------------------------------------------------------- /spectered.py: -------------------------------------------------------------------------------- 1 | import importlib 2 | import os 3 | 4 | file_obf_name = input("Enter the name of obfuscated file: ") 5 | content = open(file_obf_name).read() 6 | content = content.replace("if __name__ == '__main__':", "") 7 | content = content.replace(" Specter(__code__) ,exec", "code_obj=") 8 | content = content.replace(",globals()", "") 9 | 10 | with open("to_deob.py", "w") as file: 11 | file.write(content) 12 | 13 | from to_deob import code_obj 14 | 15 | loader = importlib.machinery.SourceFileLoader('', file_obf_name) 16 | source_bytes = loader.get_data(file_obf_name) 17 | source_hash = importlib.util.source_hash(source_bytes) 18 | bytecode = importlib._bootstrap_external._code_to_hash_pyc(code_obj, source_hash) 19 | 20 | with open(f"to_deob2.pyc", "wb") as file: 21 | file.write(bytecode) 22 | 23 | os.system("pycdc to_deob2.pyc > to_deob2.txt") 24 | os.system("pycdas to_deob2.pyc > result.txt") 25 | 26 | with open("result.txt") as file: 27 | lines = file.read().splitlines() 28 | for line in lines: 29 | if " 16 LOAD_CONST 0: " in line: 30 | line_key = line.replace(" 16 LOAD_CONST 0: ", "") 31 | key = line_key.replace("b'", "").replace("'", "") 32 | 33 | with open("to_deob2.txt") as file: 34 | lines = file.read().splitlines() 35 | n_v = lines[4].split(" = ") 36 | n_v[0] = n_v[0].replace("(", "").replace(")", "") 37 | n_v[1] = n_v[1].replace("(", "").replace(")", "") 38 | names = n_v[0].split(", ") 39 | values = n_v[1].split(", ") 40 | for name, value in zip(names, values): 41 | globals()[name] = value.replace("b'", "").replace("'", "") 42 | 43 | codes_crypted = [] 44 | for line in lines[10:]: 45 | codes_crypted.append(line.replace(" ", "").replace(",", "").replace("])", "")) 46 | 47 | code = "" 48 | 49 | for code_crypted in codes_crypted: 50 | for l3 in globals()[code_crypted].split('\\x00'): 51 | if l3.isdigit(): 52 | code += ''.join(chr(int(l3)-int(key))) 53 | 54 | code = code.replace("\n", "").replace("\\n", "").replace("""# GG! You just deobfuscated Specter# https://github.com/billythegoat356/Specter# by billythegoat356# join discord.gg/plague for more Python tools!try: if ( __author__ != "billythegoat356" or __github__ != "https://github.com/billythegoat356/Specter" or __discord__ != "https://discord.gg/plague" or __license__ != "EPL-2.0" or __code__ != "Hello world!" or "Specter" not in globals() or "Func" not in globals() ): int('skid')except: input("You just executed a file obfuscated with Specter!Author: billythegoat356GitHub: https://github.com/billythegoat356/SpecterDiscord: https://discord.gg/plague") __import__('sys').exit() """, "") 55 | 56 | code = "# Deobfuscated with Spectered (https://github.com/IDRALOU/Spectered)\n\n" + code + "\n# Deobfuscated with Spectered (https://github.com/IDRALOU/Spectered)" 57 | 58 | with open("deob.py", "w", errors="ignore") as file: 59 | file.write(code) 60 | 61 | os.remove("to_deob.py") 62 | os.remove("to_deob2.pyc") 63 | os.remove("to_deob2.txt") 64 | os.remove("result.txt") 65 | 66 | print() 67 | input("Finished") 68 | --------------------------------------------------------------------------------