Merge branch 'master' into smb_transport

main
byt3bl33d3r 2015-10-30 22:47:26 -06:00
commit 4a0f83fc02
1 changed files with 13 additions and 13 deletions

View File

@ -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