Skip to content

Instantly share code, notes, and snippets.

@lisp3r
Created January 19, 2024 08:17
Show Gist options
  • Save lisp3r/f38620c81e47b206c9ed2fae6932629b to your computer and use it in GitHub Desktop.
Save lisp3r/f38620c81e47b206c9ed2fae6932629b to your computer and use it in GitHub Desktop.
Calculate the time of hash cracking
# Use the MD5 GPU hash rate from the GPU benchmark of this section
# and calculate the cracking time in minutes with the following conditions.
# Use a charset of all lower and upper case letters of the English alphabet
# and use a password length of 8. Enter the answer as full minutes without seconds.
charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
passw_length = 8
# hashcat -b
hash_rate = 681851 * 100000 # hash rate for MD5 GPU from the benchmark
keyspace = (len(charset) ** passw_length)
crack_speed_sec = keyspace / hash_rate
crack_speed_min = crack_speed_sec / 60
print(crack_speed_min)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment