- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| LICENSE | ||
| README.md | ||
| wifi-qr-gen.sh | ||
WIFI QR Code Generator
Script to generate a QR code for WiFi.
Installation
- Clone this repository
git clone https://codeberg.org/lingling/wifi-qr-gen
Requirements
-
The command
qrencode. Install it with the package manager of your distribution.-
Arch Linux:
sudo pacman -Sy qrencode -
Debian/Ubuntu:
sudo apt update && sudo apt install qrencode
-
Usage
This script can be used either by exporting environment variables or using user input after the script is executed.
Read at Runtime
This is the recommended way. Note that the bash function read is used. This
does interpret the input, especially it does word splitting. So be careful with
whitespaces. See
bash(1) . If your
password contains special characters you may want to use environment variables.
-
Execute the script:
./wifi-qr-gen.sh -
Answer the prompts and confirm with
<CR>. Note that you won't get visual feedback on the password prompt.
Environment Variables
Use this way if your password contains special characters and didn't worked with
the first approach. You may want to set HISTCONTROL=ignoreboth and prefixing
your commands with a whitespace to prevent having your password in the command
history. See
bash(1) for more
information.
-
Set and export
WLAN_SSID:WLAN_SSID="My cool WLAN name" export WLAN_SSID -
Set and export
WLAN_PASS:WLAN_SSID="My cool WLAN name" export WLAN_SSID -
Execute the script:
./wifi-qr-gen.sh