salawank

nt-search.py

Oct 8th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import sys
  4. import urllib2
  5. import json as simplejson
  6.  
  7. if len(sys.argv)<=1:
  8.         print 'Usage: nt-search.py <md5>'
  9.         sys.exit()     
  10. input_hash = sys.argv[1]       
  11. response = urllib2.urlopen('https://networktotal.com/search.php?q='+input_hash+'&json=1')
  12. result = response.read()
  13. response_dict = simplejson.loads(result)
  14. #print response_dict
  15. md5 = response_dict.get("md5")
  16. print '\nMD5: '+md5+'\n'
  17. events = response_dict.get("events")
  18. for lala in events:
  19.     print lala
Add Comment
Please, Sign In to add comment