Comments (6)
Please provide a sample CLI command to help us reproduce the problem. Are you using search filters? Is this using a free account? Maybe it errored out and the CLI wasn't showing a good error?
from shodan-python.
Yes, I am using a free account and using filters. By the way, I'm on OpenSUSE. This actually worked until I updated to what was at the time the most current OS version.
Linux rip 4.4.27-2-default #1 SMP Thu Nov 3 14:59:54 UTC 2016 (5c21e7c) x86_64 x86_64 x86_64 GNU/Linux
It happens on any IP. Example CLI command and attached image of what I see.
shodan search --fields asn,ip_str,port 98.138.252.38
from shodan-python.
Thanks! It looks like your search query isn't returning any results which is why you're seeing an empty screen. If you do the following command then you will see results, though it requires a paid Shodan account (membership or higher):
shodan search --fields asn,ip_str,port net:98.138.252.38
The CLI should be changed to show a message when there aren't any results instead of a blank screen.
from shodan-python.
Also note that this is one of the few areas where the Shodan website behaves differently/ smarter: if a user searches for an IP address then it automatically adds a "net:" filter in front of the query which is why your search query works on the website but not the API/ CLI.
from shodan-python.
You learn something new everyday. Very nice!
I did not know about the net: filter being required for a single IP. I mistakenly thought I could simply specify the IP. That's how a lot of command line tools seem to work (e.g., nmap).
May I suggest an update to the Guide? The net filter says "Network range in CIDR notation (ex. 199.4.1.0/24)".
from shodan-python.
The "shodan host" command is designed for single IP lookups - it's faster and provides friendlier output.
The API tries to have consistent behavior and leave it up to the developer to add any special/ optimized ways of handling user input. Without filters, the provided text is searched for in the banners themselves. For example, how would you find service banners that contain that IP but the services are running on another IP? That situation actually comes up more than expected which is why the API behaves the way it does. We should find a way though to make that a bit clearer in the documentation.
from shodan-python.
Related Issues (20)
- Odd regression with scan submission HOT 2
- git tags missing for 1.29.0 HOT 6
- Loading data is incomplete HOT 2
- Access denied (403 Forbidden) HOT 7
- Truncated search results using the API (paid account) HOT 2
- Return response body for errors HOT 3
- http.* dont work HOT 1
- Is Shodan dead? HOT 3
- Refactor shodan convert command to use Pandas HOT 3
- Shodan Convert command only converts from JSON to supported file type
- Add input validation to shodan convert command
- Shodan radar exception on windows machines with curses missing. HOT 1
- ImportError: cannot import name 'Shodan' from partially initialized module 'shodan' HOT 3
- error looks like why unable to connect shodan if im trying only shodan init api key it also gives error HOT 1
- shadon issue HOT 2
- Error: Access denied (403 Forbidden) HOT 1
- APIError support for Status Code HOT 1
- change the key via the console HOT 2
- ENH: Simplify JSON & Dictionary parsing logic
- TST: Migrate Shodan unit testing framework to pytest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shodan-python.