Skip to content

Instantly share code, notes, and snippets.

@Mistium
Created June 28, 2024 14:41
Show Gist options
  • Select an option

  • Save Mistium/b5e5807c62cb0c471076bc915f2ba455 to your computer and use it in GitHub Desktop.

Select an option

Save Mistium/b5e5807c62cb0c471076bc915f2ba455 to your computer and use it in GitHub Desktop.
hash = "81dc9bdb52d04dc20036dbd8313ed055"
characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890"
len = characters.len
check = ""
vals = 12.newVector()
est_time = 0
total = 0
max = 1
start_local = timestamp
out = {}
log window.code.join(newline)
mainloop:
trimmed = vals.trim(1,max)
loop 100 (
check = ""
reset = 0
MwFYSNjb2GMF = trimmed.len
i = 0
loop MwFYSNjb2GMF (
i ++
item = trimmed.[i]
jn item + 1 > len 37
vals.[i] = 1
trimmed.[i] = 1
if i == 1 "reset = true"
j = i + 1
vals.[j] += 1
trimmed.[j] += 1
jn j > max 36
prev = len ^ max
max = j
new = len ^ max
calc_val1 = new - prev
start_timer = timestamp - start_local
trimmed = vals.trim(1,max)
letter = characters.[item]
check.append(letter)
)
ji reset 44
vals.[1] += 1
trimmed.[1] += 1
total += 1
hashed = check.hashMD5()
jn hashed == hash 50
say "found" + check + "in" + window_timer.round ++ "ms"
window "stop"
)
goto 0 0
c #fff
graph 300 300 / len trimmed
loc 2 2 10 -20
text check 10
loc 2 2 10 -40
percent = total / calc_val1
est_time = timestamp - start_local / percent - window_timer / 1000
JuWOF9MlaLz5 = percent * 100
text total + "-" + JuWOF9MlaLz5.round ++ "%" + est_time.round ++ "s" 10
loc 2 2 10 -60
text fps 10
jn "space".onpress 66
clipboard "set" out
import "win-buttons"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment