https://github.com/erran/emcshodanclient
Objective-C library for SHODAN
https://github.com/erran/emcshodanclient
Last synced: about 1 year ago
JSON representation
Objective-C library for SHODAN
- Host: GitHub
- URL: https://github.com/erran/emcshodanclient
- Owner: erran
- License: mit
- Created: 2012-06-07T19:48:39.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2014-01-06T05:14:10.000Z (over 12 years ago)
- Last Synced: 2025-03-20T08:47:44.689Z (over 1 year ago)
- Language: Objective-C
- Homepage: http://erran.github.io/EMCShodanClient
- Size: 840 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ECShodanClient
## Usage
Before you can use this Objective-C library to connect to the SHODAN API, you need to have an API key [from SHODAN](http://www.shodanhq.com/api_doc).
Create and initialize an instance of the ECShodanClient class:
```objective-c
#import "ECShodanClient.h"
ECShodanClient* api = [[ECShodanClient alloc] initWithAPIKey:@"Your API Key"];
```
Print a list of cisco-ios devices:
```objective-c
NSDictionary* result = [api search:@"cisco"];
int i = 0;
for (id __strong host in [result objectForKey:@"matches"]) {
host = [[result objectForKey:@"matches"] objectAtIndex:i];
i++;
NSLog(@"%@", [host objectForKey:@"ip"]);
}
```
Grab all information SHODAN has on a specific ip (4.59.125.121):
```objective-c
NSDictionary* host = [api host:@"4.59.125.121"];
NSLog(@"%@", host);
```