{"id":13582272,"url":"https://github.com/ns3777k/go-shodan","last_synced_at":"2026-03-09T05:32:39.203Z","repository":{"id":44724493,"uuid":"41859480","full_name":"ns3777k/go-shodan","owner":"ns3777k","description":"Shodan API client","archived":false,"fork":false,"pushed_at":"2022-01-12T22:49:02.000Z","size":195,"stargazers_count":214,"open_issues_count":0,"forks_count":34,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-09-08T08:44:01.626Z","etag":null,"topics":["exploits","security","security-scanner","shodan","shodan-api","shodan-client"],"latest_commit_sha":null,"homepage":null,"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/ns3777k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-03T12:50:31.000Z","updated_at":"2025-08-29T16:30:56.000Z","dependencies_parsed_at":"2022-09-01T22:51:30.168Z","dependency_job_id":null,"html_url":"https://github.com/ns3777k/go-shodan","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/ns3777k/go-shodan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ns3777k%2Fgo-shodan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ns3777k%2Fgo-shodan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ns3777k%2Fgo-shodan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ns3777k%2Fgo-shodan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ns3777k","download_url":"https://codeload.github.com/ns3777k/go-shodan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ns3777k%2Fgo-shodan/sbom","scorecard":{"id":696987,"data":{"date":"2025-08-11","repo":{"name":"github.com/ns3777k/go-shodan","commit":"689945f74bdb301e4c4a226e1a8d402c7dd0756a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/golangci-lint.yml:11","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/golangci-lint.yml:12","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ns3777k/go-shodan/golangci-lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ns3777k/go-shodan/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ns3777k/go-shodan/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ns3777k/go-shodan/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ns3777k/go-shodan/test.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T03:58:51.171Z","repository_id":44724493,"created_at":"2025-08-22T03:58:51.171Z","updated_at":"2025-08-22T03:58:51.171Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: 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":["exploits","security","security-scanner","shodan","shodan-api","shodan-client"],"created_at":"2024-08-01T15:02:33.559Z","updated_at":"2026-03-09T05:32:39.181Z","avatar_url":"https://github.com/ns3777k.png","language":"Go","funding_links":[],"categories":["Go","Go Search Automation Tools"],"sub_categories":[],"readme":"# go-shodan\n[![msisdn CI](https://github.com/ns3777k/go-shodan/actions/workflows/test.yml/badge.svg)](https://github.com/ns3777k/go-shodan/actions/workflows/test.yml)\n[![GoDoc](https://godoc.org/github.com/ns3777k/go-shodan/shodan?status.svg)](https://godoc.org/github.com/ns3777k/go-shodan/shodan)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ns3777k/go-shodan)](https://goreportcard.com/report/github.com/ns3777k/go-shodan)\n\nTo start working with Shodan you have to get your token first. You can do this at [https://www.shodan.io](https://www.shodan.io).\n\n### Usage\n\nThe import path depends on whether you use go modules:\n\n```go\nimport \"github.com/ns3777k/go-shodan/v4/shodan\"\t// with go modules enabled (GO111MODULE=on or outside GOPATH)\nimport \"github.com/ns3777k/go-shodan/shodan\" // with go modules disabled\n```\n\nSimple example of resolving hostnames:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"context\"\n\n\t\"github.com/ns3777k/go-shodan/v4/shodan\" // go modules required\n)\n\nfunc main() {\n\tclient := shodan.NewEnvClient(nil)\n\tdns, err := client.GetDNSResolve(context.Background(), []string{\"google.com\", \"ya.ru\"})\n\n\tif err != nil {\n\t\tlog.Panic(err)\n\t} else {\n\t\tlog.Println(dns[\"google.com\"])\n\t}\n}\n```\nOutput for above:\n```bash\n2015/09/05 18:50:52 173.194.115.35\n```\n\nStreaming example:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"context\"\n\n\t\"github.com/ns3777k/go-shodan/v4/shodan\" // go modules required\n)\n\nfunc main() {\n\tclient := shodan.NewEnvClient(nil)\n\tch := make(chan *shodan.HostData)\n\terr := client.GetBannersByASN(context.Background(), []string{\"3303\", \"32475\"}, ch)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor {\n\t\tbanner, ok := \u003c-ch\n\n\t\tif !ok {\n\t\t\tlog.Println(\"channel was closed\")\n\t\t\tbreak\n\t\t}\n\n\t\tlog.Println(banner.Product)\n\t}\n}\n```\n\n### Tips and tricks\n\nEvery method accepts context in the first argument so you can easily cancel any request.\n\nYou can also use `SetDebug(true)` to see the actual request data (method, url, body).\n\n### Implemented REST API\n\n#### Search Methods\n- [x] /shodan/host/{ip}\n- [x] /shodan/host/count\n- [x] /shodan/host/search\n- [x] /shodan/host/search/facets\n- [x] /shodan/host/search/filters\n- [x] /shodan/host/search/tokens\n- [x] /shodan/ports\n\n#### On-Demand Scanning\n- [x] /shodan/protocols\n- [x] /shodan/scan\n- [x] /shodan/scan/internet\n- [x] /shodan/scan/{id}\n\n#### Network Alerts\n- [x] /shodan/alert\n- [x] /shodan/alert/{id}/info\n- [x] /shodan/alert/{id}\n- [x] /shodan/alert/info\n- [x] /shodan/alert/triggers\n- [x] /shodan/alert/{id}/notifier/{notifier_id}\n- [x] /shodan/alert/{id}/trigger/{trigger}\n- [x] /shodan/alert/{id}/trigger/{trigger}/ignore/{service}\n\n#### Notifiers\n- [x] /notifier\n- [x] /notifier/provider\n- [x] /notifier/{id}\n\n#### Directory Methods\n- [x] /shodan/query\n- [x] /shodan/query/search\n- [x] /shodan/query/tags\n\n#### Account Methods\n- [x] /account/profile\n\n#### DNS Methods\n- [x] /dns/resolve\n- [x] /dns/reverse\n- [x] /dns/domain/{domain}\n\n#### Bulk Data\n- [x] /shodan/data\n- [x] /shodan/data/{dataset}\n\n#### Manage Organization\n- [x] /org\n- [x] /org/member/{user}\n\n#### Utility Methods\n- [x] /tools/httpheaders\n- [x] /tools/myip\n\n#### API Status Methods\n- [x] /api-info\n\n#### Experimental Methods\n- [x] /labs/honeyscore/{ip}\n\n#### Exploits\n- [x] /search\n- [x] /count\n\n### Implemented Streaming API\n\n#### Data Streams\n- [x] /shodan/banners\n- [x] /shodan/asn/{asn}\n- [x] /shodan/countries/{countries}\n- [x] /shodan/ports/{ports}\n\n#### Network Alerts\n- [x] /shodan/alert\n- [x] /shodan/alert/{id}\n\n### Implemented GeoNet API\n\n- [x] /api/ping/{ip}\n- [x] /api/geoping/{ip}\n- [x] /api/dns/{hostname}\n- [x] /api/geodns/{hostname}\n\nIf a method is absent or something doesn't work properly don't hesitate to create an issue.\n\n### Links\n* [Shodan.io](http://shodan.io)\n* [API Documentation](https://developer.shodan.io/api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fns3777k%2Fgo-shodan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fns3777k%2Fgo-shodan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fns3777k%2Fgo-shodan/lists"}