Skip to content

Instantly share code, notes, and snippets.

@0x3333
Created March 9, 2021 15:27
Show Gist options
  • Save 0x3333/a59aefe50ef19f490c57a00b3428e6f3 to your computer and use it in GitHub Desktop.
Save 0x3333/a59aefe50ef19f490c57a00b3428e6f3 to your computer and use it in GitHub Desktop.
Generate random passwords

Generate random passwords using 4 different charsets. Configurable length and count(Default 32 len, 30 count).

Usage:

./genpass
Usage: ./genpass [length(32)] [passwords_count(30)]

20973143392597200522372078343494   9gdds8ihw2niigs3f4gzddv9rtfmv8kx   dlaoEefHJJxN6oqglazb5RgstmD9z144   ,i-UIZVNd|~9$Z'5=J@=RVt{nIV+J{a&
45656053506377489597126894570217   up34vlejddl3vnj5n7m38733myv8dkx1   9wJLm8nCwN0AhHznsod2VyX7S5Yhd0ah   ^#y-@GBRTX&BTi @oJZO9f8K:9tUVTbU
22621855468594142150908601448823   jeflr2omlourf40a0xqcmoaw7qhm08pg   tjIq7qu5BKthd66pmYOX39HQsTOfhynp   5Ur`P)m3D0?X0Xlq V%c>S/nA@WM8B)V
67996528762504648615638719275700   p4hqc8frcuomyllytum624sf6r0a9f2f   PpMI9vSo0nqsbVDsCTDkhbdZwAj3Ycq6   6uMP4,A;OH0::xe\[6/d"=L"@~}0(QX.
00651972351659860408680679050853   jxlrzsm1fby51lwtdkxr4lb3uf7wzi4t   Fbl7r30aADe0Ei7xC9SauCbG6Mj1AuH2   kBcf)DPwBcEtFH,r{uG|JVGkNBS\p_`u
42387289939425975349121317583447   ymf552u5tfbeswp99xzvt4fq95wcafv9   RCzPj0Bx6NTrZVzIH0QOCzSygRFuxhgK   i<E=kTv3*}EF"m0Im6L6X,LE"J}%c?wG
21016304913404088425363977998271   89l5i58oqq98mwiiafrqamfywrw7xljj   cgGKJSB3SV1heQQ6C6y0sdd4d4zQ3ABm   >mjKybku|)]rp#}MHVrvpB?a1:<mpn*+
68819513404371840776095938646201   qm6jlce8qci9lptrml5qfxrp5ckdje9j   UB4rAGtaZy3pangV6QYV5aYZzA4znw6P   U*PN67O1>uN3G8&)2yt%fS%Pg5Gi\[Hc
23876217700382324319091320552156   y7dpsfrv47hcyw63fpcnapdvcgfcpiy6   fVux8B9nrd2ah7jtLIsj0ekhXIJcCRSz   8RhS/){((BU\mcZHqq[>SSK6s:^ #d|F
98299123687411171328372014793788   3o9940g40eo8mfwt7q1yr7z124kkg6u8   NP24YKlq4Z5eBFtzqKXgX3TS5LDY6rBi   r y;X<OFqjRvG>Io4Bq"E?@i-/g\sB=h
90023806057394979317727383697819   q8xi10dvoh5rvpdaqcy6ogxy4wdp49kl   91KTNObOGGE3wYEc5wJbzZzaGWIetFJO   QlRCSLQ-NnIvqF1x\I_Br!JSV#V4:75I
90707478600955915753374536639140   tao08e6192naf0fvuxyz5rev2uymafl1   3FgXKePVdp8q7Wpirz6dVbrqvQbkJWbt   ^qlQ|#%vv8*|GcV-W,p(+@z*pbp7BPY;
33715514071004021728265649385553   i4yk2ju8e4e27iav0anlppr2umdwq1ya   RbZilMxYDYKWFkSLk8XL4Ph6lmNelQZW   E>X2qsRWK _aLG%,yl`|HrQ^Tf3%~$pp
41401082389846316457369424906961   5v3s918t68hkpxzvgdvnvsxbedlmoo7p   NvZ6qbCRtVt2Ue9zY6YwXibFgCbmOZbT   /;`#g@*n]{[*bn/OtZGb%4{Rrr0X<s*'
48648757885690750286754186509244   3zpu0hzbjnravh9q59x52h3p6xt9m63y   I4re3AZHcOR9AV4IDHXGo4tVDEZgEALZ   M8 rM=vF7v1~1p?oPf/Bm6.v16i92QIN
30430485744665608802048687203748   68mtkmrr5fl9no6aolu158vpl7ixczlv   mgaRfuU5e0ZaMiS1yZiaEnItNahUxIcs   K<(Lv8[>=QeJDypMH.+EGbGVRQ06(Wu'
13308752617977962412278310086293   ctgezcsnxj682vd7px8jvzobnasw56d5   oNq28YsRxQTZaWndBFMowWUjRPuoQVoC   gE}"vEdcfn'_v;nn(_kKm6T46LK3X~Ig
84918451435709458613915399025687   w11ebpp74ixhbt8toyuljzpf935kpqbv   CnMya8giYTAveOFNtnA3VWxsW3NjdSrs   $G1BbXaa-fR2(v+gn)<SV/>M@!;zVX$w
05288434944329052237917884655596   k0bitabr1zmfgx3qgr8cpfic7ef4t0bl   rUhjqpRwAy1TfF1GXtwnasq8HmtAVIzC   dW1l:r nE%-TLJKPkPj[?KpIH%Od%p&e
57236374670850734853138654929978   d9xi45t42n15fh9vestfetvgf83f9ddk   XYTkW3PPG5TazvJA12Sjayj1T3UTcLfH   OS:;Q^'X,_/$-y9PV[\x7@/"|C\0fAeJ
15653215173482995270492999961945   dn9noi1se2aobkp9ehxml5u07kag466m   7XR9IKqoyKhVG2s916Up3zIo6xh6qDYk   6WlJ*Rebci5P;4\[R=JI=zpr.z#@aIj,
50964702270482637318692127053068   2w441txyy3p8a9s4hjgzlevbn2id3yse   7PrgR2Vwzk6HZIYrO6ZIAFsBxJItXxoM   e#m1oBnST4%m4>U0CldD%U@(XS$vTdOT
97205253182997556297312565479819   wc2ibl70hdql5hc6lmsbs72nf3wuz1dw   zP739LJKdYIYFYiekN07N7Yb6dJ9rXzP   %?xz)y}}-'}?Or j*z=Hc[8`K>akY2%y
58290798201504167740731372939361   i36grs3sps3gn7nsht9hvuc78lk1fyof   KOVcAxJDNvKRuh54LSMQRuAU2VMJQsbt   p(8Tq 1YE?qE*5m,Sh_[<Csz:Ysg2"sF
39061465498342515170811448483699   15t4g0ih7vmg6ryt8mqnsisxs9nnz8zc   u723s67uYSXlDB2bGZN5n8ujwz54oAl4   "#aI?-ZGNA!ASow_$I~n0V0Hc4iLn|ZW
85794050381496366049557621860200   3jypbnkf2jwegzs6mat4l5ngh8o2zc2u   CrmGvp27CbtEt26lIrSD2qB81SdZaLOE   _OI?W;W*GCU9]ul3rqv~6~o_%2sBCv}p
91597244514750335699424190535722   8okjhn7xx3cjjnscxrmimi3b4xo8fd4b   6YBOcYhAgkV3u3OgzFvaGjnsFA4SkEKG   l/gds<m{z\J&I@)Iji(W4%yCf!dnw;5w
68695474247507187351509170177612   eyck1y34x6ptc992oosa2zjwm3pqs159   fkuuo3jKRLHYuT9AoSVPy17fsF8HxHB3   c4=.O<FvIkJG [*#=]r5m0.zYmr8JoKD
95504745164066673390090469969966   sxhdpzvfx7jzkqnn66y3dd6lf49l3wyd   qcxIthOvbc1k8noC1o85u4KaQlR056GR   nIS(N.Z<#/#Q(=L^eUh=&BMk7A|Utd}.
71015426806838525671520291032572   g9pe54jmculddtva52udpo9q9oppnjvg   tBQjGaCk604zq403fjZ1k3Wdgpom0Bc6   t&u~aesl gH? S3JR0~JNV!xUZRWr-WI

./genpass 5
Usage: ./genpass [length(5)] [passwords_count(30)]

96162	n2k5m	LreTp	R{4-B
20167	czpal	lFANm	W g]:
11831	ocfby	dbn6a	uG*WS
50827	zb6aq	LaNW4	(pAV
82761	dccj7	UXcx3	a>Spl
32237	r8wp9	u0fjn	y=4=q
62520	ok2cn	rJV8w	K>C-?
07084	v00ne	fxc4q	Sn1Z7
76749	dz3su	OjGhM	,YnK}
32133	928k2	Csgx3	4BOM0
54481	pj2jd	SVphv	Qh4:0
34173	1aa9a	dGJuW	ct;Ve
21768	jhzx4	lejQP	av-%6
07785	wdcyv	B4vMU	p|Y%f
32460	39x3j	V1DU0	N&w\7
47706	co836	8Lm82	MAC!a
57862	yonmv	vNIPU	GUgHO
60551	83dso	5PDFB	q=ri6
31543	oku53	fDj2Z	./iJy
63097	hg172	RlRQg	*u9C1
09319	xhuqs	BY5GN	Rpvd=
27305	sz48j	5mk0a	,b!?"
18174	t6q7x	67Qp3	G[[$_
67420	v1jp2	AIFG8	Y'e39
25414	csiuo	FNRdK	+j#iN
85928	ycqgl	4gNLM	7=QVV
51361	w07zt	KVjGl	e0i5&
92035	o1u8v	yXhl6	),~Wi
95679	1uxdk	t1xwu	k, `|
42732	8uf9i	SKXXY	4i"yx

./genpass 10 8
Usage: ./genpass [length(10)] [passwords_count(8)]

0986277238   ddjborr8py   Yo8vlOYNrk   XKY(wDIf%U
6668979897   o8rma3o7nl   YcyJ4KPKKn   CNM3OPY>Nj
4067361702   4zutsursl2   Z0vTvBqoqp   MG:mh@<b6D
9819339693   hb0b26y7hd   IsJhA5Ioj5   A+_i)Wo<X#
3649234034   y43ftyqv8h   S6twzNfrfO   A.xr(`%cCi
9721412768   gjiarl4llp   rAVAn05l0l   ;U\,nJ#L{w
6274843477   05h9bzsga7   3UfVRsdrnE   YPA8v=aq?1
1417169410   gxzbhb5cup   o90Ckyv0tX   u\Yhcn8nmU
#!/bin/bash
LEN=${1:-32}
COUNT=${2:-30}
echo "Usage: $0 [length($LEN)] [passwords_count($COUNT)]"
echo
cat <<EOF | gpr -4 -t -J -S" "
`cat /dev/urandom| gtr -dc '0-9' | fold -w $LEN | head -n $COUNT`
`cat /dev/urandom| gtr -dc 'a-z0-9' | fold -w $LEN | head -n $COUNT`
`cat /dev/urandom| gtr -dc 'a-zA-Z0-9' | fold -w $LEN | head -n $COUNT`
`cat /dev/urandom| gtr -dc '!-~ ' | fold -w $LEN | head -n $COUNT`
EOF
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment