Get current wifi password

Overview

wifi-password

Get current wifi password

Install

$ npm install wifi-password

Usage

const wifiPassword = require('wifi-password');

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

API

wifiPassword([name])

Returns a promise that resolves to a string containing the password.

name

Type: string

Get the wifi password for a specified known network.

Related

License

MIT © Kevin Mårtensson

Comments
  • Command failed

    Command failed

    I get this error when I execute wifi-password:

    Command failed: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: syntax error: unexpected end of file

    opened by iamskok 15
  • Not able retrivew password.

    Not able retrivew password.

    ○ → wifi-password 
    Your network doesn't have a password
    

    On 14.0.0 Darwin Kernel Version am I missing something?

    Connected to a n/w with WPA2 secured password.

    opened by hemanth 9
  • Return error when doesn't have a password.

    Return error when doesn't have a password.

    When I'm connected on a public wifi and execute the wifi-password, returns:

    Error: Your network doesn't have a password
        at ChildProcess.exithandler (child_process.js:203:12)
        at emitTwo (events.js:87:13)
        at ChildProcess.emit (events.js:172:7)
        at maybeClose (internal/child_process.js:818:16)
        at Socket.<anonymous> (internal/child_process.js:319:11)
        at emitOne (events.js:77:13)
        at Socket.emit (events.js:169:7)
        at Pipe._onclose (net.js:469:12)
    

    I believe this is not a error and it should return to the screen. This is normal behavior.

    What do you think about this? Maybe we can predict the behavior inside the code and sending a report with a better way..

    opened by cauealvesbraz 1
  • Win7 x64 CLI error

    Win7 x64 CLI error

    C:\Program Files\nodejs\node_modules\wifi-password\index.js:43 cb(null, ret); ^ TypeError: undefined is not a function at C:\Program Files\nodejs\node_modules\wifi-password\index.js:43:3 at ChildProcess.exithandler (child_process.js:635:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process.ChildProcess._handle.onexit (child_process.js:810:5)

    opened by syzer 0
  • Windows codepage issues should be documented

    Windows codepage issues should be documented

    The module cannot work on Windows if the Windows is running in some languages, e.g. Chinese.

    The problem is that netsh outputs differently under different codepages. On Chinese Windows, the default codepage is 936. Only after I run chcp 65001 can I get the proper password. Without that, I get an error Error: Could not get password.

    I think it should be documented in README or somewhere.

    opened by ZJUGuoShuai 1
  • Error when SSID contains directory characters

    Error when SSID contains directory characters

    When I try to retrieve the password of the SSID /\/\r.g33l< I get the following error:

    $ wifi-password
    
    Error: Command failed: sudo cat /etc/NetworkManager/system-connections//\/\r.g33l<
    cat: '/etc/NetworkManager/system-connections//\/\r.g33l<': No such file or directory
    
        at Promise.all.then.arr (/usr/lib/node_modules/wifi-password-cli/node_modules/execa/index.js:231:11)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
    

    I originally posted this issue to wifi-password-cli but the concatenation happens in this library

    opened by A1rPun 1
  • Get profile name from SSID in Windows

    Get profile name from SSID in Windows

    SSID and profile name don't always coincide. Users can rename saved WiFi networks to something more convenient to them. This gets the correct string expected by the netsh wlan show profile command.

    opened by akaleeroy 1
  • Error on Windows 10

    Error on Windows 10

    I'm having this error on Windows 10, with node v6.6.0:

    Error: Promise rejected with value: 'Could not get password'
        at C:\Users\Antonio\AppData\Roaming\npm\node_modules\wifi-password-cli\node_modules\loud-rejection\index.js:27:12
        at Array.forEach (native)
        at EventEmitter.<anonymous> (C:\Users\Antonio\AppData\Roaming\npm\node_modules\wifi-password-cli\node_modules\loud-rejection\index.js:23:24)
        at emitTwo (events.js:106:13)
        at EventEmitter.emit (events.js:191:7)
        at emit (C:\Users\Antonio\AppData\Roaming\npm\node_modules\wifi-password-cli\node_modules\signal-exit\index.js:68:11)
        at processEmit [as emit] (C:\Users\Antonio\AppData\Roaming\npm\node_modules\wifi-password-cli\node_modules\signal-exit\index.js:141:5)
    
    opened by roccomuso 2
  • Cannot read property 'indexOf' of undefined

    Cannot read property 'indexOf' of undefined

    I'm using WIndows x64, and Node 4.4.7.

    When I using CLI, is returning fallowing error for me.

    $ wifi-password TypeError: Cannot read property 'indexOf' of undefined at C:\Users\myUser\AppData\Roaming\npm\node_modules\wifi-password\cli.js18:18 at process.tickCallback (node.js369.9)

    opened by lai32290 1
Owner
Kevin Mårtensson
Kevin Mårtensson
Open the GitHub page of the given or current directory repo

gh-home Open the GitHub page of the given or current directory repo It will attempt to open the upstream repo if there is one or the forked repo. Inst

Sindre Sorhus 184 Dec 17, 2022
Get your public IP address - very fast!

public-ip Get your public IP address - very fast! In Node.js, it queries the DNS records of OpenDNS, Google DNS, and HTTPS services to determine your

Sindre Sorhus 962 Dec 25, 2022
Reliably get the terminal window size

term-size Reliably get the terminal window size Because process.stdout.columns doesn't exist when run non-interactively, for example, in a child proce

Sindre Sorhus 132 Oct 11, 2022
Pathokun, a path generator, updates your content just with your frontend by HTTP GET Request!

Pathokun Pathokun, a path generator, update your content just with your frontend by HTTP GET Request! In this way you can make Full-Stack project with

Pathokun 15 Feb 7, 2022
NodeJS built CLI, allows to spell check in 14 languages, get Coleman-Liau Index and build hash Pyramids

Magic CLI ?? ?? NodeJS built CLI, allows to spell check in 14 languages, get Coleman-Liau Index and build hash Pyramids Installing Install dependencie

Lucas 3 Sep 27, 2022
Get username & password from Chrome.

chrome_password Steal Get username & password from Chrome. (Now Only Windows) Try it npx chrome_password Installation npm install -g chrome_password o

迷渡 54 Dec 3, 2022
Get the current local time of a GitHub user.

dev-time-cli Get the current local time of a GitHub user. Install $ npm install --global dev-time-cli Usage $ dev-time --help Usage $ dev-time

Sam Verschueren 176 Jun 29, 2022
This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which is using API's to get and set data

Leaderboard-project This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which

Ravi Teja 5 Feb 11, 2022
Weather app created using vanilla JavaScript and APIs. You can search cities worldwide and get current and forecast weather features.

Weather App Live Demo About the Project Weather app created using vanilla JavaScript and APIs. You can search cities worldwide and get current and for

Lua 22 Dec 28, 2022
node.js auth package (password, facebook, & more) for Connect and Express apps

everyauth Authentication and authorization (password, facebook, & more) for your node.js Connect and Express apps. There is a NodeTuts screencast of e

Brian Noguchi 3.5k Dec 17, 2022
node.js/express module to authenticate users without password

Passwordless Passwordless is a modern node.js module for Express that allows authentication and authorization without passwords by simply sending one-

Florian Heinemann 2k Dec 14, 2022
Boilerplate for a NextJS and Supabase Project. Including full authentication with sign up, login and password recovery.

NextJS x Supabase Boilerplate Getting Started Environment variables Create the enviroment variables with the following command cp .env.local.dist .env

Dominik Amrugiewicz 9 Jun 13, 2022
Low-Budget Password Strength Estimation

_________________________________________________/\/\___________________ _/\/\/\/\/\__/\/\__/\/\____/\/\/\/\__/\/\__/\/\__/\/\________/\/\/\/\___ ____

Dropbox 13.6k Dec 31, 2022
A time-based one-time password (TOTP) generator and authenticator for Gun DB

Entangler A time-based one-time password (TOTP) generator and authenticator for Gun DB Entangler generates a 6 digit passcode every 30 seconds. It gen

Daniel Raeder 16 Nov 9, 2022
A little toy password manager made for a university class

Eddy Passbear's Password Manager A little toy password manager made for a university class. Powered by Remix, Prisma and the air we breathe. Step-by-s

Kacper Seredyn 2 Jan 30, 2022
Generate a password based off user inputs with speed ⚡

speedy-speedy-password Generate a password based off user inputs with speed ⚡ Install NPM npm i speedy-speedy-password Yarn yarn add speedy-speedy-pa

Brayden 5 Feb 2, 2022
Password Generator React App

Deployed App Link Password Generator React App Password Generator This Password Generator application is made using React JS. This application is used

Harsh 0 Apr 1, 2022
A TypeScript library for OPAQUE Asymmetric Password-Authenticated Key Exchange Protocol

opaque-ts This is a Typescript library for the Asymmetric Password-Authenticated Key Exchange (OPAQUE) protocol. Use Available at: @cloudflare/opaque-

Cloudflare 51 Dec 30, 2022
The new modern discord token grabber & stealer, with discord password & token even when it changes (old. PirateStealer)

?? Discord Server - ?? Premium - ?? Builder - ?? Features Authors Stanley Bytixo Autist69420 PirateStealer (by Brooklyn inc) The new modern discord to

Stanley 143 Jan 6, 2023
A password manager extension for Google Chrome.

Password Manager for Chrome NOTE: This project is a prove of concept / sample application for a chromium based web-browser and originated form the you

Samuel Albert 72 Dec 12, 2022