import hashlib
Psw = "10203040"
con1 = Psw
Hash1 = hashlib.sha512(con1.encode('UTF-8'))
print Hash1.hexdigest()
aW1wb3J0IGhhc2hsaWIKClBzdyA9ICIxMDIwMzA0MCIKY29uMSA9IFBzdyAKSGFzaDEgPSBoYXNobGliLnNoYTUxMihjb24xLmVuY29kZSgnVVRGLTgnKSkKCnByaW50IEhhc2gxLmhleGRpZ2VzdCgpCg==
aW1wb3J0IGhhc2hsaWIKaGVhZGVyX2hleCA9ICgmcXVvdDswMTAwMDAwMCZxdW90OyArICZxdW90OzgxY2QwMmFiN2U1NjllOGJjZDkzMTdlMmZlOTlmMmRlNDRkNDlhYjJiODg1MWJhNGEzMDgwMDAwMDAwMDAwMDAmcXVvdDsgKyAmcXVvdDtlMzIwYjZjMmZmZmM4ZDc1MDQyM2RiOGIxZWI5NDJhZTcxMGU5NTFlZDc5N2Y3YWZmYzg4OTJiMGYxZmMxMjJiJnF1b3Q7ICsgJnF1b3Q7YzdmNWQ3NGQmcXVvdDsgKyAmcXVvdDtmMmI5NDQxYSZxdW90OyArICZxdW90OzQyYTE0Njk1JnF1b3Q7KQpoZWFkZXJfYmluID0gaGVhZGVyX2hleC5kZWNvZGUoJ2hleCcpCnRlc3QgPSBoYXNobGliLnNoYTI1NihoZWFkZXJfYmluKS5kaWdlc3QoKQpwcmludCAmcXVvdDtQZXJ2eWkgcHJva2hvZCZxdW90OwpwcmludCB0ZXN0
import hashlib
header_hex = ("01000000" + "81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000" + "e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122b" + "c7f5d74d" + "f2b9441a" + "42a14695")
header_bin = header_hex.decode('hex')
test = hashlib.sha256(header_bin).digest()
print "Pervyi prokhod"
print test