{"id":29038289,"url":"https://github.com/frida/frida-go","last_synced_at":"2025-06-26T13:37:18.136Z","repository":{"id":63692932,"uuid":"555568715","full_name":"frida/frida-go","owner":"frida","description":"Frida Go bindings","archived":false,"fork":false,"pushed_at":"2025-06-16T22:10:53.000Z","size":83699,"stargazers_count":180,"open_issues_count":6,"forks_count":29,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-16T23:23:36.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://frida.re/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frida.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"frida"}},"created_at":"2022-10-21T21:04:55.000Z","updated_at":"2025-06-16T22:10:57.000Z","dependencies_parsed_at":"2024-01-24T00:26:28.700Z","dependency_job_id":"6a4c2c0e-535d-4fd1-ae71-74999a11f81a","html_url":"https://github.com/frida/frida-go","commit_stats":{"total_commits":135,"total_committers":3,"mean_commits":45.0,"dds":"0.10370370370370374","last_synced_commit":"fd52f64f49fbbde2820e02e6e6dd3aafd1ac0ce6"},"previous_names":["lateralusd/frida-go"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/frida/frida-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Ffrida-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Ffrida-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Ffrida-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Ffrida-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frida","download_url":"https://codeload.github.com/frida/frida-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Ffrida-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262077190,"owners_count":23255138,"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":[],"created_at":"2025-06-26T13:37:17.056Z","updated_at":"2025-06-26T13:37:18.119Z","avatar_url":"https://github.com/frida.png","language":"Go","funding_links":["https://github.com/sponsors/frida"],"categories":[],"sub_categories":[],"readme":"# frida-go\nGo bindings for frida.\n\nFor the documentation, visit [https://pkg.go.dev/github.com/frida/frida-go/frida](https://pkg.go.dev/github.com/frida/frida-go/frida).\n\n# Installation\n* `GO111MODULE` needs to be set to `on` or `auto`.\n* Download the _frida-core-devkit_ from the Frida releases [page](https://github.com/frida/frida/releases/) for you operating system and architecture.\n* Extract the downloaded archive\n* Copy _frida-core.h_ inside your systems include directory(inside /usr/local/include/) and _libfrida-core.a_ inside your lib directory (usually /usr/local/lib).\n\nTo use in your project, just execute: \n```bash\n$ go get github.com/frida/frida-go/frida@latest\n```\n\nSupported OS:\n- [x] MacOS\n- [x] Linux\n- [x] Android\n- [x] Windows\n\n# Small example\n```golang\npackage main\n\nimport (\n  \"bufio\"\n  \"fmt\"\n  \"github.com/frida/frida-go/frida\"\n  \"os\"\n)\n\nvar script = `\nInterceptor.attach(Module.getExportByName(null, 'open'), {\n\tonEnter(args) {\n\t\tconst what = args[0].readUtf8String();\n\t\tconsole.log(\"[*] open(\" + what + \")\");\n\t}\n});\nInterceptor.attach(Module.getExportByName(null, 'close'), {\n\tonEnter(args) {\n\t\tconsole.log(\"close called\");\n\t}\n});\n`\n\nfunc main() {\n  mgr := frida.NewDeviceManager()\n\n  devices, err := mgr.EnumerateDevices()\n  if err != nil {\n    panic(err)\n  }\n\n  for _, d := range devices {\n    fmt.Println(\"[*] Found device with id:\", d.ID())\n  }\n\n  localDev, err := mgr.LocalDevice()\n  if err != nil {\n    fmt.Println(\"Could not get local device: \", err)\n    // Let's exit here because there is no point to do anything with nonexistent device\n    os.Exit(1)\n  }\n\n  fmt.Println(\"[*] Chosen device: \", localDev.Name())\n\n  fmt.Println(\"[*] Attaching to Telegram\")\n  session, err := localDev.Attach(\"Telegram\", nil)\n  if err != nil {\n\t  fmt.Println(\"Error occurred attaching:\", err)\n\t  os.Exit(1)\n  }\n\n  script, err := session.CreateScript(script)\n  if err != nil {\n    fmt.Println(\"Error occurred creating script:\", err)\n\tos.Exit(1)\n  }\n\n  script.On(\"message\", func(msg string) {\n    fmt.Println(\"[*] Received\", msg)\n  })\n\n  if err := script.Load(); err != nil {\n    fmt.Println(\"Error loading script:\", err)\n    os.Exit(1)\n  }\n\n  r := bufio.NewReader(os.Stdin)\n  r.ReadLine()\n}\n\n```\n\nBuild and run it, output will look something like this:\n```bash\n$ go build example.go \u0026\u0026 ./example\n[*] Found device with id: local\n[*] Found device with id: socket\n[*] Chosen device:  Local System\n[*] Attaching to Telegram\n[*] Received {\"type\":\"log\",\"level\":\"info\",\"payload\":\"[*] open(/Users/daemon1/Library/Application Support/Telegram Desktop/tdata/user_data/cache/0/25/0FDE3ED70BCA)\"}\n[*] Received {\"type\":\"log\",\"level\":\"info\",\"payload\":\"[*] open(/Users/daemon1/Library/Application Support/Telegram Desktop/tdata/user_data/cache/0/8E/FD728183E115)\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrida%2Ffrida-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrida%2Ffrida-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrida%2Ffrida-go/lists"}