Skip to content

Instantly share code, notes, and snippets.

@albertofwb
Created October 1, 2018 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertofwb/a526d8a1eb38c96ca6336075b7098643 to your computer and use it in GitHub Desktop.
Save albertofwb/a526d8a1eb38c96ca6336075b7098643 to your computer and use it in GitHub Desktop.
python hack attack visual affects
#! /usr/bin/env python
# encoding: utf-8
# Edit time: 2018-06-05 20:32
# This scripts print some hack attack affect
# Just makes ordinary people think about we are hacking an account
import sys
from time import sleep
import random
import string
COMMAND_INTERVAL = 0.05
def show(cmd_list):
wait_sec = COMMAND_INTERVAL
for line in cmd_list:
print line
sleep(wait_sec)
def make_words():
sb = ["[+]connecting to %s" % host]
sb.append("[+]connecting to %s successfully" % host)
sb.append("[+]scanning vulnerable for %s..." % host)
sb.append("[+]found 21 injection points")
sb.append("[+]begin to exploit password for [%s]" % account)
rp = None
for i in xrange(21):
plen = random.randint(5, 21)
pharase = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(plen))
sb.append("[*] try %03d exploit key is %s" % (i, pharase))
if i % 3 == 0: rp = pharase
sb.append("\npassword found: %s\n\n" % rp )
return sb
def exploit(host, account):
words_list = make_words()
show(words_list)
if __name__ == '__main__':
if len(sys.argv) < 3:
print "Usage: %s --host <ip> --account <account>"
sys.exit(1)
args = sys.argv
host = args[2]
account = args[4]
exploit(host, account)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment