mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-27 16:39:54 +03:00
Fix --forms with --second-url to choose correct page
This commit is contained in:
parent
aed137ad80
commit
0766f15ab3
|
@ -462,12 +462,16 @@ def _findPageForms():
|
||||||
if conf.url and not checkConnection():
|
if conf.url and not checkConnection():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# workaround for second url to get the injection page rather than result page
|
||||||
|
secondUrl = conf.secondUrl
|
||||||
|
conf.secondUrl = None
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
infoMsg = "searching for forms"
|
infoMsg = "searching for forms"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
if not any((conf.bulkFile, conf.googleDork, conf.sitemapUrl)):
|
if not any((conf.bulkFile, conf.googleDork, conf.sitemapUrl)):
|
||||||
page, _, _ = Request.queryPage(content=True)
|
page, _, _ = Request.getPage()
|
||||||
if findPageForms(page, conf.url, True, True):
|
if findPageForms(page, conf.url, True, True):
|
||||||
found = True
|
found = True
|
||||||
else:
|
else:
|
||||||
|
@ -497,6 +501,9 @@ def _findPageForms():
|
||||||
errMsg = "problem occurred while searching for forms at '%s' ('%s')" % (target, getSafeExString(ex))
|
errMsg = "problem occurred while searching for forms at '%s' ('%s')" % (target, getSafeExString(ex))
|
||||||
logger.error(errMsg)
|
logger.error(errMsg)
|
||||||
|
|
||||||
|
# restore workaround
|
||||||
|
conf.secondUrl = secondUrl
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
warnMsg = "no forms found"
|
warnMsg = "no forms found"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user