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
4
votes
3 answers

AttributeError: 'str' object has no attribute '_request' for shodan api

import shodan import sys from ConfigParser import ConfigParser #grab the api key from auth.ini config = ConfigParser() config.read('auth.ini') SHODAN_API_KEY = config.get('auth','API_KEY') #initialize the api object api =…
Joshua Harper
  • 43
  • 1
  • 5
2
votes
1 answer

How to filter specific data on Shodan

I am trying to write a script in python where it would search the data and return the IP addresses and the data that goes with them, but I would like to filter the search so it would return just the IP addresses and their HTTP status, just the first…
Lionel
  • 21
  • 2
2
votes
1 answer

Shodan shows open ports but nmap says they are closed. any idea why?

SMB port is open when I try to scan the host with shodan, but when I do it with nmap or any other scanner it says that the port is closed or filtered. any explanation? I tried all the basic firewall evasion techniques with nmap but none of them…
1
vote
0 answers

Receiving results from a different IP address than one input via url requests

Cant understand why I'm getting this output Enter IP list filename: nearmeips.txt 216.128.74.178 **** {'country_code':…
1
vote
1 answer

how to make multiple port search on shodan

First of all I'm sorry if this question should be on another forum but I had some difficulties to find out where to ask this and from the site I'm not getting any reply. Can you tell me how can I search for devices which have 2 or more specific…
usrstck
  • 11
  • 1
1
vote
2 answers

Filtering out honeypots from search results

I was searching some query on Shodan and was getting lots of Honeypots and i wanted to filter out all the result which are honeypot, i tried adding -honeypot but still it showed results with honeypot, what am i doing wrong? Help will be appreciated.…
1
vote
2 answers

How to run a python file and scan the generated ips by nmap

I have written a python script to search through shodan, my script code returns a file containing an ip list that each line contains single ip. here is my code: import shodan SHODAN_API="YOUR_SHODAN_API" api = shodan.Shodan(SHODAN_API) try: #…
SomeGuyBig
  • 15
  • 6
1
vote
1 answer

How to exclude a country in a Shodan search?

I have a query I want to perform on Shodan that I want to exclude a certain country with. I know I am able to select certain countries using the "country" filter like thingy country:"US". But in this case I want to exclude the UK, using the country…
technik
  • 45
  • 1
  • 5
1
vote
0 answers

Shodan Python API "count" problem with returned values with port facet

i have a problem with Shodan "count" request, some code: ... api=shodan.Shodan(API_KEY) FACETS=[("port",361), . . .] #limit 361 values api.count("port: x, y , ...",facets=FACETS) # filter for 361 port given ... when i print the summary for the…
lol_lime
  • 11
  • 2
1
vote
1 answer

Output json file on some fields without filtering data with Shodan?

I've downloaded some JSON data from Shodan, and only want to retain some fields from it. To explore what I want, I'm running the following, which works- shodan parse --fields ip,port --separator , "data.json.gz" However, I now want to output/…
JsDart
  • 183
  • 13
1
vote
2 answers

Shodan.py search doesn't print full result set when printing matches list

I'm trying to print out a full result list for a specific query I am performing, in the format IP:PORT. However it only prints a partial amount. results['total'] prints 1799 (which is also the result amount when the search is performed on the Shodan…
Kevin
  • 43
  • 1
  • 7
1
vote
1 answer

How to run a python script from linux terminal when it imports libraries like shodan?

root@kali:~# ./collecting_info_using_facets.py apache Traceback (most recent call last): File "./collecting_info_using_facets.py", line 3, in import shodan ImportError: No module named shodan I included path as #!usr/bin/env python…
1
vote
1 answer

JSon unexpected character encountered while parsing value: [

Thanks in advance for the person who can help me with the issue below. I am using the latest Newtonsoft.Json version from NuGet as of 2016.9.30 and this is the issue: Exception Unexpected character encountered while parsing value: [. Path…
Khaled
  • 23
  • 4
1
vote
2 answers

Shodan. Get all open ports for a net

I want to get all the open ports for a network with Shodan (I know I can use nmap but I want to carry this out with Shodan). The problem is that the website only shows the "TOP Services", and I would like to be given all the services. For example,…
aDoN
  • 1,877
  • 4
  • 39
  • 55
1
vote
1 answer

Python Shodan API - Returning multiple port values

Looking at these SHODAN docs I'm not sure I understand why I am only getting the first port details returned when I run the script. When I look in the web interface I can see there are multiple ports/services detected for some of the…
JRR
  • 327
  • 3
  • 16
1
2 3 4