code refactoring regarding issue #184

This commit is contained in:
Miroslav Stampar
2010-05-24 11:12:40 +00:00
parent e9be60e1ac
commit 0197f8db5c
4 changed files with 9 additions and 8 deletions

View File

@@ -122,7 +122,7 @@ def __setOutputResume():
if os.path.exists(conf.sessionFile):
if not conf.flushSession:
readSessionFP = codecs.open(conf.sessionFile, "r", "utf-8")
readSessionFP = codecs.open(conf.sessionFile, "r", conf.dataEncoding)
__url_cache = set()
__expression_cache = {}
@@ -171,7 +171,7 @@ def __setOutputResume():
raise sqlmapFilePathException, errMsg
try:
conf.sessionFP = codecs.open(conf.sessionFile, "a", "utf-8")
conf.sessionFP = codecs.open(conf.sessionFile, "a", conf.dataEncoding)
dataToSessionFile("\n[%s]\n" % time.strftime("%X %x"))
except IOError:
errMsg = "unable to write on the session file specified"