mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
More generic implementation for --proxy-file (accepting public lists format)
This commit is contained in:
parent
36a590e085
commit
1c92d8d51f
|
@ -47,6 +47,7 @@ from lib.core.common import parseTargetUrl
|
||||||
from lib.core.common import paths
|
from lib.core.common import paths
|
||||||
from lib.core.common import randomRange
|
from lib.core.common import randomRange
|
||||||
from lib.core.common import randomStr
|
from lib.core.common import randomStr
|
||||||
|
from lib.core.common import readCachedFileContent
|
||||||
from lib.core.common import readInput
|
from lib.core.common import readInput
|
||||||
from lib.core.common import resetCookieJar
|
from lib.core.common import resetCookieJar
|
||||||
from lib.core.common import runningAsAdmin
|
from lib.core.common import runningAsAdmin
|
||||||
|
@ -1947,7 +1948,10 @@ def _setProxyList():
|
||||||
if not conf.proxyFile:
|
if not conf.proxyFile:
|
||||||
return
|
return
|
||||||
|
|
||||||
conf.proxyList = getFileItems(conf.proxyFile)
|
conf.proxyList = []
|
||||||
|
for match in re.finditer(r"(?i)((http[^:]*|socks[^:]*)://)?([\w.]+):(\d+)", readCachedFileContent(conf.proxyFile)):
|
||||||
|
_, type_, address, port = match.groups()
|
||||||
|
conf.proxyList.append("%s://%s:%s" % (type_ or "http", address, port))
|
||||||
|
|
||||||
def _setTorProxySettings():
|
def _setTorProxySettings():
|
||||||
if not conf.tor:
|
if not conf.tor:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user