Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 470 Bytes

121.md

File metadata and controls

27 lines (21 loc) · 470 Bytes

Repeatedly decode (b64) until the string is of small length, say 30 Bash script:

if [ $# -eq 0 ]; then
  echo "Usage: $0 <input_file>"
  exit 1
fi

if [ ! -f "$1" ]; then
  echo "Error: File '$1' does not exist."
  exit 2
fi

input_text=$(cat "$1")

while [ ${#input_text} -gt 30 ]; do
  input_text=$(echo "$input_text" | base64 -d)
  
  if [ $? -ne 0 ]; then
    echo "$input_text"
    exit 3
  fi
done