Posted November 07, 2017
You can base64 encode and decode easily.
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
aGVsbG8K
$ echo "aGVsbG8K" | base64 -d
hello
>
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.
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
aGVsbG8K
$ echo "aGVsbG8K" | base64 -d
hello
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
This leads to: >
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