sqlmap/lib/request/methodrequest.py

20 lines
448 B
Python
Raw Normal View History

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