Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Error Thrown at Wrong Password #169

Open
ofekkazes opened this issue Aug 21, 2021 · 1 comment
Open

No Error Thrown at Wrong Password #169

ofekkazes opened this issue Aug 21, 2021 · 1 comment

Comments

@ofekkazes
Copy link

Hi,

First, thank you for providing this package, that easily let us communicate with the network adapters on the OS.

Expected Behavior

When using a wrong password using the connect function the function throws an error that tells us the password is incorrect.

Current Behavior

Using the package and under Windows I try to connect to a network using a bad password on "connect" function no error is thrown and the function continues as usual.

Affected features

  • node API

Possible Solution

Though I cannot identify the issue, as I could not set the profile to netsh the issue could be identified after line 68 on ../src/windows-connect.js:

.catch(err => {
      execFile(
        'netsh',
        ['wlan', 'delete', `profile "${ap.ssid}"`],
        { env },
        () => {
          callback && callback(err);
        }
      );
    });

I could not see any related err sent to the callback, just the general err, however it might had not been flagged as an error by the command line.

Context

Your Environment

  • OS: Windows 10 Pro x64
  • node-wifi version: 2.0.15
  • wifi card: Realtek RTL8822BE
@friedrith
Copy link
Owner

I think you pointed the good reason. Windows command line doesn't return an error when the connection failed because of wrong password. I suggest you to test the current connections just after using the function connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants