Couple of minor patches

This commit is contained in:
Miroslav Stampar 2019-11-08 23:28:51 +01:00
parent 9ad3cd5176
commit 404d8481ad
3 changed files with 5 additions and 4 deletions

View File

@ -4421,7 +4421,7 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
try:
forms = ParseResponse(response, backwards_compat=False)
except ParseError:
if re.search(r"(?i)<!DOCTYPE html|<html", content or ""):
if re.search(r"(?i)<!DOCTYPE html|<html", content or "") and not re.search(r"(?i)\.js(\?|\Z)", url):
dbgMsg = "badly formed HTML at the given URL ('%s'). Going to filter it" % url
logger.debug(dbgMsg)
filtered = _("".join(re.findall(FORM_SEARCH_REGEX, content)), url)

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.11.21"
VERSION = "1.3.11.22"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -567,8 +567,9 @@ class Connect(object):
if not refresh:
refresh = extractRegexResult(JAVASCRIPT_HREF_REGEX, page)
debugMsg = "got Javascript redirect request"
logger.debug(debugMsg)
if refresh:
debugMsg = "got Javascript redirect request"
logger.debug(debugMsg)
if refresh:
if kb.alwaysRefresh is None: