Talk:Random Strong Password Generator
Revision as of 20:27, 7 November 2016 by RequestedDeletion (talk | contribs) (→Original code (/usr/bin/randpw) and changelog)
Original code (/usr/bin/randpw) and changelog
#!/bin/bash if [[ ! $1 =~ ^[0-9]+$ ]]; then echo "Invalid argument. Argument must be a positive number.";echo echo "Usage: randpw [n]";echo logger -i ERROR: no positive integer provided, no password generated -t randpw else < /dev/urandom tr -dc '_A-Z-a-z-0-9!?@+[](){}"|_~<>*%^&#+=/\.$:;,-' | head -c${1:-$1};echo; exit 0 fi exit 0
Changelog
- Nov 7. 2016 - Removed debug ARG variable, added / to the list of characters.