mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-29 01:13:28 +03:00
few fixes here and there
This commit is contained in:
parent
7e78876f6a
commit
f24187f251
|
@ -1359,3 +1359,9 @@ def getCommonStart(strings=[]):
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
def getBruteUnicode(string):
|
||||||
|
retVal = unicode()
|
||||||
|
for char in string:
|
||||||
|
retVal += unichr(ord(char))
|
||||||
|
return retVal
|
||||||
|
|
|
@ -51,7 +51,7 @@ class Connector(GenericConnector):
|
||||||
self.initConnection()
|
self.initConnection()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.connector = MySQLdb.connect(host=self.hostname, user=self.user, passwd=self.password, db=self.db, port=self.port, connect_timeout=conf.timeout)
|
self.connector = MySQLdb.connect(host=self.hostname, user=self.user, passwd=self.password, db=self.db, port=self.port, connect_timeout=conf.timeout, use_unicode=True)
|
||||||
except MySQLdb.OperationalError, msg:
|
except MySQLdb.OperationalError, msg:
|
||||||
raise sqlmapConnectionException, msg[1]
|
raise sqlmapConnectionException, msg[1]
|
||||||
|
|
||||||
|
|
|
@ -440,7 +440,7 @@ class Enumeration:
|
||||||
|
|
||||||
# In PostgreSQL we get 1 if the privilege is
|
# In PostgreSQL we get 1 if the privilege is
|
||||||
# True, 0 otherwise
|
# True, 0 otherwise
|
||||||
if kb.dbms == "PostgreSQL" and str(privilege).isdigit():
|
if kb.dbms == "PostgreSQL" and unicode(privilege).isdigit():
|
||||||
for position, pgsqlPriv in pgsqlPrivs:
|
for position, pgsqlPriv in pgsqlPrivs:
|
||||||
if count == position and int(privilege) == 1:
|
if count == position and int(privilege) == 1:
|
||||||
privileges.add(pgsqlPriv)
|
privileges.add(pgsqlPriv)
|
||||||
|
@ -1058,7 +1058,7 @@ class Enumeration:
|
||||||
else:
|
else:
|
||||||
colEntry = entry[index]
|
colEntry = entry[index]
|
||||||
|
|
||||||
colEntryLen = len(str(colEntry))
|
colEntryLen = len(unicode(colEntry))
|
||||||
maxLen = max(colLen, colEntryLen)
|
maxLen = max(colLen, colEntryLen)
|
||||||
|
|
||||||
if maxLen > kb.data.dumpedTable[column]["length"]:
|
if maxLen > kb.data.dumpedTable[column]["length"]:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user