Created
March 10, 2013 11:14
-
-
Save achillean/5128200 to your computer and use it in GitHub Desktop.
Shodan macro for Google Spreadsheets. To use this go to Tools -> Script Editor, then copy/ paste the code. In the spreadsheet you can then do =SHODAN("cisco-ios")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Search the Shodan database using the given query. Returns the number of matches. | |
*/ | |
function SHODAN(query) { | |
var API_KEY = 'YOUR API KEY'; | |
var url = 'http://www.shodanhq.com/api/count?key=' + API_KEY + '&q=' + query; | |
var response = UrlFetchApp.fetch(url); | |
var data = Utilities.jsonParse(response.getContentText()); | |
return data.total; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment