Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You are destined to become the commandant of the fighting men of the department of transportation.


sci / sci.crypt / <04><TFT><SCRIPT> Tin Foil Tools Script-Foo Challenge

SubjectAuthor
o <04><TFT><SCRIPT> Tin Foil Tools Script-Foo ChallengeCRYP7010G3R

1
Subject: <04><TFT><SCRIPT> Tin Foil Tools Script-Foo Challenge
From: CRYP7010G3R
Newsgroups: sci.crypt, talk.politics.crypto, rec.puzzles
Organization: Cyber23 news
Date: Sat, 18 Mar 2023 19:36 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!weretis.net!feeder8.news.weretis.net!news.cyber23.de!.POSTED!not-for-mail
From: cryptologer@defcon.social (CRYP7010G3R)
Newsgroups: sci.crypt,talk.politics.crypto,rec.puzzles
Subject: <04><TFT><SCRIPT> Tin Foil Tools Script-Foo Challenge
Date: Sat, 18 Mar 2023 14:36:04 -0500
Organization: Cyber23 news
Message-ID: <tv53qj$131q$6@news.cyber23.de>
References: <tuvjae$25np$1@news.cyber23.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 18 Mar 2023 19:35:48 -0000 (UTC)
Injection-Info: news.cyber23.de;
logging-data="35898"; mail-complaints-to="abuse@cyber23.de"
Content-Language: en-US
In-Reply-To: <tuvjae$25np$1@news.cyber23.de>
View all headers

#!/usr/bin/env bash

# (tft) Tin Foil Tool Formatter - compress or decompress a base32
columns file

# Usage
# compress > $ tft smush [filename] ... > $ tft -c [filename]
# decompress > $ tft bloat [filename] ... > $ tft -d [filename]

fyle="$2" ; [[ ! -f "$fyle" ]] && echo "file not found!" && exit 1

smush() {
cat "$fyle" | xz | base32 -w0 | fold -w 8 | tr '\n' ' ' | fold -w 63 |
tr -d '='
}

bloat() {
cat "$fyle" | tr -dc A-Z2-7 | base32 -d | unxz
}

[[ "$1" == "smush" ]] && smush "$2" ; [[ "$1" == "-c" ]] && smush "$2"
[[ "$1" == "bloat" ]] && bloat "$2" ; [[ "$1" == "-d" ]] && bloat "$2"

1

rocksolid light 0.9.8
clearnet tor