0

trying to learn Shodan's CLI and got a newbie question. Is there any way to use Shodan's CLI to submit a scan to an IP on a specific port? Or shodan just keeps scanning randomly the internet until the port is selected to be scanned? What I'm trying to do is something on the lines of asking shodan to scan 1.1.1.1 on port 23 and see what the 1.1.1.1 replies. Tried using shodan scan protocols telnet <1.1.1.1> but did not work.

Is this possible?

shinn
  • 1

1 Answers1

0

No, you can't currently check a specific port using the CLI. You would need to use the Shodan API directly as documented in this article:

https://help.shodan.io/the-basics/on-demand-scanning

from shodan import Shodan

# Setup the Shodan API object
api = Shodan(API_KEY)

# Check ports 503 using the "modbus" module and 2900 using the "ssh" module
scan = api.scan({
    '198.20.69.74': [
        (503, 'modbus'),
        (2900, 'ssh'),
    ]
})
achillean
  • 520
  • 4
  • 10