Skip to content

Feature request: Add Windows support for code obfuscation. #3

@Robotz213

Description

@Robotz213

⚡️ Feature Request

1. Is your feature request related to a problem? Please describe.

Problems when obfuscating code on Windows due to the generated
_.pyd_ file.

2. Describe the solution you'd like Modify the files

standard.py
change line 100 so it is not limited only to Linux with .so and include a check via platform.system() to switch to .pyd

setup.py.template
change the last code block:

pyd_file = next(
    p
    for p in os.listdir(".")
    if p.startswith("codeenigma_runtime") and p.endswith(".pyd")
)
shutil.move(pyd_file, "codeenigma_runtime.so")

To:

if os.name != "nt":
    try:
        so_file = next(
            p
            for p in os.listdir(".")
            if p.startswith("codeenigma_runtime") and p.endswith(".so")
        )
        print(f"Stripping binary: {so_file}")
        subprocess.run(["strip", "-x", so_file], check=True)
    except Exception as e:
        print(f"[Warning] Could not strip shared object: {e}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions