{"id":15040975,"url":"https://github.com/fooock/jshodan","last_synced_at":"2025-04-13T14:21:08.334Z","repository":{"id":55814291,"uuid":"80363192","full_name":"fooock/jshodan","owner":"fooock","description":"Powerful Shodan API client using RxJava and Retrofit","archived":false,"fork":false,"pushed_at":"2024-08-05T13:17:53.000Z","size":176,"stargazers_count":71,"open_issues_count":3,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-27T05:23:20.998Z","etag":null,"topics":["android","android-development","android-library","exploits","rest","retrofit2","rxjava","security","security-scanner","shodan","shodan-client"],"latest_commit_sha":null,"homepage":"","language":"Java","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/fooock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-01-29T18:21:54.000Z","updated_at":"2025-02-22T12:48:20.000Z","dependencies_parsed_at":"2024-12-16T18:31:36.264Z","dependency_job_id":"1d4df6d5-bef4-4a50-91cf-48a999261b0d","html_url":"https://github.com/fooock/jshodan","commit_stats":{"total_commits":60,"total_committers":2,"mean_commits":30.0,"dds":"0.033333333333333326","last_synced_commit":"0b9342ab9c747814f09249661a2cd615026dbd33"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fjshodan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fjshodan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fjshodan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooock%2Fjshodan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fooock","download_url":"https://codeload.github.com/fooock/jshodan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248725097,"owners_count":21151627,"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":["android","android-development","android-library","exploits","rest","retrofit2","rxjava","security","security-scanner","shodan","shodan-client"],"created_at":"2024-09-24T20:45:21.433Z","updated_at":"2025-04-13T14:21:08.300Z","avatar_url":"https://github.com/fooock.png","language":"Java","funding_links":[],"categories":["Java Search Automation Tools"],"sub_categories":[],"readme":"# jShodan\n[ ![Download](https://api.bintray.com/packages/fooock/maven/jShodan/images/download.svg) ](https://bintray.com/fooock/maven/jShodan/_latestVersion) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-jShodan-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5312)\n\nPowerful Shodan client written using RxJava and Retrofit. You can integrate this client into existing apps or create new one. With this Shodan client you can:\n* Search Shodan\n* Exploit search\n* Streaming API to consume Shodan data in real time (in development)\n\n## Installation\nIf you use gradle add to your build.gradle\n```\nrepositories {\n    jcenter()\n}\n```\nAlso you can use maven central\n```\nrepositories {\n    mavenCentral()\n}\n```\nAnd in your dependencies block add this line\n```\ncompile 'com.fooock:jshodan:0.4.9'\n```\nor if you are using maven add to you pom.xml\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.fooock\u003c/groupId\u003e\n  \u003cartifactId\u003ejshodan\u003c/artifactId\u003e\n  \u003cversion\u003e0.4.9\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n## Getting started\nYou need an API key to use this client. You can do this in [Shodan.io](http://shodan.io) \n* **Rest API**\n```java\nShodanRestApi api = new ShodanRestApi(\"your api key here\");\n```\nA simple example of query Shodan with facet info. Note that executing this query **consumes 1 query credit**\n```java\napi.hostSearch(\"port:8333\", \"bitcoin.ip:10,city:10\")\n    .subscribe(new DisposableObserver\u003cHostReport\u003e() {\n        @Override\n        public void onCompleted() {\n            // called when the request is completed\n        }\n\n        @Override\n        public void onError(Throwable e) {\n            // called if an error occurs\n        }\n\n        @Override\n        public void onNext(HostReport hostReport) {\n            // result of the query\n        }\n});\n```\nThe result of this, if success, is an object ```HostReport``` that contains all info.\n```java\nint total = hostReport.getTotal();\nList\u003cBanner\u003e banners = hostReport.getBanners();\nFacetReport facet = hostReport.getFacet();\n```\nYou can use other method calls from the rest API. See the [ApiService](https://github.com/fooock/jshodan/blob/master/src/main/java/com/fooock/shodan/ApiService.java) class for a complete list.\n\n* **Exploit API**\nUse this API to search for exploits from multiple data sources like Exploit DB, Metasploit and CVE. The use of this API is very simply and similar to the previous\n```java\nShodanExploitApi api = new ShodanExploitApi(\"your api key here\");\n```\nA simple example\n```java\napi.search(\"ssl\", \"type\")\n    .subscribe(new DisposableObserver\u003cExploitReport\u003e() {\n        @Override\n        public void onCompleted() {\n            // called when the request is completed\n        }\n\n        @Override\n        public void onError(Throwable e) {\n            // called if an error occurs\n        }\n\n        @Override\n        public void onNext(ExploitReport exploitReport) {\n            // result of the query\n        }\n});\n```\nThe result of this call, if success, is ```ExploitReport``` class that contains all info\n\n* **Streaming API**\nThis API returns a real-time stream of data collected by Shodan. \n```java\nShodanStreamingApi api = new ShodanStreamingApi(\"your api key here\");\n```\nExample to get all data that Shodan collects\n```java\napi.banners()\n    .subscribe(new DisposableObserver\u003cBannerReport\u003e() {\n        @Override\n        public void onCompleted() {\n            // called when the request is completed\n        }\n\n        @Override\n        public void onError(Throwable e) {\n            // called if an error occurs\n        }\n\n        @Override\n        public void onNext(BannerReport bannerReport) {\n            // result of the query\n        }\n});\n```\n**Note:** To use the streaming API you need a Shodan subscription-based API plan. You can obtain it in [Shodan pricing](https://developer.shodan.io/billing/signup)\n\n## Android support\nIf your plan is to create a new Android app using this, you need to add this dependency\n```\ncompile 'io.reactivex.rxjava2:rxandroid:x.y.z'\n```\n\n## Dependencies\n* [RxJava2](https://github.com/ReactiveX/RxJava) for its reactive-functional API\n* [Retrofit](https://github.com/square/retrofit) HTTP client for Android and Java\n* [Gson Retrofit converter](https://github.com/square/retrofit/tree/master/retrofit-converters/gson) A converter wich uses Gson for serialization to and from JSON\n* [RxJava2 adapter for Retrofit](https://github.com/square/retrofit/tree/master/retrofit-adapters/rxjava2) An adapter for rxJava2 types\n\nEnjoy it!\n### Roadmap\n1. Testing\n2. Documentation\n3. Better readme with more examples\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%2Ffooock%2Fjshodan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffooock%2Fjshodan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooock%2Fjshodan/lists"}