Enter a number password and have it cracked by force
You can see the guessing happening in real time
See how many passwords it tries before it gets yours
5 digit numbers recommended as anything lager can take a while
@Zexogon you can do this:
import random import os randomPassword = '' alphabetList = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','w','x','y','z'] guess = input('enter string!') guess = guess.lower() #set user input to lowercase while randomPassword != guess: randomPassword = '' for i in range(random.randint(1,10)): randomPassword += random.choice(alphabetList) #this code creates the random string. print(randomPassword) os.system('clear')
@Zexogon ChezCoder's example is great and all, but here is a short bruteforcer that can tries numbers and characters (even special characters):
text = "" message = input("Type a message: ") for i in range(len(message)): char = " " while True: char = ord(char) + 1 char = chr(char) print(text + char) if char == message[i]: break text = text + char input()
@sperd while this is cool and all and I’m probably gonna make a new one I can imagine this taking forever to run and find a password due to the overwhelming amount of different factors it has to generate
Like the numbers one only had to generate 1-9 consistently
And the letters one works with 36 letters which is why it was hard to even make it generate random strings in the first place
You my friend, while smart are also insane if you want to open up a python file to run that many factors but insanity in coding is always amazing, I mean look at michal reeves, so I really encourage you to do it on your own or if you want me to I will and I will give you credit for the code but it goes without saying this will probably take a while to crack a 5 digit random password with letters numbers and symbols
@Zexogon This bruteforces a certain message differently, it takes about 0.3 seconds for 11 digit characters, this does not randomly generate strings, run the code if you wish to see how this works.
While generating random strings constantly would be insane and won't succeed without a supercomputer or something.
really cool idea that it's random, less attempts needed most of the time than going in order
Cool, most of the time the guesses are less than and non-random brute force algorithm. The program guesses a random integer from 1 to your number, but it the relay world you wouldn't know the length. Also try entering a "0"