mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 21:13:51 +03:00
Minor bug fix to correctly deal with unicode queries with -d
This commit is contained in:
parent
655bd79fc4
commit
f26de89216
|
@ -100,3 +100,9 @@ def urlencode(string, safe=":/?%&=", convall=False):
|
||||||
result = urllib.quote(string, safe)
|
result = urllib.quote(string, safe)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def utf8encode(string):
|
||||||
|
return string.encode("utf-8")
|
||||||
|
|
||||||
|
def utf8decode(string):
|
||||||
|
return string.decode("utf-8")
|
||||||
|
|
|
@ -26,6 +26,7 @@ from lib.core.agent import agent
|
||||||
from lib.core.common import dataToSessionFile
|
from lib.core.common import dataToSessionFile
|
||||||
from lib.core.convert import base64pickle
|
from lib.core.convert import base64pickle
|
||||||
from lib.core.convert import base64unpickle
|
from lib.core.convert import base64unpickle
|
||||||
|
from lib.core.convert import utf8decode
|
||||||
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
|
||||||
|
@ -35,6 +36,7 @@ from lib.utils.timeout import timeout
|
||||||
def direct(query, content=True):
|
def direct(query, content=True):
|
||||||
output = None
|
output = None
|
||||||
select = False
|
select = False
|
||||||
|
query = utf8decode(query)
|
||||||
query = agent.payloadDirect(query)
|
query = agent.payloadDirect(query)
|
||||||
|
|
||||||
if kb.dbms == "Oracle" and query.startswith("SELECT ") and " FROM " not in query:
|
if kb.dbms == "Oracle" and query.startswith("SELECT ") and " FROM " not in query:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user