Skip to content

Instantly share code, notes, and snippets.

@programmer-666
Created September 30, 2020 21:39
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 programmer-666/365472d36b632179af7e32dd46e8a332 to your computer and use it in GitHub Desktop.
Save programmer-666/365472d36b632179af7e32dd46e8a332 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# bhc.py
import hashlib, sys
def TakeWords(filename=str(sys.argv[1])):
with open(filename) as fopen:
output = fopen.read().splitlines()
return output
def CreateHash(word = "null"):
return hashlib.sha512(word.encode()).hexdigest()
# fonksiyonlarin tanimlanmasi
f, h = False, sys.argv[2]
for i in TakeWords():
if CreateHash(i) == str(h):
word = i
f = True
break
if f:
print(f"Hash Cracked: {word}")
else:
print("Hash not cracked")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment