Getting Started

Before we dive into specific things that you can do with the CLI here are a few general tips:

  1. All commands accept the -h flag to see the help information.

  2. Running a command without arguments will also show you the help information. For example, try running the command shodan

  3. You can confirm that you're on the latest version of the CLI by running shodan version and making sure it matches the version listed on PyPi. Before emailing Shodan support please make sure that you are using the latest version of the CLI.

  4. If your search query contains quotes then you need to wrap the query in an additional set of quotes when using the CLI. For example, a search query such as city:"San Diego" would become 'city:"San Diego"'. Otherwise city:"San Diego" would get sent as a search query of city:San Diego to the Shodan API which will get you very different results.

  5. Banners contain a lot of data and most of it is stored in nested properties. Nested properties can be accessed in the CLI by separating them with a . character. For example, the title of a website is stored looks like this in the banner data:

     {
         'http': {
             'title': 'Index of /'
         }
     }
    

    To grab that information in the CLI you would ask for the http.title property.

Still need help? Get in touch!
Last updated on 2nd Nov 2020