{"id":25658900,"url":"https://github.com/nsecho/gdylib","last_synced_at":"2025-04-19T15:56:54.656Z","repository":{"id":65950390,"uuid":"602255701","full_name":"NSEcho/gdylib","owner":"NSEcho","description":"Add new LC_LOAD_[WEAK_]DYLIB and LC_RPATH","archived":false,"fork":false,"pushed_at":"2023-02-18T14:01:52.000Z","size":16,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T09:51:12.218Z","etag":null,"topics":["golang","macho","macho-parser","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NSEcho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-02-15T20:30:30.000Z","updated_at":"2024-08-17T16:56:54.000Z","dependencies_parsed_at":"2023-05-16T09:45:34.278Z","dependency_job_id":null,"html_url":"https://github.com/NSEcho/gdylib","commit_stats":null,"previous_names":["lateralusd/gdylib"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSEcho%2Fgdylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSEcho%2Fgdylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSEcho%2Fgdylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSEcho%2Fgdylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NSEcho","download_url":"https://codeload.github.com/NSEcho/gdylib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249731718,"owners_count":21317343,"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","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":["golang","macho","macho-parser","reverse-engineering"],"created_at":"2025-02-24T00:29:46.419Z","updated_at":"2025-04-19T15:56:54.641Z","avatar_url":"https://github.com/NSEcho.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gdylib\n\nModule providing adding following load commands:\n* `LC_LOAD_DYLIB`\n* `LC_LOAD_WEAK_DYLIB`\n* `LC_RPATH`\n\nAdding loads can be accomplished with keeping the old signature or removal of it. Module will check whether there is enough space for the new load and return `ErrNotEnoughSpace` if there is not enough.\n\nThis module is heavily inspired/guided by [insert_dylib](https://github.com/tyilo/insert_dylib), [install_name_tool](https://www.unix.com/man-page/osx/1/install_name_tool/) projects.\n\nIt supports 32bit and 64bit architectures with assumed little endian. FAT binaries are not yet supported.\n\n# Usage\n\n```golang\npackage main\n\nimport (\n\t\"github.com/lateralusd/gdylib\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc main() {\n\tr, err := gdylib.Run(os.Args[1], os.Args[2],\n\t\tgdylib.WithLoadType(gdylib.WEAK),\n\t\tgdylib.WithRemoveCodeSig(true))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tnf, err := os.Create(os.Args[3])\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer nf.Close()\n\n\tio.Copy(nf, r)\n}\n```\n\n```bash\n$ go run main.go a.out @executable_path/FridaGadget.dylib new_file\n$ otool -l new_file | tail\n datasize 0\nLoad command 16\n          cmd LC_LOAD_WEAK_DYLIB\n      cmdsize 64\n         name @executable_path/FridaGadget.dylib (offset 24)\n   time stamp 0 Thu Jan  1 01:00:00 1970\n      current version 0.0.0\ncompatibility version 0.0.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsecho%2Fgdylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsecho%2Fgdylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsecho%2Fgdylib/lists"}