Last active
February 18, 2023 03:05
-
-
Save m0rb/01b1a68db58f19a602464159b3dfbaa4 to your computer and use it in GitHub Desktop.
horrible base64 encoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
B=({A..Z} {a..z} {0..9}) | |
I=`perl -pe'$_=unpack"B*"'<<<$*` | |
for((;${#I}%6;)){ I+=0;} | |
for((;p<${#I};p+=6)){ O+=${B[2#${I:p:6}]};} | |
for((;${#O}%4;)){ O+=\=;} | |
echo $O |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment