wifiqr

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Wi-Fi QR Code generator

Test Status PkgGoDev Go Report Card

Create a QR code with your Wi-Fi login details.

Use Google Lens or other application to scan it and connect automatically.

Installation

Download and install Go https://golang.org/doc/install.

Clone the repository:

git clone https://github.com/reugn/wifiqr.git

Build:

cd wifiqr
go build ./cmd/wifiqr

Usage

Usage of ./wifiqr:
  -enc string
        The wireless network encryption protocol (WEP, WPA, WPA2). (default "WPA2")
  -file string
        A png file to write the QR Code (prints to stdout if not set).
  -hidden string
        Hidden SSID true/false. (default "false")
  -key string
        A pre-shared key (PSK). You'll be prompted to enter the key if not set.
  -size int
        Size is both the image width and height in pixels. (default 256)
  -ssid string
        The name of the wireless network. You'll be prompted to enter the SSID if not set.
  -version
        Show version.

Usage example

./wifiqr -ssid some_ssid -key 1234 -file qr.png -size 128

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCode

func InitCode(config *Config) (*qrcode.QRCode, error)

InitCode returns the qrcode.QRCode based on the configuration.

Types

type Config

type Config struct {
	// The Service Set Identifier (SSID) is the name of the wireless network.
	// It can be contained in the beacons sent out by APs, or it can be ‘hidden’ so that clients
	// who wish to associate must first know the name of the network. Early security guidance was
	// to hide the SSID of your network, but modern networking tools can detect the SSID by simply
	// watching for legitimate client association, as SSIDs are transmitted in cleartext.
	SSID string
	// A pre-shared key (PSK).
	Key string
	// The wireless network encryption protocol (WEP, WPA, WPA2).
	Encryption string
	// Defines if the SSID is ‘hidden’.
	Hidden bool
}

Config is the Wi-Fi network configuration parameters.

func NewConfig

func NewConfig(ssid string, key string, enc string, hidden bool) *Config

NewConfig returns a new Config.

Directories

Path Synopsis
cmd
wifiqr command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL