2

I don't know encoding type of string and I want to decode that string. I have tried chardet python module but didn't work.

I know output of string, is there anyway i can decode string using python...

Example

Input
'\x06@\t\xa6'

Output
104860070

Any help would be appreciated

Narcos
  • 23
  • 4

1 Answers1

1

It is text created with struct.pack() so use struct.unpack()

import struct

result = struct.unpack('!i', '\x06@\t\xa6')[0]
print(result) 

# 104860070
furas
  • 134,197
  • 12
  • 106
  • 148