Scan a list of IPs from a file
~ $
cat my_ips.txt | xargs -L100 shodan scan submit --wait 0
Description
The file my_ips.txt contains a list of IPs in the format:
1.1.1.1
7.7.7.7
8.8.8.8
We can use xargs
to submit 100 arguments (-L100) to the Shodan CLI command (shodan scan submit). We set --wait 0 to tell the CLI to not wait for results and instead immediately return after we've requested the scan.