Skip to content

Instantly share code, notes, and snippets.

@shuax
Created January 30, 2024 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shuax/6f8c42989848865bdb12259cb55ddf72 to your computer and use it in GitHub Desktop.
Save shuax/6f8c42989848865bdb12259cb55ddf72 to your computer and use it in GitHub Desktop.
import hashlib
# /hashcat.bin -a 0 -m 17225 "\$pkzip2\$1*2*2*0*18*c*48479f6*0*44*0*18*0484*0e2f*fb0202f54a4db131a41afa5ad61932a447318711893011e9*\$/pkzip2\$" words.txt --show
def calculate_md5(data):
md5_hash = hashlib.md5()
md5_hash.update(data)
return md5_hash.hexdigest()
dates = []
from datetime import datetime, timedelta
start_date = datetime(2000, 1, 1)
end_date = datetime(2100, 12, 31)
current_date = start_date
while current_date <= end_date:
date = "hashcat_" + current_date.strftime("%Y%m%d")
dates.append(date.encode())
current_date += timedelta(days=1)
print(dates[0])
# for date in dates:
# if calculate_md5(date) == "c24dfa5bb27682d52bad1a77a32f6***":
# print(date)
# break
with open("words.txt", "w") as f:
for date in dates:
f.write("flag{{{}}}\n".format(calculate_md5(date)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment