Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import thread
- import requests
- from shodan import WebAPI
- SHODAN_API_KEY = "YTpJupxORiRWAWTNKYJ6H7IOeaxGAcRG"
- api = WebAPI(SHODAN_API_KEY)
- def scan(ip):
- if ip:
- print ip + " \n"
- try:
- # Search Shodan
- results = api.search('linksys')
- # Show the results
- print 'Results found: %s' % results['total']
- for result in results['matches']:
- # print 'Scanning IP: %s' % result['ip']
- thread.start_new_thread( scan, (result['ip'], ) )
- except Exception, e:
- print 'Error: %s' % e
- while 1:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement