Compare commits

..

7 Commits

Author SHA1 Message Date
446b3d3fe8 why do i even need to do this 2026-04-25 11:51:13 -04:00
b470329d0f Update readme 2026-04-25 11:44:09 -04:00
e6c0fac826 oops i commited the wrong thing 2026-04-25 11:35:16 -04:00
4ba15eb22d help my git broke 2026-04-25 11:34:10 -04:00
69ecfa8140 Update readme 2026-04-25 11:33:35 -04:00
aa53aa6e01 The code itself 2026-04-25 11:33:35 -04:00
Owen
8bcfd66850 Initial commit 2026-04-25 11:33:35 -04:00
3 changed files with 75 additions and 2 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# not part of the thing
generator.py
./generator.py
# what is happening, gitignore not working

View File

@@ -1,3 +1,9 @@
# Password-Crack-Time-Checker # Password-Crack-Checker
Password crack checker
Password Crack Time Checker Just a simple password crack time checker, will think things like password123 is strong so don't use it for anything important.
To run:
Have python setup, download the code, run the main.py with python.
I may add a website version later so you don't need to download it, if it exists, the link will be under here.
It's not here.

63
main.py Normal file
View File

@@ -0,0 +1,63 @@
import string
def get_charecter_pool_size(password):
pool_size=0
has_lower=False
has_upper=False
has_digits=False
has_symbols=False
for i in password:
if i in string.ascii_lowercase:
has_lower=True
if i in string.ascii_uppercase:
has_upper=True
if i in string.digits:
has_digits=True
if i in string.punctuation:
has_symbols=True
letters=int(has_lower)+int(has_upper)
pool_size+=letters*(((((((((((((((((((((((((((((len(string.ascii_letters)-len(string.ascii_lowercase))))))))))))))))))))))))))))))
if has_digits:
pool_size+=len(string.digits)
if has_symbols:
pool_size+len(string.punctuation)
return pool_size
def calculate_combinations(pool_size,length):
return pool_size**length
def estimate_crack_time(combinations):
guesses_per_second=1000000
time=combinations//guesses_per_second
return time
def format_time(seconds):
hours=seconds//3600
seconds-=(hours*3600)
minutes=seconds//60
seconds-=(minutes*60)
return f"{hours} hours, {minutes} minutes, {seconds} seconds"
def get_strength_label(seconds):
if seconds<=60:
return "Very weak"
if seconds<3600:
return "Weak"
if seconds<43200:
return "Moderate"
if seconds<3.154e+7:
return "Strong"
return "Very Strong"
def main():
print("This will not account for human behavior, for example, password123 will be very strong according to this cracker, don't use this for something that needs to be secure.\nThis would give you the time it would take to brute force this length at 1 million guesses per second.")
password=input("Enter your password to check: ")
length=len(password)
pool_size=get_charecter_pool_size(password)
if pool_size<=0:
print("This is how secure your password is: , there it is, thats the security, it's that insecure, maybe set a real password.")
quit()
combinations=calculate_combinations(pool_size,length)
crack_time=estimate_crack_time(combinations)
print("Max possible characters:",pool_size)
print("Possible combinations:",combinations)
print("Estimated crack time:",format_time(crack_time))
print("Your password is",get_strength_label(crack_time))
main()