Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sqlmapproject
GitHub Repository: sqlmapproject/sqlmap
Path: blob/master/lib/request/methodrequest.py
2989 views
1
#!/usr/bin/env python
2
3
"""
4
Copyright (c) 2006-2025 sqlmap developers (https://sqlmap.org)
5
See the file 'LICENSE' for copying permission
6
"""
7
8
from lib.core.convert import getText
9
from thirdparty.six.moves import urllib as _urllib
10
11
class MethodRequest(_urllib.request.Request):
12
"""
13
Used to create HEAD/PUT/DELETE/... requests with urllib
14
"""
15
16
def set_method(self, method):
17
self.method = getText(method.upper()) # Dirty hack for Python3 (may it rot in hell!)
18
19
def get_method(self):
20
return getattr(self, 'method', _urllib.request.Request.get_method(self))
21
22