Merge branch 'master' into smb_transport
commit
4a0f83fc02
|
@ -58,44 +58,44 @@ BATCH_FILENAME = ''.join(random.sample(string.ascii_letters, 10)) + '.bat'
|
|||
def print_error(message):
|
||||
try:
|
||||
cprint("[-] ", 'red', attrs=['bold'], end=message.decode('utf8')+'\n')
|
||||
except UnicodeDecodeError:
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
cprint("[-] ", 'red', attrs=['bold'], end=unicode(message, errors='ignore')+'\n')
|
||||
|
||||
def print_status(message):
|
||||
try:
|
||||
cprint("[*] ", 'blue', attrs=['bold'], end=message.decode('utf8')+'\n')
|
||||
except UnicodeDecodeError:
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
cprint("[*] ", 'blue', attrs=['bold'], end=unicode(message, errors='ignore')+'\n')
|
||||
|
||||
def print_succ(message):
|
||||
try:
|
||||
cprint("[+] ", 'green', attrs=['bold'], end=message.decode('utf8')+'\n')
|
||||
except UnicodeDecodeError:
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
cprint("[+] ", 'green', attrs=['bold'], end=unicode(message, errors='ignore')+'\n')
|
||||
|
||||
def print_att(message):
|
||||
try:
|
||||
cprint(message.decode('utf8'), 'yellow', attrs=['bold'])
|
||||
except UnicodeDecodeError:
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
cprint(unicode(message, errors='ignore'), 'yellow', attrs=['bold'])
|
||||
|
||||
def yellow(text):
|
||||
try:
|
||||
colored(text.decode('utf8'), 'yellow', attrs=['bold'])
|
||||
except UnicodeDecodeError:
|
||||
colored(unicode(text, errors='ignore'), 'yellow', attrs=['bold'])
|
||||
return colored(text.decode('utf8'), 'yellow', attrs=['bold'])
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
return colored(unicode(text, errors='ignore'), 'yellow', attrs=['bold'])
|
||||
|
||||
def green(text):
|
||||
try:
|
||||
colored(text.decode('utf8'), 'green', attrs=['bold'])
|
||||
except UnicodeDecodeError:
|
||||
colored(unicode(text, errors='ignore'), 'green', attrs=['bold'])
|
||||
return colored(text.decode('utf8'), 'green', attrs=['bold'])
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
return colored(unicode(text, errors='ignore'), 'green', attrs=['bold'])
|
||||
|
||||
def red(text):
|
||||
try:
|
||||
colored(text.decode('utf8'), 'red', attrs=['bold'])
|
||||
except UnicodeDecodeError:
|
||||
colored(unicode(text, errors='ignore'), 'red', attrs=['bold'])
|
||||
return colored(text.decode('utf8'), 'red', attrs=['bold'])
|
||||
except UnicodeDecodeError and UnicodeEncodeError:
|
||||
return colored(unicode(text, errors='ignore'), 'red', attrs=['bold'])
|
||||
|
||||
# Structures
|
||||
# Taken from http://insecurety.net/?p=768
|
||||
|
|
Loading…
Reference in New Issue