Jump to content

achillean

Members
  • Posts

    1
  • Joined

  • Last visited

Recent Profile Visitors

252 profile views

achillean's Achievements

Newbie

Newbie (1/14)

  1. If your sole intent is to download results and analyze them I would recommend checking out the CLI. It was a "download" command with a "limit" option to let you specify how many results you want to download. For example: shodan download --limit 1000 mongodb port:27017 The above would download 1000 results for the search query port:27017 and save the results in a file called mongodb.json.gz. I recommend always saving the results of a search query so you can keep it for historical purposes and do whatever analysis you want without needing to redo the search request (i.e. it's faster and doesn't use API credits to analyze a file). With regards to the API, you can iterate over the search results using the page parameter of the search() method. I.e. you start with page=1 and then call api.search(query, page=page) in a loop to go through however many results you want. You can also check out the code for the search_cursor() method which basically does what I just described: https://github.com/achillean/shodan-python/blob/master/shodan/client.py#L309 I hope that answers your question!
×
×
  • Create New...