Skip to content

Instantly share code, notes, and snippets.

@puppis42
Created May 27, 2023 23:43
Show Gist options
  • Save puppis42/6f2930f1b4fa24693c686e1c81dc5f1b to your computer and use it in GitHub Desktop.
Save puppis42/6f2930f1b4fa24693c686e1c81dc5f1b to your computer and use it in GitHub Desktop.
import base64
f = open('a.exe', 'r+b')
data = f.read()
base64_bytes = base64.b64encode(data).decode()
f = open("output.txt", "a")
f.write(str(base64_bytes))
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment