mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-08 15:49:01 +00:00
Adding option --web-root (Issue #2419)
This commit is contained in:
@@ -730,7 +730,11 @@ def getManualDirectories():
|
||||
|
||||
directories = normalizePath(directories)
|
||||
|
||||
if directories:
|
||||
if conf.webRoot:
|
||||
directories = [conf.webRoot]
|
||||
infoMsg = "using '%s' as web server document root" % conf.webRoot
|
||||
logger.info(infoMsg)
|
||||
elif directories:
|
||||
infoMsg = "retrieved the web server document root: '%s'" % directories
|
||||
logger.info(infoMsg)
|
||||
else:
|
||||
|
||||
@@ -229,6 +229,7 @@ optDict = {
|
||||
"skipWaf": "boolean",
|
||||
"smart": "boolean",
|
||||
"tmpDir": "string",
|
||||
"webRoot": "string",
|
||||
"wizard": "boolean",
|
||||
"verbose": "integer",
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.1.2.21"
|
||||
VERSION = "1.1.3.0"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
||||
@@ -756,6 +756,9 @@ def cmdLineParser(argv=None):
|
||||
miscellaneous.add_option("--tmp-dir", dest="tmpDir",
|
||||
help="Local directory for storing temporary files")
|
||||
|
||||
miscellaneous.add_option("--web-root", dest="webRoot",
|
||||
help="Web server document root directory (e.g. \"/var/www\")")
|
||||
|
||||
miscellaneous.add_option("--wizard", dest="wizard",
|
||||
action="store_true",
|
||||
help="Simple wizard interface for beginner users")
|
||||
|
||||
Reference in New Issue
Block a user