Created
December 31, 2024 17:36
-
-
Save Pymmdrza/866eb8be815ec610e74c69262c5d89c5 to your computer and use it in GitHub Desktop.
Encrypted Python Source Code Files with Cython to c , pyd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# github.com/Pymmdrza | |
# Encrypt and Compiled Command need Install : cython + wheel after install pack run in Root path Your Project: | |
# python Encrypte_Python_Source_Code.py build_ext --inplace | |
# Output : Generated And Converetd all Python Source code to C lang + Encrypte File with format : .pyd | |
# ----------------------------------------------------------- | |
from setuptools import setup, Extension | |
from Cython.Build import cythonize | |
import os | |
modules = [] | |
# files in current | |
current = os.path.dirname(os.path.abspath(__file__)) | |
for file in os.listdir(current): | |
if file.endswith(".py"): | |
print(f"[+] {file} > {os.path.basename(file)}") | |
modules.append(os.path.basename(file)) | |
extensions = [ | |
Extension( | |
os.path.splitext(module)[0], | |
[module] | |
) for module in modules | |
] | |
setup( | |
name="Micro Record 4chain Team", | |
ext_modules=cythonize( | |
extensions, | |
compiler_directives={"language_level": "3"} | |
), | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment