Patch for --forms/--crawl (if no protocol specified)

This commit is contained in:
Miroslav Stampar 2019-10-31 20:40:37 +01:00
parent 5c5719b81a
commit 7a6e2df997
2 changed files with 10 additions and 2 deletions

View File

@ -347,6 +347,10 @@ def _setCrawler():
for i in xrange(len(targets)):
try:
target = targets[i]
if not re.search(r"\Ahttp[s]*://", target):
target = "http://%s" % target
crawl(target)
if conf.verbose in (1, 2):
@ -484,7 +488,11 @@ def _findPageForms():
for i in xrange(len(targets)):
try:
target = targets[i]
target = targets[i].strip()
if not re.search(r"\Ahttp[s]*://", target):
target = "http://%s" % target
page, _, _ = Request.getPage(url=target.strip(), cookie=conf.cookie, crawling=True, raise404=False)
if findPageForms(page, target, False, True):
found = True

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.10.33"
VERSION = "1.3.10.34"
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)