SHARE
TWEET

webscanner - module OPTIOSN

a guest Mar 20th, 2013 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # try_options.py
  3. #
  4.  
  5. import httplib
  6. import sys
  7. import string
  8.  
  9. url = sys.argv[1]
  10.  
  11. conn = httplib.HTTPConnection(url)
  12. conn.request('OPTIONS','/')
  13. resp = conn.getresponse()
  14. page_respone = resp.read()
  15. #print page_respone
  16. print resp.status, resp.reason
  17.  
  18. full_answer = resp.getheaders()
  19. #print 'What we have here:\n', full_answer
  20.  
  21. print '-----------------------------------------------'
  22. i=0
  23. while i < len(full_answer):
  24.   print ' ->  '.join(full_answer[i])
  25.   i=i+1
RAW Paste Data
Top