mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +03:00
fix for bug reported by Truong Duc Luong
This commit is contained in:
parent
b0ba559af5
commit
27d76847fe
|
@ -27,6 +27,7 @@ import socket
|
|||
import urllib
|
||||
import urllib2
|
||||
|
||||
from lib.core.exception import sqlmapUnsupportedFeatureException
|
||||
from lib.core.settings import PYVERSION
|
||||
|
||||
if PYVERSION >= "2.6":
|
||||
|
@ -117,7 +118,8 @@ class ProxyHTTPHandler(urllib2.HTTPHandler):
|
|||
|
||||
return urllib2.HTTPHandler.do_open(self, ProxyHTTPConnection, req)
|
||||
|
||||
class ProxyHTTPSHandler(urllib2.HTTPSHandler):
|
||||
if PYVERSION >= "2.6":
|
||||
class ProxyHTTPSHandler(urllib2.HTTPSHandler):
|
||||
def __init__(self, proxy=None, debuglevel=0):
|
||||
self.proxy = proxy
|
||||
|
||||
|
@ -128,3 +130,8 @@ class ProxyHTTPSHandler(urllib2.HTTPSHandler):
|
|||
req.set_proxy(self.proxy, "https")
|
||||
|
||||
return urllib2.HTTPSHandler.do_open(self, ProxyHTTPSConnection, req)
|
||||
else:
|
||||
class ProxyHTTPSHandler:
|
||||
def __init__(self, *args, **kwargs):
|
||||
errMsg = "unsupported feature on versions of Python before 2.6"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
|
Loading…
Reference in New Issue
Block a user