Browse Source

genpasswd + ssl_check_domain

master 0.6.1
pvincent 4 years ago
parent
commit
d3f2401cb2
  1. 12
      tools/genpasswd
  2. 5
      tools/ssl_check_domain

12
tools/genpasswd

@ -0,0 +1,12 @@
#!/bin/bash
SIZE=${1:-12}
re='^[0-9]+$'
if ! [[ $SIZE =~ $re ]] ;then
echo "error: SIZE=$SIZE Not a number" >&2; exit 1
fi
if [[ $SIZE -lt 4 || $SIZE -gt 20 ]]; then
echo "expected SIZE=$SIZE not in range [4..20]" >&2; exit 1
fi
tr -cd '[:alnum:]' < /dev/urandom | fold -w $SIZE | head -n1

5
tools/ssl_check_domain

@ -0,0 +1,5 @@
#!/bin/bash
DOMAIN_NAME=$1
curl --insecure -v https://$DOMAIN_NAME 2>&1 | awk 'BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }'
Loading…
Cancel
Save