This commit is contained in:
Miroslav Stampar
2019-05-24 22:49:33 +02:00
parent e869728972
commit 791873e77c
2 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,6 @@ import ssl
import socket
import string
import struct
import subprocess
import sys
import time
import zlib
@@ -58,11 +57,8 @@ else:
Request = urllib2.Request
HTTPCookieProcessor = urllib2.HTTPCookieProcessor
# Reference: http://blog.mathieu-leplatre.info/python-utf-8-print-fails-when-redirecting-stdout.html
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
NAME = "identYwaf"
VERSION = "1.0.111"
VERSION = "1.0.113"
BANNER = """
` __ __ `
____ ___ ___ ____ ______ `| T T` __ __ ____ _____
@@ -359,6 +355,10 @@ def load_data():
def init():
os.chdir(os.path.abspath(os.path.dirname(__file__)))
# Reference: http://blog.mathieu-leplatre.info/python-utf-8-print-fails-when-redirecting-stdout.html
if IS_TTY:
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
print(colorize("[o] initializing handlers..."))
# Reference: https://stackoverflow.com/a/28052583