scripts/bash/wifiqr.bash

14 lines
341 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Arguments: SSID and WPA2 (3 untested) passphrase
# Outputs QR code to terminal
qrencode -t utf8 "WIFI:T:WPA;S:$1;P:$2;;"
# Stores QR code as SSID.png, -s doubles pixel size from default 3
qrencode -s 6 -o $1.png "WIFI:T:WPA;S:$1;P:$2;;"
# Prints details
echo "SSID: $1"
echo "Passphrase: $2"
echo "Stored as $1.png"