`How to recover byte string?
M
M
Maxim Belozerov2021-08-04 10:59:59
Python
Maxim Belozerov, 2021-08-04 10:59:59

How to recover byte string?

Hello!

"x\\xda\\x15\\xc1m\\x13B0\\x00\\x00\\xe0_\\xe4NY\\x97>\\xf8`\\xde\\xc6e\\xa1X\\xe7\\xcb\\x8eU\\x13S\\xcd\\x14\\xfa\\xf5]\\xcf\\xc3\\xed?\\xd88\\x1dj{U\\x1fw\\x8b\\xa3\\xaf\\x8d\\xd0|\\xd4e1\\xae$\\xabH\\xf7\\xcd\\x92\\x166(U\\x99\\x12o\\x94\\x82\\x9c\\xd9\\xf3\\xa7\\x9fjW\\xea \\nNX*\\xbe\\x1f\\xa9\\x18`\\xec\\xd9\\xc1\\x8c\\x87C\\x18\\x01\\\\\\x94\\x05\\xa1$\\x19\\x8d/T\\xcaG\\xf2\\x1c\\x8a\\xbb\\xcb\\x90\\xd7\\xf6\\x1eaZ\\xff\\xaa\\xe2\\x8d\\xe9\\x93a\\x12\\xad\\x0f\\xd2<c\\xe5\\x94\\x80NR.\\x9f\\[email protected]\\rM\\xa4\\x84\\xe3\\xa5\\xbal'\\xcb\\xfa\\x01\\xfbX83"


b"x\xda\x15\xc1m\x13B0\x00\x00\xe0_\xe4NY\x97>\xf8`\xde\xc6e\xa1X\xe7\xcb\x8eU\x13S\xcd\x14\xfa\xf5]\xcf\xc3\xed?\xd88\x1dj{U\x1fw\x8b\xa3\xaf\x8d\xd0|\xd4e1\xae$\xabH\xf7\xcd\x92\x166(U\x99\x12o\x94\x82\x9c\xd9\xf3\xa7\x9fjW\xea \nNX*\xbe\x1f\xa9\x18`\xec\xd9\xc1\x8c\x87C\x18\x01\\\x94\x05\xa1$\x19\x8d/T\xcaG\xf2\x1c\x8a\xbb\xcb\x90\xd7\xf6\x1eaZ\xff\xaa\xe2\x8d\xe9\x93a\x12\xad\x0f\xd2<c\xe5\x94\x80NR.\x9f\[email protected]\rM\xa4\x84\xe3\xa5\xbal'\xcb\xfa\x01\xfbX83"


It is necessary to somehow get the bottom line from the top line. In order for zlib not to reject. I'm out of ideas...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alternativshik, 2021-08-04
@alternativshik

In [1]: s = "x\\xda\\x15\\xc1m\\x13B0\\x00\\x00\\xe0_\\xe4NY\\x97>\\xf8`\\xde\\xc6e\\xa1X\\xe7\\xcb\\x8eU\\x13S\\xcd\\x1
   ...: 4\\xfa\\xf5]\\xcf\\xc3\\xed?\\xd88\\x1dj{U\\x1fw\\x8b\\xa3\\xaf\\x8d\\xd0|\\xd4e1\\xae$\\xabH\\xf7\\xcd\\x92\\x1
   ...: 66(U\\x99\\x12o\\x94\\x82\\x9c\\xd9\\xf3\\xa7\\x9fjW\\xea \\nNX*\\xbe\\x1f\\xa9\\x18`\\xec\\xd9\\xc1\\x8c\\x87C\
   ...: \x18\\x01\\\\\\x94\\x05\\xa1$\\x19\\x8d/T\\xcaG\\xf2\\x1c\\x8a\\xbb\\xcb\\x90\\xd7\\xf6\\x1eaZ\\xff\\xaa\\xe2\\x
   ...: 8d\\xe9\\x93a\\x12\\xad\\x0f\\xd2<c\\xe5\\x94\\x80NR.\\x9f\\[email protected]\\rM\\xa4\\x84\\xe3\\xa5\\xbal'\\xcb\\xfa\\x01\
   ...: \xfbX83"
   ...:

In [2]: s
Out[2]: "x\\xda\\x15\\xc1m\\x13B0\\x00\\x00\\xe0_\\xe4NY\\x97>\\xf8`\\xde\\xc6e\\xa1X\\xe7\\xcb\\x8eU\\x13S\\xcd\\x14\\xfa\\xf5]\\xcf\\xc3\\xed?\\xd88\\x1dj{U\\x1fw\\x8b\\xa3\\xaf\\x8d\\xd0|\\xd4e1\\xae$\\xabH\\xf7\\xcd\\x92\\x166(U\\x99\\x12o\\x94\\x82\\x9c\\xd9\\xf3\\xa7\\x9fjW\\xea \\nNX*\\xbe\\x1f\\xa9\\x18`\\xec\\xd9\\xc1\\x8c\\x87C\\x18\\x01\\\\\\x94\\x05\\xa1$\\x19\\x8d/T\\xcaG\\xf2\\x1c\\x8a\\xbb\\xcb\\x90\\xd7\\xf6\\x1eaZ\\xff\\xaa\\xe2\\x8d\\xe9\\x93a\\x12\\xad\\x0f\\xd2<c\\xe5\\x94\\x80NR.\\x9f\\[email protected]\\rM\\xa4\\x84\\xe3\\xa5\\xbal'\\xcb\\xfa\\x01\\xfbX83"

In [3]: s.encode('utf-8')
Out[3]: b"x\\xda\\x15\\xc1m\\x13B0\\x00\\x00\\xe0_\\xe4NY\\x97>\\xf8`\\xde\\xc6e\\xa1X\\xe7\\xcb\\x8eU\\x13S\\xcd\\x14\\xfa\\xf5]\\xcf\\xc3\\xed?\\xd88\\x1dj{U\\x1fw\\x8b\\xa3\\xaf\\x8d\\xd0|\\xd4e1\\xae$\\xabH\\xf7\\xcd\\x92\\x166(U\\x99\\x12o\\x94\\x82\\x9c\\xd9\\xf3\\xa7\\x9fjW\\xea \\nNX*\\xbe\\x1f\\xa9\\x18`\\xec\\xd9\\xc1\\x8c\\x87C\\x18\\x01\\\\\\x94\\x05\\xa1$\\x19\\x8d/T\\xcaG\\xf2\\x1c\\x8a\\xbb\\xcb\\x90\\xd7\\xf6\\x1eaZ\\xff\\xaa\\xe2\\x8d\\xe9\\x93a\\x12\\xad\\x0f\\xd2<c\\xe5\\x94\\x80NR.\\x9f\\[email protected]\\rM\\xa4\\x84\\xe3\\xa5\\xbal'\\xcb\\xfa\\x01\\xfbX83"

In [4]: type(s.encode('utf-8'))
Out[4]: bytes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question