mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
More replacements from open() to codecs.open(). conf.dataEncoding has to be used only for non-binary files.
This commit is contained in:
@@ -23,6 +23,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
"""
|
||||
|
||||
import binascii
|
||||
import codecs
|
||||
import os
|
||||
|
||||
from lib.core.agent import agent
|
||||
@@ -163,8 +164,8 @@ class Filesystem:
|
||||
"""
|
||||
|
||||
fcEncodedList = []
|
||||
fp = open(fileName, "rb")
|
||||
fcEncodedStr = fp.read().encode(encoding).replace("\n", "")
|
||||
fp = codecs.open(fileName, "rb")
|
||||
fcEncodedStr = fp.read().encode(encoding).replace("\n", "")
|
||||
|
||||
if not single:
|
||||
fcLength = len(fcEncodedStr)
|
||||
|
||||
Reference in New Issue
Block a user