Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90a735e

Browse files
committed
Adding advice(s) in case of no provided parameters
1 parent 28c5a70 commit 90a735e

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/controller/controller.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,14 @@ def start():
604604
if kb.vainRun and not conf.multipleTargets:
605605
errMsg = "no parameter(s) found for testing in the provided data "
606606
errMsg += "(e.g. GET parameter 'id' in 'www.site.com/index.php?id=1')"
607+
if kb.originalPage:
608+
advice = []
609+
if not conf.forms and re.search(r"<form", kb.originalPage) is not None:
610+
advice.append("--forms")
611+
if not conf.crawlDepth and re.search(r"href=[\"']/?\w", kb.originalPage) is not None:
612+
advice.append("--crawl=2")
613+
if advice:
614+
errMsg += ". You are advised to rerun with '%s'" % ' '.join(advice)
607615
raise SqlmapNoneDataException(errMsg)
608616
else:
609617
errMsg = "all tested parameters do not appear to be injectable."

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

0 commit comments

Comments
 (0)