Posted November 07, 2017
decode file: base64 -d "file"
decode string: echo "string-in-base64" | base64 -d
encode string: echo "string" | base64
encode file: cat file.zip | base64 > file.zip_base64
$ echo "hello" | base64
$ echo "aGVsbG8K" | base64 -d
This leads to:
adamhm: echo -e "begin 664 -\nM4U1\x213\$M%4CH@4VAA9&]W(&]F(\$-H97)N;V)Y;\"\`M(#9#-35&+3DY.3@Y+3\$S\n*0C,U+4\$Y0S)!\"@\`\`\n\ `\nend" | uudecode
apparently one of the quotes is missing. Base64 format is designed exactly to post or get binary data on ascii text-only boards or mailers.
Post edited November 07, 2017 by Lin545