Skip to content

Instantly share code, notes, and snippets.

@lrvick
Created January 28, 2015 06:57
Show Gist options
  • Save lrvick/4b29a465f6aaec737520 to your computer and use it in GitHub Desktop.
Save lrvick/4b29a465f6aaec737520 to your computer and use it in GitHub Desktop.
PAM NFC screen unlock helper script
valid_hash=$( cat /home/lrvick/.nfcauth )
challange_hash=$( printf $1 | shasum -a 256 | sed 's/ .*//' )
echo $valid_hash
echo $challange_hash
if [ "$valid_hash" == "$challange_hash" ]; then
echo "unlocked"
killall slock
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment