-- Leo's gemini proxy

-- Connecting to gemini.mingmengtou.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

neil in gemini space

one time pad type thing - 2021-04-05


wanted a one time pad generator.


#!/bin/bash
# neil c timms 2021-04-04
#
# requires passchars.txt
# no input
# outputs a block of a..z 0..9 in 3 rows
# 	interleaved with 3 rows of shuf randomish chars, digits, symbols
# a one time pad type thing
#
rand_chars () {
	shuf -n9 passchars.txt | tr "\n" " "; echo
}
echo {a..i}
rand_chars
echo {j..r}
rand_chars
echo {s..z} 0
rand_chars
echo {1..9}
rand_chars
# and that is all

output something like this:


a b c d e f g h i
? E s g # F . m 5
j k l m n o p q r
9 @ \ i 2 N 0 S t
s t u v w x y z 0
K D & l " s P * '
1 2 3 4 5 6 7 8 9
W 6 z s { K x Z ?

only an example one time pad - do not use for real. this is not a dynamic page!


passchars.txt made with:


printf '%b\n' {0..9} '\'{40..57} '\'{72..77} '\100' '\'{133..137} '\'{173..176} {a..z} {A..Z} | \
sort -u | awk 'length == 1' > passchars.txt

the awk is there to strip out some escape crap that i was too dumb to not collect in the first place.


file of 94 chars (188B)


used on this diceware type page:

2021-04-08 seven words, and a one time pad.



---

return to gemini.mingmengtou.org index page.

---

neil.gemini@mingmengtou.org

content licensed CC-BY-SA 4.0 unless stated.

creative commons licence information.

-- Response ended

-- Page fetched on Thu May 2 11:44:34 2024