mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Fixes #2997
This commit is contained in:
@@ -3928,6 +3928,9 @@ def isAdminFromPrivileges(privileges):
|
||||
def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||
"""
|
||||
Parses given page content for possible forms
|
||||
|
||||
>>> findPageForms('<html><form action="/input.php" method="POST"><input type="text" name="id" value="1"><input type="submit" value="Submit"></form></html>', '')
|
||||
set([(u'/input.php', 'POST', u'id=1', None, None)])
|
||||
"""
|
||||
|
||||
class _(StringIO):
|
||||
@@ -3950,8 +3953,6 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||
|
||||
try:
|
||||
forms = ParseResponse(response, backwards_compat=False)
|
||||
except (UnicodeError, ValueError):
|
||||
pass
|
||||
except ParseError:
|
||||
if re.search(r"(?i)<!DOCTYPE html|<html", content or ""):
|
||||
warnMsg = "badly formed HTML at the given URL ('%s'). Going to filter it" % url
|
||||
@@ -3967,6 +3968,8 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||
raise SqlmapGenericException(errMsg)
|
||||
else:
|
||||
logger.debug(errMsg)
|
||||
except:
|
||||
pass
|
||||
|
||||
if forms:
|
||||
for form in forms:
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.2.3.37"
|
||||
VERSION = "1.2.3.38"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user