1.2.2 Encoding And Decoding Base64

To encode data in Python(2.x) using Base64, use the following code:

>>> import base64>>> plain_text = "One">>> encoded = base64.b64encode(plain_text)>>> print encodedT25l

To decode base64 data in python, use the following code:

>>> import base64>>> encoded = "T25l">>> decoded = base64.b64decode(encoded)>>> print decodedOne
CyberChef by GCHQ is a great web application that allows you to carry out all kinds of encoding/decoding, encryption/decryption, compression/decompression, and data analysis operations within your browser. You can access CyberChef at https://gchq.github.io/CyberChef/, and more details can be found at https://github.com/gchq/CyberChef.

You can also use a tool such as ConverterNET (http://www.kahusecurity.com/tools/ ...

Get Learning Malware Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.