mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Patch for an Issue #978
This commit is contained in:
@@ -145,17 +145,21 @@ def htmlunescape(value):
|
||||
return retVal
|
||||
|
||||
def singleTimeWarnMessage(message): # Cross-linked function
|
||||
raise NotImplementedError
|
||||
sys.stdout.write(message)
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
def stdoutencode(data):
|
||||
retVal = None
|
||||
|
||||
try:
|
||||
data = data or ""
|
||||
|
||||
# Reference: http://bugs.python.org/issue1602
|
||||
if IS_WIN:
|
||||
output = data.encode("ascii", "replace")
|
||||
output = data.encode(sys.stdout.encoding, "replace")
|
||||
|
||||
if output != data:
|
||||
if '?' in output:
|
||||
warnMsg = "cannot properly display Unicode characters "
|
||||
warnMsg += "inside Windows OS command prompt "
|
||||
warnMsg += "(http://bugs.python.org/issue1602). All "
|
||||
|
||||
Reference in New Issue
Block a user