Groups
Sign in
Groups
talk.politics.crypto
Conversations
About
Send feedback
Help
info
Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Learn more
<04><TFT><SCRIPT> Tin Foil Tools Script-Foo Challenge
0 views
Skip to first unread message
CRYP7010G3R
unread,
Mar 18, 2023, 3:35:49 PM
3/18/23
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
#!/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"
0 new messages