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():
|
||||
return
|
||||
|
||||
# workaround for second url to get the injection page rather than result page
|
||||
secondUrl = conf.secondUrl
|
||||
conf.secondUrl = None
|
||||
|
||||
found = False
|
||||
infoMsg = "searching for forms"
|
||||
logger.info(infoMsg)
|
||||
|
||||
if not any((conf.bulkFile, conf.googleDork, conf.sitemapUrl)):
|
||||
page, _, _ = Request.queryPage(content=True)
|
||||
page, _, _ = Request.getPage()
|
||||
if findPageForms(page, conf.url, True, True):
|
||||
found = True
|
||||
else:
|
||||
|
@ -497,6 +501,9 @@ def _findPageForms():
|
|||
errMsg = "problem occurred while searching for forms at '%s' ('%s')" % (target, getSafeExString(ex))
|
||||
logger.error(errMsg)
|
||||
|
||||
# restore workaround
|
||||
conf.secondUrl = secondUrl
|
||||
|
||||
if not found:
|
||||
warnMsg = "no forms found"
|
||||
logger.warn(warnMsg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user