Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. if ircmsg.find(chanSyntax + "!shodan") != -1:
  2. SHODAN_API_KEY = "XnFa919Trc56CS1P6UI9XMmwxLVNuNQj"
  3.  
  4. api = shodan.Shodan(SHODAN_API_KEY)
  5. try:
  6.  
  7. results = api.search('cisco default router password')
  8. ircmsg.send(chanSyntax + "Results Found: %s" % str(results['total']))
  9.  
  10. for result in results['matches']:
  11. ircmsg.send(chanSyntax + 'IP: %s' % str(result['ip_str']))
  12. ircmsg.send(chanSyntax + str(result['data']))
  13. except shodan.APIError, e:
  14. ircmsg.send(chanSyntax + e)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement