{"id":36453898,"url":"https://github.com/devopifex/obfuscator","last_synced_at":"2026-01-11T23:00:56.209Z","repository":{"id":293564853,"uuid":"878025961","full_name":"devOpifex/obfuscator","owner":"devOpifex","description":"R code obfuscator","archived":false,"fork":false,"pushed_at":"2025-05-16T00:55:15.000Z","size":176,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T01:22:53.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devOpifex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.go","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,"zenodo":null}},"created_at":"2024-10-24T16:41:22.000Z","updated_at":"2025-05-16T00:55:19.000Z","dependencies_parsed_at":"2025-05-16T01:32:58.894Z","dependency_job_id":null,"html_url":"https://github.com/devOpifex/obfuscator","commit_stats":null,"previous_names":["devopifex/obfuscator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/devOpifex/obfuscator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devOpifex%2Fobfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devOpifex%2Fobfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devOpifex%2Fobfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devOpifex%2Fobfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devOpifex","download_url":"https://codeload.github.com/devOpifex/obfuscator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devOpifex%2Fobfuscator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28326166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-11T23:00:42.151Z","updated_at":"2026-01-11T23:00:56.192Z","avatar_url":"https://github.com/devOpifex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![obfuscator](obfuscator.png)\n\nA tool to obfuscate R code by renaming variables, functions, and file names while preserving functionality.\n\n\u003e [!WARNING]\n\u003e This tool only obfuscates code and does not encrypt it.\n\u003e Obfuscation is not a security measure and should not be relied upon to protect \n\u003e sensitive code or intellectual property.\n\u003e The obfuscated code can potentially be reverse-engineered.\n\u003e Do not use this tool with the expectation that it makes your code secure to share.\n\n## Installation\n\n```bash\ngo install github.com/devOpifex/obfuscator@latest\n```\n\nOr see the [releases](https://github.com/devOpifex/obfuscator/releases/latest) page for pre-built binaries.\n\nYou can also build from source:\n\n```bash\ngit clone https://github.com/devOpifex/obfuscator.git\ngo build\n```\n\n## Usage\n\n```\n$\u003e obfuscator -h\nUsage of obfuscator:\n  -deobfuscate\n        Deobfuscate the obfuscated files\n  -in string\n        Directory of R files to obfuscate\n  -key string\n        Key to obfuscate\n  -license string\n        License to prepend to every obfuscated file, e.g.: license\n  -out string\n        Directory where to write the obfuscated files\n  -protect string\n        Comma separated protected tokens, e.g.: foo,bar\n```\n\n**Basic Obfuscation:**\n\n```bash\nobfuscator -in=R -out=obfuscated -key=secret\n```\n\n**With License and Protected Tokens:**\n\n```bash\nobfuscator -in=R -out=obfuscated -key=secret -license=license.txt -protect=myFunction,importantVar\n```\n\n**Deobfuscation:**\n\n```bash\nobfuscator -deobfuscate -in=obfuscated -out=deobfuscated -key=secret\n```\n\n### Example\n\nTurn this:\n\n```r\nfoo \u003c- \\(x) {\n  x + 1\n}\n\nbar \u003c- \\(x) {\n  foo(x)\n}\n\nbaz \u003c- \\(x) {\n  bar(x)\n}\n\nbaz(42)\n```\n\nInto this:\n\n```r\nfOAaPAYPA=\\(xOA){xOA+0x1;};bOAMPAbPA=\\(xOA){fOAaPAYPA(xOA);};bOAMPAjPA=\\(xOA){bOAMPAbPA(xOA);};bOAMPAjPA(0x2a);\n```\n\n### Parameter Details\n\nSee `obfuscator -h` for more details.\n\n- **-in**: Source directory containing R files to process\n- **-out**: Destination directory for processed files\n- **-key**: Encryption key used for the obfuscation algorithm\n- **-license**: Path to a text file containing license information to add to each file\n- **-protect**: Comma-separated list of identifiers that should not be obfuscated\n- **-deobfuscate**: Flag to reverse the obfuscation process\n\n## Limitations and Caveats\n\n### Code Structure Requirements\n\n- **If statements** must include curly braces:\n  - ❌ `if(TRUE) 1 else 0`\n  - ✅ `if(TRUE) {1} else {0}`\n\n- **Lambda functions** must include curly braces:\n  - ❌ `\\(x) x + 1`\n  - ✅ `\\(x) {x + 1}`\n\n- **Expressions in curly braces** outside of standard control structures are not supported:\n  - ❌ `tryCatch({x + 1})`\n  - ✅ `fn \u003c- \\(){x + 1}; tryCatch(fn())`\n\n### Obfuscation Exceptions\n\n- The names of functions starting with a dot (e.g., `.onLoad`) are **not obfuscated**\n- File names starting with `__` are **not renamed** (but their content is still obfuscated)\n- Only files witht the `.R` extension are processed\n- Arguments to `do.call()` are **not obfuscated** - consider alternatives\n\n### Best Practices\n\n- Use a consistent and secure key for obfuscation/deobfuscation\n- Keep a backup of your original code\n- Test obfuscated code thoroughly before distribution\n- Use the `-protect` flag for functions that must maintain their original names\n\n## How It Works\n\nThe obfuscator works by:\n1. Parsing R code to identify variables, functions, and other identifiers\n2. Generating obfuscated names based on the provided key\n3. Consistently replacing identifiers throughout the codebase\n4. Preserving the functionality while making the code harder to read\n\n_You may want to use the Go modules to lex, or parse R code too._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopifex%2Fobfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevopifex%2Fobfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopifex%2Fobfuscator/lists"}