make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / qrwifi
blobbeec81391b07e661d5febe8016db6af3db101927
1 #!/bin/bash
3 true <<EOF
4 =pod
6 =head1 NAME
8 qrwifi - Generate a string, used in WiFi-setup QR codes, containing a hotspot name and password
10 =cut
12 EOF
15 set -e
16 set -u
18 if [ $# -lt 2 ]
19 then
20 echo "Usage: $0 [<SSID>] [<PSK>]" >&2
21 false
24 is_hidden=false
26 echo -n "WIFI:T:WPA;S:${1?enter SSID argument};P:${2?enter PSK argument};H:$is_hidden;"