Common commands for encoding and decoding text, base64 and hex from the command line.
Encoded strings show up constantly in loot, config files and captured traffic. These are the conversions I reach for most often to make sense of them.
Encode
# Convert text from UTF-8 to UTF-16LE, then to base64 (useful for values that need to match Windows' native string encoding)echo -n "example|value|here" | iconv -f UTF-8 -t UTF-16LE | base64 -w 0Decode
cat encoded_file | base64 -d # Decode base64cat hex_file | xxd -r -p # Convert hex back to textpython -c "print(HEX_value)" # Convert hex to decimal



