Need a small script written, which will run in loops.
The basic Shodan api Command-Line Interface (shodan download --limit xx "search quiery" , shodan parse --fields ip_str,port) is to be used, so I can easily adjust, should my needs change.
So, here's the scenario:
On each run, the script will pull the latest xx results for the "search quiery" with Shodan api, extracts the necessary data, and buffers them in [login to view URL]
Then, the script probes every entry in the list with "curl ip:port" command which is expected to return
<?xml version=.........
...........
..........
</html>
The script checks if the returned data precisely matches the template, predefined within the script (which I'm should be able to modify, if needed) and if the match is precise, the ping considered "successful" and the particular entry ip:port ( one entry per line) is exported into 2 lists:
The first one is [login to view URL], which will be erased, upon the cycle completion and recreated on the next run.
Second list is [login to view URL], which will contain all time successfully pinged ip:port entries:
ip1:port
ip2:port
...
ipx:port
If the ip:port curl probe doesn't return the expected template predefined value, it is saved into [login to view URL]
Upon the next script cycle it pulls the latest xx results with Shodan api extract the necessary ip:port data, buffers them in the recreated [login to view URL] and compares against the [login to view URL] and [login to view URL] entries.
If the new ip:port entries are found, they are probed again with "curl ip:port" command, the successful entries are exported into [login to view URL] again and also added to the database.txt.
The unsuccessful entries are added into [login to view URL], as per previous cycle.
Then all repeats again...
Greeting,
I have understood your Shodan api scraping/parser script task and can do it with your 100% satisfaction. Please ping me for more discussion.
I have more than 5 years of experience in Bash Scripting, PHP, Python, Web Scraping
Hello There,
It seems you need a health check script, I can help you with this project.
If you're interested, Please let me know.
Best Regards,
Daniel Gordi
Hi, How are you?
If you trust me ,I 'll do my best for you and my reputation.
Please let's discuss more detail in this chat.
Thanks for your attention.