Created
March 12, 2020 23:05
-
-
Save dumpofmemory/09824b8684696386f415701d2bd4eea3 to your computer and use it in GitHub Desktop.
a bash script decode and clean decoded hexstring
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
echo "\n=-=-=-=-=-=-=-=-=-=-=-= Input hexstring -=-=-=-=-=-=-=-=-=-=\n" | |
read input | |
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-= DECODED -=-=-=-=-=-=-=-=-=-=-=-=\n" | |
decode() { | |
echo $1 | xxd -r -p | |
} | |
OUTPUT="$(decode $input)" | |
CLEAN=${OUTPUT//[^a-zA-Z0-9_]/.} | |
echo $CLEAN | |
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-= FINISHED EXECUTION \n" | |
exit | |
;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment