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

Skip to content

Commit 7a6e2df

Browse files
committed
Patch for --forms/--crawl (if no protocol specified)
1 parent 5c5719b commit 7a6e2df

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

lib/core/option.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ def _setCrawler():
347347
for i in xrange(len(targets)):
348348
try:
349349
target = targets[i]
350+
351+
if not re.search(r"\Ahttp[s]*://", target):
352+
target = "http://%s" % target
353+
350354
crawl(target)
351355

352356
if conf.verbose in (1, 2):
@@ -484,7 +488,11 @@ def _findPageForms():
484488

485489
for i in xrange(len(targets)):
486490
try:
487-
target = targets[i]
491+
target = targets[i].strip()
492+
493+
if not re.search(r"\Ahttp[s]*://", target):
494+
target = "http://%s" % target
495+
488496
page, _, _ = Request.getPage(url=target.strip(), cookie=conf.cookie, crawling=True, raise404=False)
489497
if findPageForms(page, target, False, True):
490498
found = True

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.10.33"
21+
VERSION = "1.3.10.34"
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)