19 lines
458 B
Bash
19 lines
458 B
Bash
random() {
|
|
if [[ $# -eq 0 ]]; then
|
|
num=32
|
|
else
|
|
num=$1
|
|
fi
|
|
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $num | head -n 1
|
|
}
|
|
|
|
function up() { cd $(eval printf '../'%.0s {1..$1}); }
|
|
|
|
function pipin() { pip freeze | grep $1; }
|
|
|
|
function passhash() {
|
|
read -sp 'Password: ' tmppass;
|
|
echo $tmppass | python3 -c 'import crypt; print(crypt.crypt(input(), crypt.mksalt(crypt.METHOD_SHA512)));';
|
|
unset tmppass;
|
|
}
|