Nov-27-2022, 06:15 PM
Thanks, that was easy.
According to the documentation, one can use bytes.fromhex() instead of a2b_hex(). It's a little prettier
According to the documentation, one can use bytes.fromhex() instead of a2b_hex(). It's a little prettier
import struct s = '2692692A7BAE0E47430678A4B4382D13F032AE1C509ED523EF747FF795260E917A0DA53F07140C408DA814235B0A2BDD3EBA832D8F2C82FE0AD1B0FD092515A475C04BC130D77E3C' for x in (s[k:k+16] for k in range(0, len(s), 3*16)): i = struct.unpack('<Q', bytes.fromhex(x))[0] print(x, i)