(Jonathan Bennett) added console-qr.sh script to create QR codes from fwknopd access.conf keys

This commit is contained in:
Michael Rash 2015-05-20 18:52:30 -07:00
parent ce76a063e1
commit 29defca4d5
3 changed files with 28 additions and 0 deletions

View File

@ -1,6 +1,8 @@
Jonathan Bennett
- Contributed OpenWRT support - see the extras/openwrt/ directory.
- Suggested the addition of the --key-gen option to fwknopd.
- Contributed the console-qr.sh script (in extras/console-qr/) to create
QR codes from fwknopd access.conf keys.
Sebastien Jeanquier
- Assisted with getting fwknop included in BackTrack Linux - the choice

View File

@ -2,6 +2,8 @@ fwknop-2.6.7 (05//2015):
- Added --key-gen to fwknopd. This feature was suggested by Jonathan
Bennett, and will help with ease of use efforts. The first platform to
take advantage of this will likely be OpenWRT thanks to Jonathan.
- Added a script from Jonathan Bennett at extras/console-qr/console-qr.sh
to generate QR codes from fwknopd access.conf keys.
fwknop-2.6.6 (04/23/2015):
- [server] Add the ability for fwknopd to function as an generic SPA

24
extras/console-qr/console-qr.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
while read line; do
line=$(echo "$line" | sed 's:#.*$::g')
if [ "$(echo $line | grep -c 'SOURCE')" -ne "0" ]
then
source=$line
if [ -n "$qr" ]
then
echo $'\n\n'$source
qrencode -o - -t UTF8 "$qr"
qr=""
fi
fi
if [ "$(echo $line | grep -c 'KEY')" -ne "0" ]
then
trline="$(echo $line | sed 's/^[ \t]*//;s/[ \t]*$//' | sed 's/ /:/')"
qr="$qr$trline "
fi
done
if [ -n "$qr" ]
then
echo $'\n\n'$source
qrencode -o - -t UTF8 "$qr"
fi