Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b798222

Browse files
committed
Minor fixes
1 parent b380d34 commit b798222

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ def dataToOutFile(data):
380380

381381
rFile = filePathToString(conf.rFile)
382382
rFilePath = "%s%s%s" % (conf.filePath, os.sep, rFile)
383-
rFileFP = codecs.open(rFilePath, "wb", conf.dataEncoding)
383+
rFileFP = codecs.open(rFilePath, "wb")
384384

385-
rFileFP.write(utf8decode(data))
385+
rFileFP.write(data)
386386
rFileFP.flush()
387387
rFileFP.close()
388388

@@ -421,7 +421,7 @@ def fileToStr(fileName):
421421
@rtype: C{str}
422422
"""
423423

424-
filePointer = codecs.open(fileName, "rb", conf.dataEncoding)
424+
filePointer = codecs.open(fileName, "rb")
425425
fileText = filePointer.read()
426426

427427
return fileText.replace(" ", "").replace("\t", "").replace("\r", "").replace("\n", " ")

lib/core/optiondict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"getCurrentDb": ("boolean", "Databases"),
9393
"isDba": "boolean",
9494
"getUsers": ("boolean", "Users"),
95-
"getPasswordHashes": ("boolean", "Hashes"),
95+
"getPasswordHashes": ("boolean", "Passwords"),
9696
"getPrivileges": ("boolean", "Privileges"),
9797
"getRoles": ("boolean", "Roles"),
9898
"getDbs": ("boolean", "Databases"),

lib/core/target.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __setOutputResume():
127127
__url_cache = set()
128128
__expression_cache = {}
129129

130-
for line in readSessionFP.readlines(): #xreadlines doesn't return unicode strings when codec.open used
130+
for line in readSessionFP.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used
131131
if line.count("][") == 4:
132132
line = line.split("][")
133133

@@ -142,7 +142,7 @@ def __setOutputResume():
142142
if url[0] == "[":
143143
url = url[1:]
144144

145-
value = value.rstrip('\r\n') #strips both chars independently
145+
value = value.rstrip('\r\n') # Strips both chars independently
146146

147147
if url not in ( conf.url, conf.hostname ):
148148
continue

lib/parse/configfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
with sqlmap; if not, write to the Free Software Foundation, Inc., 51
2222
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
"""
24+
2425
import codecs
2526

2627
from ConfigParser import NoSectionError

lib/techniques/blind/inference.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ def downloadThread():
414414

415415
break
416416
elif commonCharset:
417-
# TODO: this part does not seem to work yet
418417
val = getChar(index, commonCharset, False)
419418

420419
# If we had no luck with singleValue and common charset,

plugins/generic/enumeration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ def getTables(self):
775775
plusOne = True
776776
else:
777777
plusOne = False
778-
indexRange = getRange(count)
778+
indexRange = getRange(count, plusOne=plusOne)
779779

780780
for index in indexRange:
781781
if kb.dbms in ("SQLite", "Firebird"):

0 commit comments

Comments
 (0)