{"id":19847145,"url":"https://github.com/polidea/siriusobfuscator","last_synced_at":"2025-09-11T22:32:12.893Z","repository":{"id":149642215,"uuid":"130369017","full_name":"Polidea/SiriusObfuscator","owner":"Polidea","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-23T15:52:53.000Z","size":106771,"stargazers_count":475,"open_issues_count":26,"forks_count":63,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-07-09T15:50:27.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/Polidea.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}},"created_at":"2018-04-20T13:54:29.000Z","updated_at":"2025-07-02T08:14:59.000Z","dependencies_parsed_at":"2024-01-15T15:25:42.180Z","dependency_job_id":null,"html_url":"https://github.com/Polidea/SiriusObfuscator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Polidea/SiriusObfuscator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polidea%2FSiriusObfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polidea%2FSiriusObfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polidea%2FSiriusObfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polidea%2FSiriusObfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polidea","download_url":"https://codeload.github.com/Polidea/SiriusObfuscator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polidea%2FSiriusObfuscator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274717736,"owners_count":25336958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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":[],"created_at":"2024-11-12T13:13:30.664Z","updated_at":"2025-09-11T22:32:07.873Z","avatar_url":"https://github.com/Polidea.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sirius - Swift Obfuscator\n\n## Overview\n\nSirius is a tool for performing source-to-source obfuscation of Swift projects.\n\nBasically, it transforms your code from this:\n\n```swift\nclass Sample: UIViewController {\n  var value = 42\n  \n  override func viewDidLoad() {\n    super.viewDidLoad()\n    configure()\n    foo(bar: 1)\n  }\n  \n  func foo(bar baz: Int) {\n    value += baz\n  }\n}\n\nprotocol Configurable {\n  func configure()\n}\n\nextension Sample: Configurable {\n  func configure() { }\n}\n```\n\nto this:\n\n```swift\nclass aqoxMfcPUXffEuurviH_ZPMDW2hCmXDR: UIViewController {\n  var a0vLRcFFAQ1Lvw2sf4ZIigWKjXjpJpug = 42\n  \n  override func viewDidLoad() {\n    super.viewDidLoad()\n    A6PP2E5mcmjEsgOvTeXwy2G44vzYLa6H()\n    xG1qrXIMEJC1Eoma2Qbp_ZWJ5y2lrGYX(KuT5vOLIISvSJyju6bYxsHO_vlWUU589: 1)\n  }\n  \n  func xG1qrXIMEJC1Eoma2Qbp_ZWJ5y2lrGYX(KuT5vOLIISvSJyju6bYxsHO_vlWUU589 vjCKgTT7Cf0ZlEi9giLZstzgdC9XLQcd: Int) {\n    a0vLRcFFAQ1Lvw2sf4ZIigWKjXjpJpug += vjCKgTT7Cf0ZlEi9giLZstzgdC9XLQcd\n  }\n}\n\nprotocol dVUt_HSz_a1q1JsbyTJVfk0KeXej8a4z {\n  func A6PP2E5mcmjEsgOvTeXwy2G44vzYLa6H()\n}\n\nextension aqoxMfcPUXffEuurviH_ZPMDW2hCmXDR: dVUt_HSz_a1q1JsbyTJVfk0KeXej8a4z {\n  func A6PP2E5mcmjEsgOvTeXwy2G44vzYLa6H() { }\n}\n\n```\nThe resulting obfuscated project is much more difficult to reverse engineer by the attacker.\n\n## Usage\n\n1. Get latest `sirius` executable from [here](https://github.com/Polidea/SiriusObfuscator/releases).\n\n2. Run:\n\n```bash\n$ bin/sirius -projectrootpath \u003cpath-to-xcode-project\u003e -obfuscatedproject `\u003cpath-for-obfuscated-project\u003e` [-namemappingstrategy \u003cname-mapping-strategy\u003e] [-keepintermediates] [-inplace] [-verbose]\n```\nwhere\n\n`\u003cpath-to-xcode-project\u003e` is a path to Xcode project root folder. It's the folder that contains both the Xcode project file (.xcodeproj or .xcworkspace) and the source files. It is passed to `file-extractor` tool.\n\n`\u003cpath-for-obfuscated-project\u003e` is the path to the directory that the newly generated obfuscated Swift source code files will be written to, as well as the new project. Is is passed to `renamer` tool.\n\nIn case when project should be obfuscated in place (without making a copy), `-inplace` argument can be used instead of `-obfuscatedproject`.\n\n`\u003cname-mapping-strategy\u003e` is the optional parameter of type enum string. Is is passed to `name-mapper` tool. Is determines, which of the following strategies is used when generating the obfuscated symbol names:\n\n* `random` strategy generates random alphanumeric strings of length 32, e.g. `gnxWyHU0uN3bXejy8bVAoNbyfg4gRuN8`.\n* `deterministic` strategy generates deterministic renames based on symbol's original name, e.g. `T1_RootViewController`.\n* `minifying` strategy generates strings as short as possible, e.g. `a`.\n\nWhen the `-namemappingstrategy` parameter is not provided, the default `random` strategy is used.\n\n`-keepintermediates` is the optional flag. When present, the interemediate files used to pass the necessary info between the tools invoked by _ObfuscatorTool_ (`files.json`, `symbols.json`, `renames.json`) will not be removed after successful obfuscation process.\n\n`-verbose` is the optional flag. When present, the flag is passed to each tool invoked by _ObfuscatorTool_ and all debug info messages from each tool are printed to standard output.\n\n### Verification\n\nVerify the outcome of the obfuscation by opening the obfuscated project in Xcode. Use `verification-suite` and [Hopper](https://www.hopperapp.com) to check symbol names in mach-O file built from the obfuscated project.\n\n\n## Motivation\n\nThis project was developed for a particular iOS app that we needed to obfuscate. It is therefore a non-generalizable tool designed to solve the problem of obfuscating the single source code.\n\nIt shows, however, how the Swift compiler might be used as a library for building the powerful and flexible developer tools. \n\nThe app that motivated the development of Sirius is using:\n\n- Swift 4.0 only (no Objective-C)\n- Cocoapods\n- `.storyboard` files\n- CoreData\n\nIf your app has the same set of characteristics, we encourage you to try to obfuscate it. It may or may not work, depending on the Swift language constructs that you used.\n\n## Limitations\n\nSirius is not production-ready. Some code constructs that are allowed in Swift, won't be properly renamed by Sirius. This might lead to obfuscated project that is not compiling or crashes at runtime.\n\nSome code constructs that are not yet supported:\n\n* Backticks\n```swift\nfunc `backticksName`() {}\n```\n* `#if #else #endif` preprocessor macros\n* Old Swift selectors\n```swift\nlet foo = Selector((\"bar:\"))\n```\n\nSymbols that won't be renamed by Sirius even though they are visible in mach-O binary:\n\n* Enum associated values\n```swift\nenum EnumWithAssoc {\n  case1(assoc: Int)\n}\n```\n\nFor more examples of unsupported constructs head [here](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer/tree/master/swift/test/Obfuscation/FullProcess).\n\nFor constructs that are deliberately excluded from renaming head [here](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer/blob/master/Documentation/ThingsThatAreNotObfuscated.md).\n\n## Components\n\nThe Sirius - Swift Obfuscator suite consists of command line tools organized in repositories:\n\nRepository | Tool | Overview\n--- | --- | ---\n[ObfuscatorTool](https://github.com/Polidea/SiriusObfuscator) | `sirius` | Umbrella tool that exposes the unified command line interface to perform the obfuscation of Xcode project. It executes tools: `file-extractor`, `symbol-extractor`, `name-mapper`, `renamer` and passes the intermediate files between them.\n[FileExtractor](https://github.com/Polidea/SiriusObfuscator-FileExtractor) | `file-extractor` | Extracts the data about Xcode project based on the root project's path (e.g. the list of `.swift` source files, the list of frameworks required to build the project) to `files.json`.\n[SymbolExtractorAndRenamer](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer) | `symbol-extractor` | Extracts symbols from `.swift` source files to `symbols.json`.\n[SymbolExtractorAndRenamer](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer) | `name-mapper` | Generates the new names for the symbols provided in `symbols.json`.\n[SymbolExtractorAndRenamer](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer) | `renamer` | Performs the renaming of symbols based on `renames.json`.\n[VerificationSuite](https://github.com/Polidea/SiriusObfuscator-VerificationSuite) | `verification-suite` | Tool for presenting the changes made in obfuscation process.\n\n## Contributing\n\n### Contributing to main command line tool (`sirius`)\n\nIf you wish to contribute to `sirius` (umbrella command line tool), head to [BuildNotes](https://github.com/Polidea/SiriusObfuscator/blob/master/Documentation/BuildNotes.md) and [GettingStarted](https://github.com/Polidea/SiriusObfuscator/blob/master/Documentation/GettingStarted.md).\n\n### Contributing to other tools from Sirius suite\n\nIf you wish to contribute to other tools from Sirius - Swift Obfuscator suite, head to the repositories:\n\n* [FileExtractor](https://github.com/Polidea/SiriusObfuscator-FileExtractor) ( [BuildNotes](https://github.com/Polidea/SiriusObfuscator-FileExtractor/blob/master/README.md#build-notes-for-developers) [GettingStarted](https://github.com/Polidea/SiriusObfuscator-FileExtractor/blob/master/Documentation/GettingStarted.md) [ImportantTopics](https://github.com/Polidea/SiriusObfuscator-FileExtractor/blob/master/Documentation/ImportantTopics.md) )\n* [SymbolExtractorAndRenamer](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer) ( [BuildNotes](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer#build-notes-for-developers) [GettingStarted](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer/blob/master/Documentation/GettingStarted.md) Important topics: [SymbolExtractor](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer/blob/master/Documentation/SymbolExtractor-ImportantTopics.md) [NameMapper](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer/blob/master/Documentation/NameMapper-ImportantTopics.md) [Renamer](https://github.com/Polidea/SiriusObfuscator-SymbolExtractorAndRenamer/blob/master/Documentation/Renamer-ImportantTopics.md) )\n* [VerificationSuite](https://github.com/Polidea/SiriusObfuscator-VerificationSuite) ( [BuildNotes](https://github.com/Polidea/SiriusObfuscator-VerificationSuite#build-notes-for-developers) )\n   \n### Contributors to Sirius suite\n\nIn the alphabetical order:\n\n* [Jerzy Kleszcz](mailto:jerzy.kleszcz@polidea.com)\n* [Krzysztof Siejkowski](mailto:krzysztof.siejkowski@polidea.com)\n* [Jakub Sowa](mailto:jakub.sowa@polidea.com)\n* [Michał Zieliński](mailto:michal.zielinski@polidea.com)\n\n### CLA\n\nWe require contributors to have signed [Contributor Licence Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement).\n   \n## Support\n\nPolidea may provide commercial support for extending the Sirius obfuscator to work with your app.\n\n## Licence\n\n```\nCopyright 2018 Polidea Sp. z o.o\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolidea%2Fsiriusobfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolidea%2Fsiriusobfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolidea%2Fsiriusobfuscator/lists"}