0sir1ss / Anubis

[UNMAINTAINED] A Python script to obfuscate and protect your code through anti debuggers, junk code and custom encryption.
MIT License
308 stars 38 forks source link

PROJECT DIRECTORIES #10

Open navin-hariharan opened 1 year ago

navin-hariharan commented 1 year ago

Hi, I'd like to obfuscate my whole python folder including all imports from other obfuscated .py scripts! How can I do this?

Pranavprana commented 1 year ago

edit the code

Pranavprana commented 1 year ago
print(" ")
path = os.getcwd()

print(path)

for file in glob.glob(path+"\*.py"):
    print(file)
    key = base64.b64encode(os.urandom(32)).decode()
    with open(file, "r", encoding='utf-8') as f:
        src = f.read()

    if junk:
        src = anubis(src)
    if bug:
        src = bugs(src)
    if junk:
        src = anubis(src)
    if carbonate:
        src = carbon(src)
    if oxy:
        src = oxyry(src)
    if extra:
        src = Encryption(key.encode()).write(key, src)
    if not os.path.isdir("./obsc"):
        os.mkdir("./obsc")
        time.sleep(1)
    FFile = file.split("\\")[-1]
    name = f"{os.getcwd()}/obsc/{FFile}"
    with open(name, "w", encoding='utf-8') as f:
        f.write(src)
elmoiv commented 5 months ago

@navin-hariharan You can use stickytape to convert your project to one file by this command:

stickytape projectFolder/main.py --add-python-path projectFolder --output-file output.py

Then use Anubis at output.py