From 0766f15ab34903a35c185a16d39316c0f5d18e62 Mon Sep 17 00:00:00 2001 From: Mariusz Skoneczko Date: Tue, 8 Oct 2019 15:30:45 +1100 Subject: [PATCH] Fix --forms with --second-url to choose correct page --- lib/core/option.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 8b38a6866..7db92e524 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -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)