Skip to content

Instantly share code, notes, and snippets.

@Alykoff
Created March 3, 2018 10:39
Show Gist options
  • Save Alykoff/18c52fe3bad9fe559ae75f1236336033 to your computer and use it in GitHub Desktop.
Save Alykoff/18c52fe3bad9fe559ae75f1236336033 to your computer and use it in GitHub Desktop.
hack_script.py
#!/bin/python3
import time
import sys
downloader = '█'
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def errorWrapper(text):
return bcolors.FAIL + text + bcolors.ENDC
def okWrapper(text):
return bcolors.OKGREEN + text + bcolors.ENDC
def startProgress(title):
global progress_x
sys.stdout.write(title + ": [" + "-"*40 + "]" + chr(8)*41)
sys.stdout.flush()
progress_x = 0
def progress(x):
global progress_x
x = int(x * 40 // 100)
sys.stdout.write(downloader * (x - progress_x))
sys.stdout.flush()
progress_x = x
def endProgress():
sys.stdout.write(downloader * (40 - progress_x) + "]\n")
sys.stdout.flush()
def crack(title, wait_time, step):
xp = 0
startProgress(title)
while (xp < 100):
progress(xp)
xp = xp + step
time.sleep(wait_time)
progress(xp)
endProgress()
# crack('Взлом компонентов ядра ', 0.04, 1)
# print(okWrapper('Ok. Компоненты ядра были взломаны'))
# crack('Destroy module of defender ', 0.06, 1)
# print(errorWrapper('Failure. '))
# print('Retry...')
# print('Try other way')
# crack('Destroy module of defender ', 0.06, 1)
# print(okWrapper('Ok. Core components have been replaced'))
# crack('Impuls to confuse traces ', 0.07, 1)
# print(okWrapper('OK. '))
# crack('Get your ip ', 0.07, 1)
# print(okWrapper('OK. '))
# crack('Look up people by ip ', 0.07, 1)
# print(okWrapper('OK. '))
# crack('Searching backdoor ', 0.1, 1)
# print(okWrapper('OK. '))
crack('Init hack 1 ', 0.005, 1)
crack('Init hack 2 ', 0.005, 1)
crack('Init hack 3 ', 0.005, 1)
crack('Init hack 4 ', 0.005, 1)
crack('Init hack 5 ', 0.005, 1)
crack('Init hack 6 ', 0.005, 1)
crack('Init hack 7 ', 0.005, 1)
print(okWrapper('OK. '))
crack('Поиск сладкого на \n жестком диске ', 0.01, 1)
print(okWrapper('OK. Успех, получена кодовая фраза "23423lkdjfj3"'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment