#!/usr/bin/env python3 from random import shuffle, choice, randint from time import sleep from sys import stdout from os import listdir, path, popen def gettermsize(): _, columns = popen('stty size','r').read().split() return int(columns) def p(t): stdout.write(t) stdout.flush() RED='\033[91m' GREEN='\033[92m' RESET='\033[0m' def runhack(f): while True: tw = gettermsize()-10 tws=("%d" % tw) t = choice(f) s = ( ("%-"+tws+"s") % ("> "+t()+".....") ) p(s) sleep(randint(1,5)/10.0) fail = (randint(1,5)==1) while fail: p("["+RED+"FAIL"+RESET+"]\n") p( ("%-"+tws+"s") % "") sleep(randint(1,20)/10.0) fail = (randint(1,5)==1) p("["+GREEN+"DONE"+RESET+"]\n") if __name__ == "__main__": runhack([ lambda: "Tracing IP %d.%d.%d.%d" % (randint(10,192), randint(0,254), randint(0,254), randint(1,70) ), lambda: "Exploiting Port %d" % randint(5,1024), lambda: "Reroute it to the spaghetti. Keep it in the loop", lambda: "Crack Steam-powered defense system", lambda: "Starting internet explorer", lambda: "Trying exploit 0x%X" % (randint(0,2**16)), lambda: ("Injecting red code into %s") % (lambda p: choice(list(filter(lambda e: path.isfile(e), [path.join(p,f) for f in listdir(p)]))))("/etc"), lambda: "Encrypting code", lambda: "Collect user hashes", lambda: "Connect to %s" % choice(["nsa.gov", "fbi.gov", "whitehouse.gov", "facebook.com", "zom.bi"]), lambda: "Hacking", lambda: "Initializing startup", lambda: "Linking graphic card", lambda: "Handling core optimization", lambda: "Charging Processor core", lambda: "Catalyst field enabled", lambda: "Receiver error check", lambda: "Self-diagnosis", lambda: "Loading data", lambda: "Resizing data", lambda: "Setting cpu clock to %.2f Ghz" % (randint(80,390)/100.0), lambda: "Setting ethernet data rate to %d Mbit/s" % (randint(300,10000)), lambda: "Authorizing connection", lambda: "Starting optimization processors", lambda: "Connecting to uplink drive", lambda: "Loading modem driver v%d.%03d" % (randint(0,2), randint(0,999)), lambda: "Linking to Mainframe", lambda: "Extracting data column %d using visual objects" % (randint(101,20987)), lambda: "Monitor mode on", lambda: "Testing link online on port %d" % randint(1024,65563), lambda: "Aux baud rate set to %d" % randint(1,30), lambda: "Write control mode", lambda: "Inserting parameters", lambda: "Bypassing kernel", lambda: "Verifying attributes", lambda: "Activating hacking stealth mode", lambda: "Hiding proxy", lambda: "Deploying core terminal script", lambda: "Decoding anti hacking software", lambda: "Changing root passwords", lambda: "Encrypting passwords", lambda: "Connecting core grid to system", lambda: "Loading space time information", lambda: "Establishing link to all systems", ])