Guest User

Untitled

a guest
Dec 17th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #!/usr/bin/env python
  2. """
  3. Python2 snippet for taking a base64-encoded unicode string, decoding it
  4. properly so there aren't trailing null bytes for ASCII characters
  5.  
  6. Leaving this here so I don't have to look it up again
  7.  
  8. @decidedlygray
  9. """
  10.  
  11. import base64
  12. b64_str = "ADD BASE64 UNICODE STRING HERE"
  13. b64_str_decoded = base64.b64decode(b64_str).decode('UTF-16')
Add Comment
Please, Sign In to add comment