#!/usr/bin/env bash site=$1 limit=$2 if [ $# -lt 1 ]; then read -ep "Site: " site fi if [ $# -lt 2 ]; then limit=20 fi read -sep "Salt: " salt saltresult=`echo $salt | shasum -a 512` if [ "${saltresult:0:128}" == "8309357f48bd4cf5563dce72d4c0791067f9c4e8c7f3b85c800520c419f0525f4d5a080bed5941d267b3cfdb06250ae236f9ff44f6c12e3c9713e2e0a662ed7e" ] then result=`echo "$site$salt" | shasum` echo echo ${result:0:$limit} else echo "invalid salt!" fi