Giter Club home page Giter Club logo

Comments (6)

achillean avatar achillean commented on August 14, 2024

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.

razermouse avatar razermouse commented on August 14, 2024

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

blank_search

from shodan-python.

achillean avatar achillean commented on August 14, 2024

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.

achillean avatar achillean commented on August 14, 2024

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.

razermouse avatar razermouse commented on August 14, 2024

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.

achillean avatar achillean commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.