mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 14:11:29 +00:00
Minor fixes
This commit is contained in:
@@ -380,9 +380,9 @@ def dataToOutFile(data):
|
||||
|
||||
rFile = filePathToString(conf.rFile)
|
||||
rFilePath = "%s%s%s" % (conf.filePath, os.sep, rFile)
|
||||
rFileFP = codecs.open(rFilePath, "wb", conf.dataEncoding)
|
||||
rFileFP = codecs.open(rFilePath, "wb")
|
||||
|
||||
rFileFP.write(utf8decode(data))
|
||||
rFileFP.write(data)
|
||||
rFileFP.flush()
|
||||
rFileFP.close()
|
||||
|
||||
@@ -421,7 +421,7 @@ def fileToStr(fileName):
|
||||
@rtype: C{str}
|
||||
"""
|
||||
|
||||
filePointer = codecs.open(fileName, "rb", conf.dataEncoding)
|
||||
filePointer = codecs.open(fileName, "rb")
|
||||
fileText = filePointer.read()
|
||||
|
||||
return fileText.replace(" ", "").replace("\t", "").replace("\r", "").replace("\n", " ")
|
||||
|
||||
@@ -92,7 +92,7 @@ optDict = {
|
||||
"getCurrentDb": ("boolean", "Databases"),
|
||||
"isDba": "boolean",
|
||||
"getUsers": ("boolean", "Users"),
|
||||
"getPasswordHashes": ("boolean", "Hashes"),
|
||||
"getPasswordHashes": ("boolean", "Passwords"),
|
||||
"getPrivileges": ("boolean", "Privileges"),
|
||||
"getRoles": ("boolean", "Roles"),
|
||||
"getDbs": ("boolean", "Databases"),
|
||||
|
||||
@@ -127,7 +127,7 @@ def __setOutputResume():
|
||||
__url_cache = set()
|
||||
__expression_cache = {}
|
||||
|
||||
for line in readSessionFP.readlines(): #xreadlines doesn't return unicode strings when codec.open used
|
||||
for line in readSessionFP.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used
|
||||
if line.count("][") == 4:
|
||||
line = line.split("][")
|
||||
|
||||
@@ -142,7 +142,7 @@ def __setOutputResume():
|
||||
if url[0] == "[":
|
||||
url = url[1:]
|
||||
|
||||
value = value.rstrip('\r\n') #strips both chars independently
|
||||
value = value.rstrip('\r\n') # Strips both chars independently
|
||||
|
||||
if url not in ( conf.url, conf.hostname ):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user