Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prophetl33t/ShodanCPP
ShodanCPP is a С++ library for accessing the Shodan API.
https://github.com/prophetl33t/ShodanCPP
cpp shodan shodan-api
Last synced: about 1 month ago
JSON representation
ShodanCPP is a С++ library for accessing the Shodan API.
- Host: GitHub
- URL: https://github.com/prophetl33t/ShodanCPP
- Owner: prophetl33t
- License: other
- Created: 2020-06-05T19:36:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-03T09:13:17.000Z (about 3 years ago)
- Last Synced: 2023-03-09T07:53:28.630Z (almost 2 years ago)
- Topics: cpp, shodan, shodan-api
- Language: C
- Homepage:
- Size: 4.89 MB
- Stars: 23
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ip-search-engines - ShodanCPP
README
# ShodanCPP
ShodanCPP is a C++ library for accessing the Shodan API.
Cloning a repository with submodules:
```shell
git clone --recursive https://github.com/prophetl33t/ShodanCPP.git
git submodule update --init --recursive
```Usage example:
//Print information about the API plan.
ShodanClient cl;
cl.SetAPIKey("insert api key here");
std::cout << cl.GetAPIInfo() << "\n";//Print the number of devices that have the string "webcam" in their banner
rapidjson::Document doc;
doc.Parse(cl.GetHostCount("webcam").c_str());
std::cout << doc["total"].GetInt() << "\n";Dependencies:
curl (https://curl.haxx.se)
rapidjson (https://github.com/Tencent/rapidjson)
string_view_lite (https://github.com/martinmoene/string-view-lite)
The repository contains a solution for Visual Studio 2019 and CMakeLists.txt, in case you want to use a different IDE. The library was tested only on Windows, but apparently it works on linux too (if you find the curl library yourself).