在終端中打印二進制打包的隨機數時,它會生成一堆警報。該程序的代碼是:from struct import pack, unpackimport hashlibimport sysprint "Input the message you want to work on:"message = raw_input()orig_hash = hashlib.sha512(message).digest()trialValue = 99999999999999999999target = 4103215547750nonce = 0while trialValue > target:nonce += 1packed_nonce = pack('>Q', nonce)print packed_noncetrialValue, = unpack('>Q',hashlib.sha512(packed_nonce + orig_hash).digest()[0:8])print nonceprint trialValue這沒什么大不了的,但是沒有人知道為什么會這樣嗎?
添加回答
舉報
0/150
提交
取消