mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
possible fix for a bug reported by Black Zero (UnicodeDecodeError for --forms)
This commit is contained in:
parent
3a1f5744be
commit
bc50387a17
|
@ -30,6 +30,7 @@ from lib.core.common import extractRegexResult
|
||||||
from lib.core.common import getConsoleWidth
|
from lib.core.common import getConsoleWidth
|
||||||
from lib.core.common import getFileItems
|
from lib.core.common import getFileItems
|
||||||
from lib.core.common import getFileType
|
from lib.core.common import getFileType
|
||||||
|
from lib.core.common import getUnicode
|
||||||
from lib.core.common import normalizePath
|
from lib.core.common import normalizePath
|
||||||
from lib.core.common import ntToPosixSlashes
|
from lib.core.common import ntToPosixSlashes
|
||||||
from lib.core.common import openFile
|
from lib.core.common import openFile
|
||||||
|
@ -43,6 +44,7 @@ from lib.core.common import readInput
|
||||||
from lib.core.common import runningAsAdmin
|
from lib.core.common import runningAsAdmin
|
||||||
from lib.core.common import sanitizeStr
|
from lib.core.common import sanitizeStr
|
||||||
from lib.core.common import UnicodeRawConfigParser
|
from lib.core.common import UnicodeRawConfigParser
|
||||||
|
from lib.core.convert import urldecode
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
from lib.core.data import kb
|
from lib.core.data import kb
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
|
@ -444,10 +446,9 @@ def __findPageForms():
|
||||||
if forms:
|
if forms:
|
||||||
for form in forms:
|
for form in forms:
|
||||||
request = form.click()
|
request = form.click()
|
||||||
url = request.get_full_url()
|
url = urldecode(request.get_full_url())
|
||||||
method = request.get_method()
|
method = request.get_method()
|
||||||
data = request.get_data() if request.has_data() else None
|
data = urldecode(getUnicode(request.get_data(), kb.pageEncoding)) if request.has_data() else None
|
||||||
|
|
||||||
target = (url, method, data, conf.cookie)
|
target = (url, method, data, conf.cookie)
|
||||||
kb.targetUrls.add(target)
|
kb.targetUrls.add(target)
|
||||||
kb.formNames.append(target)
|
kb.formNames.append(target)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user