From 9620226a750f6c2cbf37996a69b0a5ffcff740ea Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Mon, 25 Jan 2021 22:31:34 +0200 Subject: [PATCH] add wifiqr.bash (& .gitignore) for creating QRs to join WiFis --- bash/.gitignore | 2 ++ bash/wifiqr.bash | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 bash/.gitignore create mode 100755 bash/wifiqr.bash diff --git a/bash/.gitignore b/bash/.gitignore new file mode 100644 index 0000000..4ef5906 --- /dev/null +++ b/bash/.gitignore @@ -0,0 +1,2 @@ +# wifiqr.bash output +*.png diff --git a/bash/wifiqr.bash b/bash/wifiqr.bash new file mode 100755 index 0000000..26fc6c4 --- /dev/null +++ b/bash/wifiqr.bash @@ -0,0 +1,13 @@ +#!/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"