mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Patch for --forms/--crawl (if no protocol specified)
This commit is contained in:
parent
5c5719b81a
commit
7a6e2df997
2 changed files with 10 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue