def emit(self, record): colored = copy.copy(record) if record.levelname == "WARNING": colored.msg = yellow(record.msg) elif record.levelname == "ERROR" or record.levelname == "CRITICAL": colored.msg = red(record.msg) else: if "analysis procedure completed" in record.msg: colored.msg = cyan(record.msg) else: colored.msg = record.msg logging.StreamHandler.emit(self, colored)
def logo(): """Malice asciiarts. @return: asciiarts array. """ logos = [] logos.append( """ ███▄ ▄███▓ ▄▄▄ ██▓ ██▓ ▄████▄ ▓█████ ▓██▒▀█▀ ██▒▒████▄ ▓██▒ ▓██▒▒██▀ ▀█ ▓█ ▀ ▓██ ▓██░▒██ ▀█▄ ▒██░ ▒██▒▒▓█ ▄ ▒███ ▒██ ▒██ ░██▄▄▄▄██ ▒██░ ░██░▒▓▓▄ ▄██▒▒▓█ ▄ ▒██▒ ░██▒ ▓█ ▓██▒░██████▒░██░▒ ▓███▀ ░░▒████▒ ░ ▒░ ░ ░ ▒▒ ▓▒█░░ ▒░▓ ░░▓ ░ ░▒ ▒ ░░░ ▒░ ░ ░ ░ ░ ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ """ ) logos.append( """ __ __ _ _ | \/ | __ _| (_) ___ ___ | |\/| |/ _` | | |/ __/ _ \\ | | | | (_| | | | (_| __/ |_| |_|\__,_|_|_|\___\___| """ ) logos.append( """ _/ _/ _/ _/ _/_/ _/_/ _/_/_/ _/ _/_/_/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/_/ """ ) logos.append( """ _____ ___| _|__ ____ ____ ____ ______ ______ | \ / | || \ | | | || ___|| ___| | \/ | || \ | |_ | || |__ | ___| |__/\__/|__|_||__|\__\|______||____||______||______| |_____| """ ) logos.append( """ ______________________________________________________________ /~~\__/~~\__/~~~~~~\__/~~\_______/~~~~\__/~~~~~~\__/~~~~~~~~\_ /~~~\/~~~\_/~~\__/~~\_/~~\________/~~\__/~~\__/~~\_/~~\_______ /~~~~~~~~\_/~~~~~~~~\_/~~\________/~~\__/~~\_______/~~~~~~\___ /~~\__/~~\_/~~\__/~~\_/~~\________/~~\__/~~\__/~~\_/~~\_______ /~~\__/~~\_/~~\__/~~\_/~~~~~~~~\_/~~~~\__/~~~~~~\__/~~~~~~~~\_ ______________________________________________________________""" ) logos.append( """ ======================================== = ===== ========= =================== = === ========= =================== = = = ========= =================== = == == === === == === ==== == = ===== == = == ====== = == = = = ===== ===== == == == ===== = = ===== === == == == ===== ==== = ===== == = == == == = == = = = ===== === == == === ==== == ========================================""" ) logos.append( """ __ __ __ _ _ ______ | V |/ \| | | |/ _/ __| | \_/ | /\ | |_| | \_| _| |_| |_|_||_|___|_|\__/___|""" ) logos.append( """ e e 888 ,e, d8b d8b ,"Y88b 888 " e88'888 ,e e, e Y8b Y8b "8" 888 888 888 d888 '8 d88 88b d8b Y8b Y8b ,ee 888 888 888 Y888 , 888 , d888b Y8b Y8b "88 888 888 888 "88,e8' "YeeP" """ ) logos.append( """ ____ ____ ____ ____ ____ ____ ||M |||a |||l |||i |||c |||e || ||__|||__|||__|||__|||__|||__|| |/__\|/__\|/__\|/__\|/__\|/__\|""" ) logos.append( """ _____ ______ ________ ___ ___ ________ _______ |\ _ \ _ \|\ __ \|\ \ |\ \|\ ____\|\ ____\\ \ \ \\ \\__\ \ \ \ \|\ \ \ \ \ \ \ \ \___|\ \\ \__/ \ \ \|__| \ \ \ __ \ \ \ \ \ \ \ \ \ \ _\\ \ \ \ \ \ \ \ \ \ \ \ \____\ \ \ \ \____\ \ \____ \ \__\ \ \__\ \__\ \__\ \_______\ \__\ \_______\ \______\\ \|__| \|__|\|__|\|__|\|_______|\|__|\|_______|\|______|""" ) logos.append( """ .-----------------. | Malice? | | OH NOES! |\\ '-.__.-' '-----------------' \\ /oo |--.--,--,--. \\_.-'._i__i__i_.' \"\"\"\"\"\"\"\"\"""" ) logos.append( """ • ▌ ▄ ·. ▄▄▄· ▄▄▌ ▪ ▄▄· ▄▄▄ . ·██ ▐███▪▐█ ▀█ ██• ██ ▐█ ▌▪▀▄.▀· ▐█ ▌▐▌▐█·▄█▀▀█ ██▪ ▐█·██ ▄▄▐▀▀▪▄ ██ ██▌▐█▌▐█ ▪▐▌▐█▌▐▌▐█▌▐███▌▐█▄▄▌ ▀▀ █▪▀▀▀ ▀ ▀ .▀▀▀ ▀▀▀·▀▀▀ ▀▀▀ """ ) logos.append( """ ___ ___ ___ ___ ___ ___ /\__\ /\ \ /\__\ /\ \ /\ \ /\ \\ /::L_L_ /::\ \ /:/ / _\:\ \ /::\ \ /::\ \\ /:/L:\__\ /::\:\__\ /:/__/ /\/::\__\ /:/\:\__\ /::\:\__\\ \/_/:/ / \/\::/ / \:\ \ \::/\/__/ \:\ \/__/ \:\:\/ / /:/ / /:/ / \:\__\ \:\__\ \:\__\ \:\/ / \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ """ ) logos.append( """ ___ ___ _ _ | \/ | | (_) | . . | __ _| |_ ___ ___ | |\/| |/ _` | | |/ __/ _ \\ | | | | (_| | | | (_| __/ \_| |_/\__,_|_|_|\___\___|""" ) logos.append( """ __ __ __ __ / \ / | / |/ | $$ \ /$$ | ______ $$ |$$/ _______ ______ $$$ \ /$$$ | / \ $$ |/ | / | / \\ $$$$ /$$$$ | $$$$$$ |$$ |$$ |/$$$$$$$/ /$$$$$$ | $$ $$ $$/$$ | / $$ |$$ |$$ |$$ | $$ $$ | $$ |$$$/ $$ |/$$$$$$$ |$$ |$$ |$$ \_____ $$$$$$$$/ $$ | $/ $$ |$$ $$ |$$ |$$ |$$ |$$ | $$/ $$/ $$$$$$$/ $$/ $$/ $$$$$$$/ $$$$$$$/ """ ) logos.append( """ `7MMM. ,MMF' db `7MMF' `7MMF' .g8""'bgd'`7MM""'YMM MMMb dPMM ;MM: MM MM .dP' `M MM `7 M YM ,M MM ,V^MM. MM MM dM' ` MM d M Mb M' MM ,M `MM MM MM MM MMmmMM M YM.P' MM AbmmmqMA MM , MM MM. MM Y , M `YM' MM A' VML MM ,M MM `Mb. ,' MM ,M .JML. `' .JMML..AMA. .AMMA..JMMmmmmMMM .JMML. `"bmmmd' .JMMmmmmMMM""" ) print(color(random.choice(logos), random.randrange(31, 37))) print print(" Malice %s" % yellow(MALICE_VERSION)) print(" https://github.com/blacktop/malice") print(" Copyright (c) 2013-2014") print sys.stdout.flush()
def logo(): """Malice asciiarts. @return: asciiarts array. """ logos = [] logos.append(""" ███▄ ▄███▓ ▄▄▄ ██▓ ██▓ ▄████▄ ▓█████ ▓██▒▀█▀ ██▒▒████▄ ▓██▒ ▓██▒▒██▀ ▀█ ▓█ ▀ ▓██ ▓██░▒██ ▀█▄ ▒██░ ▒██▒▒▓█ ▄ ▒███ ▒██ ▒██ ░██▄▄▄▄██ ▒██░ ░██░▒▓▓▄ ▄██▒▒▓█ ▄ ▒██▒ ░██▒ ▓█ ▓██▒░██████▒░██░▒ ▓███▀ ░░▒████▒ ░ ▒░ ░ ░ ▒▒ ▓▒█░░ ▒░▓ ░░▓ ░ ░▒ ▒ ░░░ ▒░ ░ ░ ░ ░ ▒ ▒▒ ░░ ░ ▒ ░ ▒ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ """) logos.append(""" __ __ _ _ | \/ | __ _| (_) ___ ___ | |\/| |/ _` | | |/ __/ _ \\ | | | | (_| | | | (_| __/ |_| |_|\__,_|_|_|\___\___| """) logos.append(""" _/ _/ _/ _/ _/_/ _/_/ _/_/_/ _/ _/_/_/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/_/ """) logos.append(""" _____ ___| _|__ ____ ____ ____ ______ ______ | \ / | || \ | | | || ___|| ___| | \/ | || \ | |_ | || |__ | ___| |__/\__/|__|_||__|\__\|______||____||______||______| |_____| """) logos.append(""" ______________________________________________________________ /~~\__/~~\__/~~~~~~\__/~~\_______/~~~~\__/~~~~~~\__/~~~~~~~~\_ /~~~\/~~~\_/~~\__/~~\_/~~\________/~~\__/~~\__/~~\_/~~\_______ /~~~~~~~~\_/~~~~~~~~\_/~~\________/~~\__/~~\_______/~~~~~~\___ /~~\__/~~\_/~~\__/~~\_/~~\________/~~\__/~~\__/~~\_/~~\_______ /~~\__/~~\_/~~\__/~~\_/~~~~~~~~\_/~~~~\__/~~~~~~\__/~~~~~~~~\_ ______________________________________________________________""") logos.append(""" ======================================== = ===== ========= =================== = === ========= =================== = = = ========= =================== = == == === === == === ==== == = ===== == = == ====== = == = = = ===== ===== == == == ===== = = ===== === == == == ===== ==== = ===== == = == == == = == = = = ===== === == == === ==== == ========================================""") logos.append(""" __ __ __ _ _ ______ | V |/ \| | | |/ _/ __| | \_/ | /\ | |_| | \_| _| |_| |_|_||_|___|_|\__/___|""") logos.append(""" e e 888 ,e, d8b d8b ,"Y88b 888 " e88'888 ,e e, e Y8b Y8b "8" 888 888 888 d888 '8 d88 88b d8b Y8b Y8b ,ee 888 888 888 Y888 , 888 , d888b Y8b Y8b "88 888 888 888 "88,e8' "YeeP" """) logos.append(""" ____ ____ ____ ____ ____ ____ ||M |||a |||l |||i |||c |||e || ||__|||__|||__|||__|||__|||__|| |/__\|/__\|/__\|/__\|/__\|/__\|""") logos.append(""" _____ ______ ________ ___ ___ ________ _______ |\ _ \ _ \|\ __ \|\ \ |\ \|\ ____\|\ ____\\ \ \ \\ \\__\ \ \ \ \|\ \ \ \ \ \ \ \ \___|\ \\ \__/ \ \ \|__| \ \ \ __ \ \ \ \ \ \ \ \ \ \ _\\ \ \ \ \ \ \ \ \ \ \ \ \____\ \ \ \ \____\ \ \____ \ \__\ \ \__\ \__\ \__\ \_______\ \__\ \_______\ \______\\ \|__| \|__|\|__|\|__|\|_______|\|__|\|_______|\|______|""") logos.append(""" .-----------------. | Malice? | | OH NOES! |\\ '-.__.-' '-----------------' \\ /oo |--.--,--,--. \\_.-'._i__i__i_.' \"\"\"\"\"\"\"\"\"""") logos.append(""" • ▌ ▄ ·. ▄▄▄· ▄▄▌ ▪ ▄▄· ▄▄▄ . ·██ ▐███▪▐█ ▀█ ██• ██ ▐█ ▌▪▀▄.▀· ▐█ ▌▐▌▐█·▄█▀▀█ ██▪ ▐█·██ ▄▄▐▀▀▪▄ ██ ██▌▐█▌▐█ ▪▐▌▐█▌▐▌▐█▌▐███▌▐█▄▄▌ ▀▀ █▪▀▀▀ ▀ ▀ .▀▀▀ ▀▀▀·▀▀▀ ▀▀▀ """) logos.append(""" ___ ___ ___ ___ ___ ___ /\__\ /\ \ /\__\ /\ \ /\ \ /\ \\ /::L_L_ /::\ \ /:/ / _\:\ \ /::\ \ /::\ \\ /:/L:\__\ /::\:\__\ /:/__/ /\/::\__\ /:/\:\__\ /::\:\__\\ \/_/:/ / \/\::/ / \:\ \ \::/\/__/ \:\ \/__/ \:\:\/ / /:/ / /:/ / \:\__\ \:\__\ \:\__\ \:\/ / \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ """) logos.append(""" ___ ___ _ _ | \/ | | (_) | . . | __ _| |_ ___ ___ | |\/| |/ _` | | |/ __/ _ \\ | | | | (_| | | | (_| __/ \_| |_/\__,_|_|_|\___\___|""") logos.append(""" __ __ __ __ / \ / | / |/ | $$ \ /$$ | ______ $$ |$$/ _______ ______ $$$ \ /$$$ | / \ $$ |/ | / | / \\ $$$$ /$$$$ | $$$$$$ |$$ |$$ |/$$$$$$$/ /$$$$$$ | $$ $$ $$/$$ | / $$ |$$ |$$ |$$ | $$ $$ | $$ |$$$/ $$ |/$$$$$$$ |$$ |$$ |$$ \_____ $$$$$$$$/ $$ | $/ $$ |$$ $$ |$$ |$$ |$$ |$$ | $$/ $$/ $$$$$$$/ $$/ $$/ $$$$$$$/ $$$$$$$/ """) logos.append(""" `7MMM. ,MMF' db `7MMF' `7MMF' .g8""'bgd'`7MM""'YMM MMMb dPMM ;MM: MM MM .dP' `M MM `7 M YM ,M MM ,V^MM. MM MM dM' ` MM d M Mb M' MM ,M `MM MM MM MM MMmmMM M YM.P' MM AbmmmqMA MM , MM MM. MM Y , M `YM' MM A' VML MM ,M MM `Mb. ,' MM ,M .JML. `' .JMML..AMA. .AMMA..JMMmmmmMMM .JMML. `"bmmmd' .JMMmmmmMMM""") print(color(random.choice(logos), random.randrange(31, 37))) print print(" Malice %s" % yellow(MALICE_VERSION)) print(" https://github.com/blacktop/malice") print(" Copyright (c) 2013-2014") print sys.stdout.flush()