npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sharewifi

v0.1.8

Published

Quickly share Wi-Fi connection info on macOS and Windows.

Downloads

5

Readme

Share Wi-Fi Connection Info

Quickly share Wi-Fi passwords and connection details. Generates QR codes that auto-configure iOS and Android devices. Compatible with macOS and Windows.

Usage

sharewifi 0.1.6
Quickly share Wi-Fi passwords and connection details

USAGE:
    sharewifi [FLAGS] [OPTIONS]

FLAGS:
    -a, --always-allow    Disables future confirmation prompts to access this password. Sudo required
    -h, --help            Prints help information
    -q, --qrcode          Prints Wi-Fi Network config QR Code for Android and iOS 11+
    -V, --version         Prints version information
    -v, --verbose         Verbose output

OPTIONS:
    -s, --ssid <ssid>    Specify an SSID.  Defaults to currently connected Wi-Fi

screenshot

Note: There is no confirmation prompt required to access the Wi-Fi info on Windows, hence the always-allow flag is omitted.

Google Lens displaying QR Code details along with button to join network with single tap:

google lens

Installing

npm

npm i sharewifi -g

macOS using Homebew

The easiest way to install sharewifi is by using Homebrew.

brew tap bradyjoslin/sharewifi
brew install sharewifi

Building and Installing From Source

Building and installing requires Rust. To build, clone the repository and then:

cargo build

To run the debug build:

cargo run

To create a release build:

cargo build --release

To install:

cargo install --path .

Espanso Integration

Espanso is a free cross-platform text expander written in Rust. The sharewifi espanso package makes sharewifi available via text expansion outside of the command line, including qr code rendering in plain text editors.

sharewifi

Behind the Scenes

macOS

Uses two built-in macOS CLI utilities to function under the hood. airport gets information on currently connected Wi-Fi, security is used to obtain password. Running security provides a login prompt to access keychain, as authentication is required in order to obtain the password.

Default macOS airport utility location:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport.

Sample usage to obtain SSID:

> airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'

Guest WiFi

Uses security utility to obtain password associated with SSID (details).

> security find-generic-password \
-D 'AirPort network password' \
-ga "Guest WiFi" \
2>&1 >/dev/null

password: "HelloFriends!"

The always-allow option is implemented by updating the System keychain record for that SSID so that security is always allowed access to the password. This requires sudo and should only be done for Wi-Fi passwords not considered secret, as will allow this app and others to read the password without credentials.

sudo security add-generic-password -U -a <ssid> -D "AirPort network password" -T "/usr/bin/security" -s "AirPort"  /Library/Keychains/System.keychain

keychain

Windows

Uses this command to get the currently connected Wi-Fi profile and the SSID will be included in the output:

> netsh wlan show interface

There is 1 interface on the system:

    Name                   : Wi-Fi
    Description            : 802.11n USB Wireless LAN Card
    GUID                   : c1ddfc4d-4b98-4acc-9d84-4f5f845ffb04
    Physical address       : 00:0f:50:01:15:5f
    State                  : connected
    SSID                   : Guest Wi-Fi
    BSSID                  : 21:62:ef:f1:c2:5c
    Network type           : Infrastructure
    Radio type             : 802.11n
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Connection mode        : Profile
    Channel                : 1
    Receive rate (Mbps)    : 600
    Transmit rate (Mbps)   : 72
    Signal                 : 100%
    Profile                : Guest Wi-Fi

    Hosted network status  : Not available

Then, gets the password for a specific SSID with this command - the key=clear option provides the Key Content value in the output, which is the Wi-Fi password:

> netsh wlan show profiles name=myssid key=clear

Profile Guest Wi-Fi on interface Wi-Fi:
=======================================================================

Applied: All User Profile

Profile information
-------------------
    Version                : 1
    Type                   : Wireless LAN
    Name                   : Guest Wi-Fi
    Control options        :
        Connection mode    : Connect manually
        Network broadcast  : Connect only if this network is broadcasting
        AutoSwitch         : Do not switch to other networks
        MAC Randomization  : Disabled

Connectivity settings
---------------------
    Number of SSIDs        : 1
    SSID name              : "Guest Wi-Fi"
    Network type           : Infrastructure
    Radio type             : [ Any Radio Type ]
    Vendor extension          : Not present

Security settings
-----------------
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Authentication         : WPA2-Personal
    Cipher                 : GCMP
    Security key           : Present
    Key Content            : HelloFriends!

Cost settings
-------------
    Cost                   : Unrestricted
    Congested              : No
    Approaching Data Limit : No
    Over Data Limit        : No
    Roaming                : No
    Cost Source            : Default

References

QR Code format described in ZXing docs.

Project inspired by rauchg/wifi-password and RReverser/WiFi-Password.