ftp -o - https://jcs.org/move_in | sh -
1#!/usr/bin/env ruby
2
3require "openssl"
4
5len = ARGV[0].to_i
6if len == 0
7 len = 8
8end
9
10str = ""
11
12while str.length < len
13 while str.length < len
14 chr = OpenSSL::Random.random_bytes(1)
15 ord = chr.unpack('C')[0]
16
17 # 0 9 a z
18 if (ord >= 48 && ord <= 57) || (ord >= 97 && ord <= 122)
19 # avoid ambiguous characters
20 next if chr == "0" || chr == "l"
21
22 str << chr
23 end
24 end
25end
26
27puts str