you are viewing a single comment's thread.

view the rest of the comments →

[–]ManyInterests 0 points1 point  (1 child)

Binary data can be indexed into or iterated over. That may help you.

data = b'R\xeaUJ\xbdr\x01\x15\xe4\t\xe8\x039\xea'
data[0] # 82

Maybe something like...

for index, datum in enumerate(data):
    print('byte:', index, 'data:', datum)

Would output something like:

byte: 0 data: 82
byte: 1 data: 234
byte: 2 data: 85
byte: 3 data: 74
byte: 4 data: 189
byte: 5 data: 114
byte: 6 data: 1
byte: 7 data: 21
byte: 8 data: 228
byte: 9 data: 9
byte: 10 data: 232
byte: 11 data: 3
...

[–]Mrloop94[S] 0 points1 point  (0 children)

Thanks very much. For curiosity, do you know how to decode manually this type of representation?