Advertisement
Guest User

webscanner - module OPTIOSN

a guest
Mar 20th, 2013
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement