Questions tagged [shodan]

Shodan is a search engine that lets you find specific computers using a variety of filters

Shodan is a library that allows for port scanning of directories and banner searches. It has been ported to Ruby, Perl and Python. Shodan API documentation is available on the Web.

49 questions
0
votes
1 answer

How can I filter ports by country?

This is my code: I import the modules import shodan import json I create my key, SHODAN_API_KEY = ('xxxxxxxxxxxxxxxxxxxx') api = shodan.Shodan(SHODAN_API_KEY) I open my json file, with open('Ports.json', 'r') as f: Ports_dict = json.load(f) …
Rym Nabha
  • 1
  • 3
0
votes
1 answer

How to Add Hue bridge in Shodan.io Search Engine

I am working on a special project in the Philips Hue bridge and I want to add the bridge to the search engine Shodan, I want to know how to add the IoT device in order to appear in the search engine Shodan and how to add the banner to the…
0
votes
1 answer

Python - Removing result in shodan results

I am attempting to parse Shodan query results and print only the results that match the criteria I have set. The output need to be in JSON format to be integrated later in Splunk. I'd like to iterate over the set of elements and removing an element…
0
votes
3 answers

AttributeError: module 'shodan' has no attribute 'Shodan'

I need to perform a BULK whois query using shodan API. I came across this code import shodan api = shodan.Shodan('inserted my API-KEY- within single quotes') info = api.host('8.8.8.8') After running the module i get the following error: Traceback…
FCB
  • 1
  • 1
  • 1
0
votes
1 answer

Converting File; getting 'charmap' codec encoding error: character maps to

I'm using anaconda to select only some fields from my json.gz file using- shodan parse --fields port,isp,hostnames,location,timestamp,org,domain,transport,vulns,ssl,http.server,ip_str --separator , shodan-export.json.gz >…
JsDart
  • 183
  • 13
0
votes
2 answers

Freezing while downloading large datasets through Shodan?

I'm using Shodan's API through the Anaconda Terminal on Windows 10 to get data against the query below, but after a few seconds of running, the ETA timer freezes, and my network activity drops to zero. Hitting Control+C restarts it when this happens…
JsDart
  • 183
  • 13
0
votes
1 answer

Deserialize shodan data

I'm having problems deserializing the data I'm getting from Shodan. Below are the classes I got from json2csharp and I'm trying to create an array of the matches and loop through them. It seems like I have tried with everything except a working…
J. Doe
  • 571
  • 1
  • 10
  • 24
0
votes
0 answers

Php Shodan API - Cant search with curl

when i try to use Shodan API in pure php with curl for searching , nothing happen . my php code with curl: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,…
demon666
  • 27
  • 6
0
votes
0 answers

Python Shodan API - Can't search with filters

When I try to use the Shodan API in Python to search for certain filters, I only get errors. When I search for words as an Example, I do not get these errors. My Python Code: import sys import shodan SHODAN_API_KEY = "xxxxxxxxxxxxxxxxxx" try: …
0
votes
1 answer

Need help grabbing SSL CN from Shodan Python API

I am using this script to grab IPs of systems shodan has for the search term abc1234, but I would also like to grab the Issued To: Common Name of the SSL cert, but I cannot figure out how to do this within the python API. #!/usr/bin/env…
Me Myself
  • 129
  • 2
  • 14
0
votes
1 answer

shodan - country code python

I want to list once my script in python search for specific strings , but I also want to add country code first two letters , but when I try then it says invalid KeyError: 'country_code', but the api says ocation.country_code how can I achieve…
Store LTE
  • 11
  • 6
0
votes
2 answers

Find device information from IP address

I have a list of IP addresses and they are probably of the IOT devices. How can I figure out the OS of the device(I only have its IP address) using any script/tool/service ? Any help would be immensely appreciated. I am new to this. Thanks.
0
votes
1 answer

UnitTesting Shodan data

I want to test Shodan data. The data includes fields like timestamp, crawler ID, server OS, etc. These things change at every request. Wow should I test them? Shodan JSON data: { "city": "Mountain View", "region_code": "CA", "os": null, …
nigella
  • 1
  • 2
0
votes
1 answer

Filtering Shodan Query Results based on Location

I am attempting to parse Shodan query results and write a new JSON file with only the results that match the criteria I have set. Example JSON entries: { "matches": [ { "product": "Microsoft IIS httpd", "hostnames": [], …
cbarreras
  • 95
  • 4
0
votes
0 answers

bash on windows 10 error installing shodan

I have setup bash on windows 10. Now I am trying to install shodan. When I run pip install shodan I get error at the end as copying and adjusting bin/shodan -> build/scripts-2.7 changing mode of build/scripts-2.7/shodan from 666 to 777 running…
Subodh Patil
  • 82
  • 1
  • 9