summaryrefslogtreecommitdiff
path: root/misc/passwdgen
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-09-12 22:37:40 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-09-12 22:37:40 -0500
commit6f64fa699ecf889d72630403aa94a73845cb947f (patch)
treedc319c80dbc85666213c3d16bbc34d8a2de70deb /misc/passwdgen
parentb25890097e7dfaa2d7a4dbf703f289a74720452c (diff)
downloadscripts-6f64fa699ecf889d72630403aa94a73845cb947f.tar.xz
scripts-6f64fa699ecf889d72630403aa94a73845cb947f.zip
remove passwdgen script
Diffstat (limited to 'misc/passwdgen')
-rwxr-xr-xmisc/passwdgen16
1 files changed, 0 insertions, 16 deletions
diff --git a/misc/passwdgen b/misc/passwdgen
deleted file mode 100755
index 8e20ba7..0000000
--- a/misc/passwdgen
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-[ -n "`echo $1$2 | tr -d '[:digit:]'`" ] && echo "Usage: $0 [Itterations] [Length] [Character Set]" && exit
-[ -z "$1" ] && itt=5 || itt=$1
-[ -z "$2" ] && len=20 || len=$2
-[ -z "$3" ] && set="[:alnum:],.<>/?\'!@#$%^&*()[]{};:-_=+" || set=$3
-genpasswd() { tr -cd "$3" < /dev/urandom | fold -w$1 | head -n$2; }
-genpasswd $len $itt $set
-
-# Old solution using recursion which was much slower (and apparently less posix compliant) but also much cooler
-## This should all work in dash (its all posix compliant shell), but there are frequent segmentation faults and formatting errors in the output. Bash fixes that all for some reason. Probably an issue of recursion depth and some other bugs or something in dash I have no idea.
-#genpasswd() { pass=$pass`head -1 /dev/urandom | tr -cd '[:graph:]'` && [ `echo -n $pass | wc -m` -ge $len ] && echo $pass | cut -c -$len && pass="" || genpasswd; }
-#for i in `seq $itt`; do genpasswd; done
-
-# Other old solution that is much faster for extremely long passwords, but slower for many shorter ones since it utilizes a for loop
-#genpasswd() { tr -cd '[:graph:]' < /dev/urandom | head -c$1 && echo; }
-#for i in `seq $itt`; do genpasswd $len; done