diff --git a/client.py b/client.py index 245ce33..066190c 100644 --- a/client.py +++ b/client.py @@ -149,6 +149,8 @@ for packet in data_packets: sha512 = sha512.hexdigest() +total_data = b''.join(data_packets) + if sha512 != serverhash.hex(): print('sha512: %s' % sha512) print('server sha512: %s' % serverhash.hex()) @@ -157,8 +159,6 @@ if sha512 != serverhash.hex(): f.write(total_data) exit() -total_data = b''.join(data_packets) - with open("received/"+filename, 'wb') as f: f.write(total_data)