Skip to content

Commit 78ca371

Browse files
committed
Adding option --web-root (Issue sqlmapproject#2419)
1 parent a35c976 commit 78ca371

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

lib/core/common.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,11 @@ def getManualDirectories():
730730

731731
directories = normalizePath(directories)
732732

733-
if directories:
733+
if conf.webRoot:
734+
directories = [conf.webRoot]
735+
infoMsg = "using '%s' as web server document root" % conf.webRoot
736+
logger.info(infoMsg)
737+
elif directories:
734738
infoMsg = "retrieved the web server document root: '%s'" % directories
735739
logger.info(infoMsg)
736740
else:

lib/core/optiondict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
"skipWaf": "boolean",
230230
"smart": "boolean",
231231
"tmpDir": "string",
232+
"webRoot": "string",
232233
"wizard": "boolean",
233234
"verbose": "integer",
234235
},

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.2.21"
22+
VERSION = "1.1.3.0"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,9 @@ def cmdLineParser(argv=None):
756756
miscellaneous.add_option("--tmp-dir", dest="tmpDir",
757757
help="Local directory for storing temporary files")
758758

759+
miscellaneous.add_option("--web-root", dest="webRoot",
760+
help="Web server document root directory (e.g. \"/var/www\")")
761+
759762
miscellaneous.add_option("--wizard", dest="wizard",
760763
action="store_true",
761764
help="Simple wizard interface for beginner users")

sqlmap.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,9 @@ smart = False
790790
# Local directory for storing temporary files.
791791
tmpDir =
792792

793+
# Web server document root directory (e.g. "/var/www").
794+
webRoot =
795+
793796
# Simple wizard interface for beginner users.
794797
# Valid: True or False
795798
wizard = False

txt/checksum.md5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dc386321e8813788f155dc557a78be8d lib/controller/controller.py
2626
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
2727
19905ecb4437b94512cf21d5f1720091 lib/core/agent.py
2828
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
29-
7a8ce69bba0dc1fda2cd3bba3cbad092 lib/core/common.py
29+
49a5b57e69bd15a3f718e880fb7fa01f lib/core/common.py
3030
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
3131
a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
3232
7936d78b1a7f1f008ff92bf2f88574ba lib/core/datatype.py
@@ -38,14 +38,14 @@ a8143dab9d3a27490f7d49b6b29ea530 lib/core/data.py
3838
9381a0c7e8bc19986299e84f4edda1a0 lib/core/exception.py
3939
310efc965c862cfbd7b0da5150a5ad36 lib/core/__init__.py
4040
9ba39bf66e9ecd469446bdbbeda906c3 lib/core/log.py
41-
5831b80df6764faf1dd9470ff589ae87 lib/core/optiondict.py
41+
66c9795e2e7da32f46f04497ae910070 lib/core/optiondict.py
4242
0324fce84ef88ed0416123f73c54a6d7 lib/core/option.py
4343
5f2f56e6c5f274408df61943f1e080c0 lib/core/profiling.py
4444
40be71cd774662a7b420caeb7051e7d5 lib/core/readlineng.py
4545
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4646
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4747
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
48-
b31d1e512f49ff729ea81a7052236514 lib/core/settings.py
48+
36001abd1286001c8d1ad41212290cba lib/core/settings.py
4949
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5050
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5151
afd0636d2e93c23f4f0a5c9b6023ea17 lib/core/target.py
@@ -56,7 +56,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
5656
4d13ed693401a498b6d073a2a494bd83 lib/core/wordlist.py
5757
310efc965c862cfbd7b0da5150a5ad36 lib/__init__.py
5858
8c4b04062db2245d9e190b413985202a lib/parse/banner.py
59-
31156d03e6f80842073cb78835d81c39 lib/parse/cmdline.py
59+
942e1d7cb6f777ff198358d43246c40c lib/parse/cmdline.py
6060
3a31657bc38f277d0016ff6d50bde61f lib/parse/configfile.py
6161
14539f1be714d4f1ed042067d63bc50a lib/parse/handler.py
6262
64e5bb3ecbdd75144500588b437ba8da lib/parse/headers.py

0 commit comments

Comments
 (0)