Skip to content

Instantly share code, notes, and snippets.

View the-c0d3r's full-sized avatar

the-c0d3r

View GitHub Profile
@the-c0d3r
the-c0d3r / password_animation.py
Last active December 30, 2015 04:31 — forked from StevenMaude/password_animation.py
Movie-like password cracking animation in Python that looks nifty. Code for guessing a string written for a problem in "Problem Solving with Algorithms and Data Structures" with my additional idea of printing every attempt and slowing down prints to make them readable.
import random
import time
import sys
import string
def generate_random_guess(chars):
return random.choice(chars)
def repeated_guesses(target):
from Crypto.Cipher import AES
import base64
import os
# the block size for the cipher object; must be 16, 24, or 32 for AES
BLOCK_SIZE = 32
# the character used for padding--with a block cipher such as AES, the value
# you encrypt must be a multiple of BLOCK_SIZE in length. This character is
# used to ensure that your value is always a multiple of BLOCK_SIZE