{"id":25873179,"url":"https://github.com/arijsaaleh/python-obfuscator","last_synced_at":"2026-06-08T11:32:57.473Z","repository":{"id":279823082,"uuid":"940084196","full_name":"ArijSaaleh/python-obfuscator","owner":"ArijSaaleh","description":"This Python tool allows you to obfuscate Python scripts by renaming variables and functions into randomized or meaningless names, adding a layer of complexity and protection for intellectual property. ","archived":false,"fork":false,"pushed_at":"2025-02-27T16:19:55.000Z","size":4442,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T23:08:54.945Z","etag":null,"topics":["ast","astunparse","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArijSaaleh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-27T15:34:53.000Z","updated_at":"2025-02-27T16:21:36.000Z","dependencies_parsed_at":"2025-02-27T23:12:00.660Z","dependency_job_id":"94935102-efa1-4166-a749-0e32728e5800","html_url":"https://github.com/ArijSaaleh/python-obfuscator","commit_stats":null,"previous_names":["arijsaaleh/python-obfuscator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArijSaaleh/python-obfuscator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArijSaaleh%2Fpython-obfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArijSaaleh%2Fpython-obfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArijSaaleh%2Fpython-obfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArijSaaleh%2Fpython-obfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArijSaaleh","download_url":"https://codeload.github.com/ArijSaaleh/python-obfuscator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArijSaaleh%2Fpython-obfuscator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34061122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","astunparse","python"],"created_at":"2025-03-02T08:30:12.844Z","updated_at":"2026-06-08T11:32:57.465Z","avatar_url":"https://github.com/ArijSaaleh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Code Obfuscator and Deobfuscator\n\n## Project Overview\n\nThis Python tool allows you to obfuscate Python scripts by renaming variables and functions into randomized or meaningless names, adding a layer of complexity and protection for intellectual property. The tool can also reverse the obfuscation process using a saved mapping.\n\n### Features:\n- **Obfuscation**: Changes the variable and function names to obscure symbols.\n- **Deobfuscation**: Restores the obfuscated code to its original form using the saved mapping..\n- **Configurable via Command Line**: Choose between obfuscation or deobfuscation directly from the command line.\n\n## Installation\n\n1. Clone this repository to your local machine:\n    ```bash\n    git clone \u003crepo-url\u003e\n    cd python-obfuscator\n    ```\n\n2. Create a virtual environment and activate it:\n    - On **Windows**:\n        ```bash\n        python -m venv venv\n        venv\\Scripts\\activate\n        ```\n    - On **macOS/Linux**:\n        ```bash\n        python3 -m venv venv\n        source venv/bin/activate\n        ```\n\n3. Install the necessary dependencies:\n    ```bash\n    pip install astunparse\n    ```\n\n## Usage\n\nYou can obfuscate and deobfuscate Python files using this tool.\n\n### Obfuscating a Python Script:\n\n1. Run the following command to obfuscate a Python file:\n    ```bash\n    python obfuscator.py obfuscate \u003cyour-python-file.py\u003e\n    ```\n\n2. After obfuscation, the tool will print the obfuscated code to the console. It will also save a `mapping.json` file that stores the mapping between the original and obfuscated variable/function names.\n\n### Deobfuscating an Obfuscated Script:\n\n1. To deobfuscate the script, use the command:\n    ```bash\n    python obfuscator.py deobfuscate \u003cyour-obfuscated-file.py\u003e\n    ```\n\n2. The tool will use the `mapping.json` file to restore the original names.\n\n### Example\n\n#### Original Python Script (`script.py`):\n```python\ndef greet():\n    message = \"Hello, world!\"\n    print(message)\n\ngreet()\n```\n### Obfuscating\n```bash\n    python obfuscator.py obfuscate script.py\n```\n### Deobfuscating\n```bash\n    python obfuscator.py deobfuscate obfuscated_script.py\n```\n### License\nThis project is open-source and available under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farijsaaleh%2Fpython-obfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farijsaaleh%2Fpython-obfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farijsaaleh%2Fpython-obfuscator/lists"}