mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 16:24:25 +03:00
minor update
This commit is contained in:
parent
872a73f631
commit
02bd9a54f3
|
@ -79,6 +79,7 @@ from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||||
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
|
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
from lib.core.settings import DBMS_DICT
|
from lib.core.settings import DBMS_DICT
|
||||||
|
from lib.core.settings import DEFAULT_CSV_DELIMITER
|
||||||
from lib.core.settings import DESCRIPTION
|
from lib.core.settings import DESCRIPTION
|
||||||
from lib.core.settings import DUMMY_SQL_INJECTION_CHARS
|
from lib.core.settings import DUMMY_SQL_INJECTION_CHARS
|
||||||
from lib.core.settings import IS_WIN
|
from lib.core.settings import IS_WIN
|
||||||
|
@ -2988,7 +2989,7 @@ def safeCSValue(value):
|
||||||
|
|
||||||
if retVal and isinstance(retVal, basestring):
|
if retVal and isinstance(retVal, basestring):
|
||||||
if not (retVal[0] == retVal[-1] == '"'):
|
if not (retVal[0] == retVal[-1] == '"'):
|
||||||
if any(map(lambda x: x in retVal, ['"', ',', '\n'])):
|
if any(map(lambda x: x in retVal, [DEFAULT_CSV_DELIMITER, '"', '\n'])):
|
||||||
retVal = '"%s"' % retVal.replace('"', '""')
|
retVal = '"%s"' % retVal.replace('"', '""')
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
|
@ -24,6 +24,7 @@ from lib.core.data import kb
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
from lib.core.enums import DBMS
|
from lib.core.enums import DBMS
|
||||||
from lib.core.replication import Replication
|
from lib.core.replication import Replication
|
||||||
|
from lib.core.settings import DEFAULT_CSV_DELIMITER
|
||||||
from lib.core.settings import TRIM_STDOUT_DUMP_SIZE
|
from lib.core.settings import TRIM_STDOUT_DUMP_SIZE
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
|
|
||||||
|
@ -397,7 +398,7 @@ class Dump:
|
||||||
if field == fields:
|
if field == fields:
|
||||||
dataToDumpFile(dumpFP, "%s" % safeCSValue(column))
|
dataToDumpFile(dumpFP, "%s" % safeCSValue(column))
|
||||||
else:
|
else:
|
||||||
dataToDumpFile(dumpFP, "%s," % safeCSValue(column))
|
dataToDumpFile(dumpFP, "%s%s" % (safeCSValue(column), DEFAULT_CSV_DELIMITER))
|
||||||
|
|
||||||
field += 1
|
field += 1
|
||||||
|
|
||||||
|
@ -443,7 +444,7 @@ class Dump:
|
||||||
if field == fields:
|
if field == fields:
|
||||||
dataToDumpFile(dumpFP, "%s" % safeCSValue(value))
|
dataToDumpFile(dumpFP, "%s" % safeCSValue(value))
|
||||||
else:
|
else:
|
||||||
dataToDumpFile(dumpFP, "%s," % safeCSValue(value))
|
dataToDumpFile(dumpFP, "%s%s" % (safeCSValue(value), DEFAULT_CSV_DELIMITER))
|
||||||
|
|
||||||
field += 1
|
field += 1
|
||||||
|
|
||||||
|
|
|
@ -413,6 +413,9 @@ UNENCODED_ORIGINAL_VALUE = 'original'
|
||||||
# Common column names containing usernames (used for hash cracking in some cases)
|
# Common column names containing usernames (used for hash cracking in some cases)
|
||||||
COMMON_USER_COLUMNS = ('user', 'username', 'user_name', 'benutzername', 'benutzer', 'utilisateur', 'usager', 'consommateur', 'utente', 'utilizzatore', 'usufrutuario', 'korisnik', 'usuario', 'consumidor')
|
COMMON_USER_COLUMNS = ('user', 'username', 'user_name', 'benutzername', 'benutzer', 'utilisateur', 'usager', 'consommateur', 'utente', 'utilizzatore', 'usufrutuario', 'korisnik', 'usuario', 'consumidor')
|
||||||
|
|
||||||
|
# Default delimiter used in CSV file format
|
||||||
|
DEFAULT_CSV_DELIMITER = ','
|
||||||
|
|
||||||
# Default delimiter in GET/POST values
|
# Default delimiter in GET/POST values
|
||||||
DEFAULT_GET_POST_DELIMITER = '&'
|
DEFAULT_GET_POST_DELIMITER = '&'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user