2013-02-14 15:32:17 +04:00
|
|
|
#!/usr/bin/env python
|
2010-09-15 16:45:41 +04:00
|
|
|
|
|
|
|
"""
|
2013-01-18 18:07:51 +04:00
|
|
|
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
|
2010-10-15 03:18:29 +04:00
|
|
|
See the file 'doc/COPYING' for copying permission
|
2010-09-15 16:45:41 +04:00
|
|
|
"""
|
|
|
|
|
|
|
|
import urllib2
|
|
|
|
|
|
|
|
|
|
|
|
class MethodRequest(urllib2.Request):
|
2010-10-15 14:28:34 +04:00
|
|
|
'''
|
|
|
|
Used to create HEAD/PUT/DELETE/... requests with urllib2
|
|
|
|
'''
|
|
|
|
|
2010-09-15 16:45:41 +04:00
|
|
|
def set_method(self, method):
|
|
|
|
self.method = method.upper()
|
2010-10-15 14:28:34 +04:00
|
|
|
|
2010-09-15 16:45:41 +04:00
|
|
|
def get_method(self):
|
|
|
|
return getattr(self, 'method', urllib2.Request.get_method(self))
|