diff --git a/lib/core/common.py b/lib/core/common.py index 40df6f83f..a835d20b3 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4471,6 +4471,16 @@ def findPageForms(content, url, raise_=False, addToTargets=False): else: logger.debug(errMsg) + for match in re.finditer(r"\.post\(['\"]([^'\"]*)['\"],\s*\{([^}]*)\}", content): + url = _urllib.parse.urljoin(url, htmlUnescape(match.group(1))) + data = "" + + for name, value in re.findall(r"['\"]?(\w+)['\"]?\s*:\s*(['\"][^'\"]+)?", match.group(2)): + data += "%s=%s%s" % (name, value, DEFAULT_GET_POST_DELIMITER) + + data = data.rstrip(DEFAULT_GET_POST_DELIMITER) + retVal.add((url, HTTPMETHOD.POST, data, conf.cookie, None)) + if addToTargets and retVal: for target in retVal: kb.targets.add(target) diff --git a/lib/core/settings.py b/lib/core/settings.py index af988f7c4..87d763a4d 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.10.1" +VERSION = "1.3.10.2" 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)