Compare commits

..

3 Commits

Author SHA1 Message Date
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
5 changed files with 128 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

25
LICENSE
View File

@@ -1,5 +1,6 @@
This is free and unencumbered software released into the public domain. This is free and unencumbered software released into the public domain.
<<<<<<< HEAD
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
@@ -8,3 +9,27 @@ successors. We intend this dedication to be an overt act of relinquishment in pe
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/> For more information, please refer to <http://unlicense.org/>
=======
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
>>>>>>> 9bab5dc (Initial commit)

View File

@@ -1,3 +1,4 @@
# 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.

31
generator.py Normal file
View File

@@ -0,0 +1,31 @@
import random
import string
import questionary
def generate_password(length,use_upper=True,use_lower=True,use_digits=True,use_symbols=True):
characters=""
if use_upper:characters+=string.ascii_uppercase
if use_lower:characters+=string.ascii_lowercase
if use_digits:characters+=string.ascii_uppercase
if use_symbols:characters+=string.punctuation
characterslist=list(characters)
password=""
if not characters:
return ""
for i in range(length):
password+=random.choice(characterslist)
return password
def main():
print("Bitwarden password generator clone")
length=questionary.text("How long?",validate=lambda text: True if text.isdigit() else "Please enter a valid number").ask()
use_upper=questionary.confirm("Use uppercase?").ask()
use_lower=questionary.confirm("Use lowercase?").ask()
use_digits=questionary.confirm("Use digits?").ask()
use_symbols=questionary.confirm("Use symbols?").ask()
pw=generate_password(int(length),use_upper,use_lower,use_digits,use_symbols)
if pw:
print(pw)
else:
print("You didn't choose anything to put in, here's your password anyway: \"\"")
if __name__=="__main__":
main()

65
main.py Normal file
View File

@@ -0,0 +1,65 @@
import string
import time
time.strftime("%s %d")
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()