actually write file when it says it is
This commit is contained in:
parent
86a5d97efc
commit
9de6bb5241
@ -149,6 +149,8 @@ for packet in data_packets:
|
|||||||
|
|
||||||
sha512 = sha512.hexdigest()
|
sha512 = sha512.hexdigest()
|
||||||
|
|
||||||
|
total_data = b''.join(data_packets)
|
||||||
|
|
||||||
if sha512 != serverhash.hex():
|
if sha512 != serverhash.hex():
|
||||||
print('sha512: %s' % sha512)
|
print('sha512: %s' % sha512)
|
||||||
print('server sha512: %s' % serverhash.hex())
|
print('server sha512: %s' % serverhash.hex())
|
||||||
@ -157,8 +159,6 @@ if sha512 != serverhash.hex():
|
|||||||
f.write(total_data)
|
f.write(total_data)
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
total_data = b''.join(data_packets)
|
|
||||||
|
|
||||||
with open("received/"+filename, 'wb') as f:
|
with open("received/"+filename, 'wb') as f:
|
||||||
f.write(total_data)
|
f.write(total_data)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user