Re:Show HN: Wordle over DNS
by testplzignore on Saturday February 19, 2022 @06:49PM
(#30401694)
Here's an emoji-less version that prints correctly-placed characters in uppercase, incorrectly-placed characters in lowercase, and incorrect characters as spaces. Gotta love bitmask tricks.
wd() { dig +short txt $1.example.wd.ip.wtf | head -n1 | perl -pe's/"//g;s/\\226\\172\\156/ /g;s/\\240\\159\\159\\168/chr(255)/eg;s/\\240\\159\\159\\169/chr(223)/eg' | perl -pe'$_&=lc("'$1'")'; }