mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-10 08:30:36 +03:00
Minor improvement of --forms (jquery)
This commit is contained in:
parent
5cc36b452e
commit
08d3228b5f
|
@ -4471,6 +4471,16 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||||
else:
|
else:
|
||||||
logger.debug(errMsg)
|
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:
|
if addToTargets and retVal:
|
||||||
for target in retVal:
|
for target in retVal:
|
||||||
kb.targets.add(target)
|
kb.targets.add(target)
|
||||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.10.1"
|
VERSION = "1.3.10.2"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user