From 157569bb20aa4a8a1037456b041f1512a8a8e965 Mon Sep 17 00:00:00 2001 From: ultramagnus_tcv Date: Tue, 28 Jul 2015 18:22:59 -0500 Subject: [PATCH] Simplifying --- Beginning.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Beginning.py b/Beginning.py index 4658d41..1121d94 100644 --- a/Beginning.py +++ b/Beginning.py @@ -6,8 +6,6 @@ try: finally: SOSfile.close() -SOSSlice = SOS.encode('hex_codec')[0x10:0x14] -print '0x' + SOSSlice -SOSunhexlify = binascii.unhexlify(SOSSlice) -print 'Unhexlified: ' + SOSunhexlify -SOSstruct = str(struct.pack('>2s', SOSunhexlify)[0]) +#Slice two bytes +SOSSlice = SOS[0x10:0x11] +SOSstruct = struct.unpack('< H', SOSSlice[0])