Advertisement
kiril_cvetkov

Untitled

Oct 25th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. input = "00 1B 00 5B 00 66 00 53 00 5F 00 64 00 6D 00 46 00 4D 00 31 00 1B 00 5B 00 72 00 6D 00 1B 00 5B 00 66 00 53 00 5F 00 67 00 6D 00 20 00 39 00 35 00 2E 00 35 00 1B 00 5B 00 66 00 53 00 5F 00 64 00 6D 00 20 00 4D 00 48 00 7A 00 00 00"
  2. import re
  3.  
  4. input = input.replace("00", "")
  5.  
  6. input = input.replace("53 00 5F", "")
  7. input = input.replace("1B 00 5B", "")
  8. input = input.replace("1B", "")
  9.  
  10. s=""
  11. for element in input.split():
  12. try:
  13.  
  14. s += (bytearray.fromhex(element).decode())
  15. except Exception as e:
  16. pass
  17.  
  18. s = str(s.encode('ascii'))
  19.  
  20. article = re.sub(r'(\[fS_)..', '', s)
  21. article = re.sub(r'(\[r).', '', article)
  22.  
  23. print(s)
  24. print(article)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement