mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-14 12:43:45 +03:00
Finishing implementation for an Issue #58
This commit is contained in:
parent
c586559e30
commit
23f2c5f166
|
@ -2246,9 +2246,6 @@ def logHTTPTraffic(requestLogMsg, responseLogMsg):
|
||||||
def getPageTemplate(payload, place): # Cross-linked function
|
def getPageTemplate(payload, place): # Cross-linked function
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def setHTTPProxy(): # Cross-linked function
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def getPublicTypeMembers(type_, onlyValues=False):
|
def getPublicTypeMembers(type_, onlyValues=False):
|
||||||
"""
|
"""
|
||||||
Useful for getting members from types (e.g. in enums)
|
Useful for getting members from types (e.g. in enums)
|
||||||
|
|
|
@ -22,6 +22,7 @@ import urlparse
|
||||||
import lib.core.common
|
import lib.core.common
|
||||||
import lib.core.threads
|
import lib.core.threads
|
||||||
import lib.core.convert
|
import lib.core.convert
|
||||||
|
import lib.request.connect
|
||||||
|
|
||||||
from lib.controller.checks import checkConnection
|
from lib.controller.checks import checkConnection
|
||||||
from lib.core.common import Backend
|
from lib.core.common import Backend
|
||||||
|
@ -985,6 +986,9 @@ def _setHTTPProxy():
|
||||||
if conf.proxyList:
|
if conf.proxyList:
|
||||||
conf.proxy = conf.proxyList[0]
|
conf.proxy = conf.proxyList[0]
|
||||||
conf.proxyList = conf.proxyList[1:] + conf.proxyList[:1]
|
conf.proxyList = conf.proxyList[1:] + conf.proxyList[:1]
|
||||||
|
|
||||||
|
infoMsg = "loading proxy '%s' from a supplied proxy list file" % conf.proxy
|
||||||
|
logger.info(infoMsg)
|
||||||
else:
|
else:
|
||||||
if conf.hostname in ('localhost', '127.0.0.1') or conf.ignoreProxy:
|
if conf.hostname in ('localhost', '127.0.0.1') or conf.ignoreProxy:
|
||||||
proxyHandler.proxies = {}
|
proxyHandler.proxies = {}
|
||||||
|
@ -2172,8 +2176,8 @@ def _basicOptionValidation():
|
||||||
def _resolveCrossReferences():
|
def _resolveCrossReferences():
|
||||||
lib.core.threads.readInput = readInput
|
lib.core.threads.readInput = readInput
|
||||||
lib.core.common.getPageTemplate = getPageTemplate
|
lib.core.common.getPageTemplate = getPageTemplate
|
||||||
lib.core.common.setHTTPProxy = _setHTTPProxy
|
|
||||||
lib.core.convert.singleTimeWarnMessage = singleTimeWarnMessage
|
lib.core.convert.singleTimeWarnMessage = singleTimeWarnMessage
|
||||||
|
lib.request.connect.setHTTPProxy = _setHTTPProxy
|
||||||
|
|
||||||
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
|
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
|
||||||
if not inputOptions.disableColoring:
|
if not inputOptions.disableColoring:
|
||||||
|
|
|
@ -37,7 +37,6 @@ from lib.core.common import randomInt
|
||||||
from lib.core.common import randomStr
|
from lib.core.common import randomStr
|
||||||
from lib.core.common import readInput
|
from lib.core.common import readInput
|
||||||
from lib.core.common import removeReflectiveValues
|
from lib.core.common import removeReflectiveValues
|
||||||
from lib.core.common import setHTTPProxy
|
|
||||||
from lib.core.common import singleTimeLogMessage
|
from lib.core.common import singleTimeLogMessage
|
||||||
from lib.core.common import singleTimeWarnMessage
|
from lib.core.common import singleTimeWarnMessage
|
||||||
from lib.core.common import stdev
|
from lib.core.common import stdev
|
||||||
|
@ -112,8 +111,7 @@ class Connect(object):
|
||||||
warnMsg = "changing proxy"
|
warnMsg = "changing proxy"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
conf.proxy = conf.proxyList[0]
|
conf.proxy = None
|
||||||
conf.proxyList = conf.proxyList[1:] + conf.proxyList[:1]
|
|
||||||
setHTTPProxy()
|
setHTTPProxy()
|
||||||
|
|
||||||
if kb.testMode and kb.previousMethod == PAYLOAD.METHOD.TIME:
|
if kb.testMode and kb.previousMethod == PAYLOAD.METHOD.TIME:
|
||||||
|
@ -900,3 +898,6 @@ class Connect(object):
|
||||||
return comparison(page, headers, code, getRatioValue=False, pageLength=pageLength), comparison(page, headers, code, getRatioValue=True, pageLength=pageLength)
|
return comparison(page, headers, code, getRatioValue=False, pageLength=pageLength), comparison(page, headers, code, getRatioValue=True, pageLength=pageLength)
|
||||||
else:
|
else:
|
||||||
return comparison(page, headers, code, getRatioValue, pageLength)
|
return comparison(page, headers, code, getRatioValue, pageLength)
|
||||||
|
|
||||||
|
def setHTTPProxy(): # Cross-linked function
|
||||||
|
raise NotImplementedError
|
||||||
|
|
Loading…
Reference in New Issue
Block a user