Python has the shodan module.
It's perfect for this script.
There are others similar just for searching shodan, the problem is, as CorruptedBye pointed out, is that you need "credits" to get alot of results.
When i saw the title I tought that this cracked that system.. oh well
Nice script