First commit.
This commit is contained in:
commit
99e83434a2
2 changed files with 63 additions and 0 deletions
44
hack.py
Executable file
44
hack.py
Executable file
|
@ -0,0 +1,44 @@
|
|||
from random import shuffle, choice, randint
|
||||
from time import sleep
|
||||
from sys import stdout
|
||||
from os import listdir, path
|
||||
|
||||
def p(t):
|
||||
stdout.write(t)
|
||||
stdout.flush()
|
||||
|
||||
RED='\033[91m'
|
||||
GREEN='\033[92m'
|
||||
RESET='\033[0m'
|
||||
|
||||
def runhack(f):
|
||||
while True:
|
||||
t = choice(f)
|
||||
s = ("%-70s" % (t()+".....") )
|
||||
p(s)
|
||||
sleep(randint(1,20)/10.0)
|
||||
|
||||
fail = (randint(1,5)==1)
|
||||
while fail:
|
||||
p("["+RED+"FAIL"+RESET+"]\n")
|
||||
p(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"
|
||||
])
|
||||
|
19
redcode.py
Normal file
19
redcode.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from random import randint, choice
|
||||
from sys import stdout
|
||||
from time import sleep
|
||||
|
||||
RED='\033[31m'
|
||||
GREEN='\033[32m'
|
||||
YELLOW='\033[33m'
|
||||
BLUE='\033[34m'
|
||||
WHITE='\033[37m'
|
||||
|
||||
colors = [ RED, GREEN, GREEN ]
|
||||
|
||||
while True:
|
||||
if randint(0,99) < 30:
|
||||
stdout.write(choice(colors))
|
||||
stdout.write('%X' % randint(0,15))
|
||||
stdout.flush()
|
||||
sleep(0.005)
|
||||
|
Loading…
Reference in a new issue