mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
minor beautification for --tor switch
This commit is contained in:
parent
e05a9c0554
commit
0b2da2f9f5
|
@ -97,6 +97,7 @@ class WARNFLAGS:
|
|||
RANDOM_AGENT = 'randomAgent'
|
||||
DATA_TO_STDOUT = 'dataToStdout'
|
||||
THREADS = 'threads'
|
||||
TOR = 'tor'
|
||||
|
||||
class EXPECTED:
|
||||
BOOL = "bool"
|
||||
|
|
|
@ -1241,6 +1241,9 @@ def __cleanupOptions():
|
|||
conf.threads = 3 if conf.threads < 3 else conf.threads
|
||||
|
||||
if conf.tor:
|
||||
infoMsg = "setting Tor proxy settings"
|
||||
logger.info(infoMsg)
|
||||
|
||||
conf.proxy = DEFAULT_TOR_PROXY
|
||||
|
||||
if conf.data:
|
||||
|
|
|
@ -48,6 +48,7 @@ from lib.core.exception import sqlmapConnectionException
|
|||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.settings import HTTP_SILENT_TIMEOUT
|
||||
from lib.core.settings import META_REFRESH_REGEX
|
||||
from lib.core.settings import IS_WIN
|
||||
from lib.core.settings import MIN_TIME_RESPONSES
|
||||
from lib.core.settings import WARN_TIME_STDEV
|
||||
from lib.core.settings import URI_HTTP_HEADER
|
||||
|
@ -390,10 +391,22 @@ class Connect:
|
|||
logger.critical(warnMsg)
|
||||
|
||||
if kb.originalPage is None:
|
||||
warnMsg = "if the problem persists please try to rerun "
|
||||
warnMsg += "with the --random-agent switch turned on "
|
||||
warnMsg += "and/or try to use proxy switches (--ignore-proxy, --proxy,...)"
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.RANDOM_AGENT)
|
||||
if conf.tor:
|
||||
warnMsg = "please make sure that you have "
|
||||
warnMsg += "some kind of Vidalia/Privoxy/Polipo "
|
||||
warnMsg += "Tor proxy bundle installed for "
|
||||
warnMsg += "you to be able to successfully use "
|
||||
warnMsg += "--tor switch "
|
||||
if IS_WIN:
|
||||
warnMsg += "(e.g. https://www.torproject.org/projects/vidalia.html.en)"
|
||||
else:
|
||||
warnMsg += "(e.g. http://www.coresec.org/2011/04/24/sqlmap-with-tor/)"
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.TOR)
|
||||
else:
|
||||
warnMsg = "if the problem persists please try to rerun "
|
||||
warnMsg += "with the --random-agent switch turned on "
|
||||
warnMsg += "and/or try to use proxy switches (--ignore-proxy, --proxy,...)"
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.RANDOM_AGENT)
|
||||
elif conf.threads > 1:
|
||||
warnMsg = "if the problem persists please try to lower "
|
||||
warnMsg += "the number of used threads (--threads)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user