Skip to content

Instantly share code, notes, and snippets.

@AndreUltrasi
Last active August 18, 2024 04:48
Show Gist options
  • Save AndreUltrasi/9815675326a7b03275a5a289f1671958 to your computer and use it in GitHub Desktop.
Save AndreUltrasi/9815675326a7b03275a5a289f1671958 to your computer and use it in GitHub Desktop.
Password Cracker in Python
references = {}
dictionary = []
def randomized(x, y):
from random import randint
return randint(x, y)
def cracker_per_digit(x):
# crack digit per digit
lista = list(x)
cracked = []
tmp = 0
cycle = 1
print("Cracking password per digit")
while True:
number = str(randomized(0, 9))
print("Number found: ", number)
print("Cycle: ", cycle)
if lista[tmp] == number:
cracked.append(number)
tmp += 1
print("password cracked: ", cracked)
if tmp == len(lista):
break
cycle += 1
def cracker_complete_with_dict(x):
# crack complete password with dictionary
global dictionary
global references
lista = list(x)
cracked = []
cycle = 1
print("Cracking password with a dictionary")
while True:
number = str(randomized(0, 9))
cracked.append(number)
if cracked == lista:
print("Cycle: ", cycle)
print(cracked)
print("length dictionary: ", len(dictionary))
references["withDict"] = cycle
references["length"] = len(dictionary)
break
if len(cracked) == len(lista):
if cracked in dictionary:
cracked = []
else:
print("Cycle = ", cycle)
print(cracked)
dictionary.append(cracked)
cracked = []
cycle += 1
def cracker_complete_no_dict(x):
# crack complete password without dictionary
global references
lista = list(x)
cracked = []
cycle = 1
print("Cracking password without a dictionary")
while True:
number = str(randomized(0, 9))
cracked.append(number)
if cracked == lista:
print("Cycle: ", cycle)
print(cracked)
references["noDict"] = cycle
break
if len(cracked) == len(lista):
print("Cycle =", cycle)
print(cracked)
cracked = []
cycle += 1
def cracker_incrementing(x):
# Fastest Way to Crack a Password
global references
number_int = 1
cycle = 1
print("Cracking password incrementing digits")
while True:
number_str = str(number_int)
if number_str == x:
print("Cycle = ", cycle)
print(number_str)
references["incrementing"] = cycle
break
print("Cycle =", cycle)
print(number_str)
number_int += 1
cycle += 1
def report():
global references
print("Password Cracked with dictionary")
print("Cycle = ", references["withDict"])
print("Dictionary Length = ", references["length"])
print("\nPassword Cracked without dictionary")
print("Cycle = ", references["noDict"])
print("\nPassword Cracked Incrementing")
print("Cycle =", references["incrementing"])
while True:
password = str(input("Type a password made of numbers: "))
cracker_complete_no_dict(password)
cracker_complete_with_dict(password)
cracker_incrementing(password)
cracker_per_digit(password)
report()
@Aget47
Copy link

Aget47 commented Mar 5, 2021

How do i use this on a website to recover my password?

@IIlIIlShade
Copy link

omg i can just see all the kids copy and pasting this rn

@ayden4756
Copy link

how do i use this on my website

Copy link

ghost commented Feb 25, 2022

you can do that by using the requests module in python

@end3rchan
Copy link

roses are red violets are blue ctrl c ctrl v this script is now mine

@end3rchan
Copy link

lol

@ErnieBoxer
Copy link

ErnieBoxer commented May 18, 2022

A leading 0 in pin renders this useless.

ctl C out at: 33398226 on a pain of 01

@lorstenoplo
Copy link

A leading 0 in pin renders this useless.

ctl C out at: 33398226 on a pain of 01

same here

@shohjahon27
Copy link

lol im entering password and getting result what i just recently entered

@hasna570
Copy link

hasna570 commented Apr 5, 2023

Facebook Password Hack

@nhatminh132
Copy link

this is fun lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment