mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 12:37:21 +00:00
15 lines
328 B
Bash
Executable File
15 lines
328 B
Bash
Executable File
#!/bin/bash
|
|
|
|
declare -g PASSWORD=""
|
|
declare -gr WORDLIST="/usr/share/dict/words-custom"
|
|
|
|
END=4
|
|
for ((i=1;i<=END;i++)); do
|
|
LINE=$(($RANDOM + 1))
|
|
WORD=$(sed $LINE!d $WORDLIST)
|
|
PASSWORD+="${WORD}-"
|
|
done
|
|
|
|
NUMBERS=$(($RANDOM % 10))$(($RANDOM % 10))$(($RANDOM % 10))$(($RANDOM % 10))
|
|
PASSWORD+=$NUMBERS
|
|
printf "$PASSWORD" |