Wifi-password

wifi-password

Get current wifi password.

Do you remember your wifi password?

Do you want share it with your guests?

wifi-password is the util to use works across OSs.

Basically fires the below commands based on the OS for the given or connected SSID:

  • GNU/Linux -> sudo cat /etc/NetworkManager/system-connections/${ssid};

  • OSX -> security find-generic-password -D AirPort network password -wa ssid

  • Windows -> netsh wlan show profile $(name=${ssid}) $(key=clear)

GET IT:

npm install --save wifi-password for API

1
2
3
4
5
6
const wifiPassword = require('wifi-password');

wifiPassword().then(password => {
    console.log(password);
    //=> 'johndoesecretpassword'
});

npm install --global wifi-password for CLI.

1
2
3
4
5
6
7
8
$ wifi-password --help

  Usage
    $ wifi-password
    johndoesecretpassword

    $ wifi-password foo-network
    foosecretpassword

GIF FTW!

wifi-password

Suggest a module

Comments