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

Cannot read SSID password if there's a space between the SSID's name #11

Closed
ghost opened this issue Jan 27, 2021 · 5 comments
Closed

Cannot read SSID password if there's a space between the SSID's name #11

ghost opened this issue Jan 27, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jan 27, 2021

If I run sudo wifi-password I get

ERROR: Could not find password

This is because my AP's name has a space inside (e.g: John DoeWifi)

If I create a new AP and name it JohnDoeWifi, I successfully get the result

password123

The program doesn't take into consideration that there may be an SSID with space inside the name. Only SSIDs with no space are read.

@sdushantha sdushantha added the bug Something isn't working label Jan 28, 2021
@sdushantha
Copy link
Owner

Hi @Engineer22,

Thank you for bringing up this bug.

On line 65 if you replace that line with the code below, does it fix the issue?

        password = run_command(f"cat '/etc/NetworkManager/system-connections/{ssid}.nmconnection' | grep psk=")

@ghost
Copy link
Author

ghost commented Jan 28, 2021

Hello @sdushantha,

I will test in couple hours and get back to you. Thank you.

@barak
Copy link

barak commented Jan 28, 2021

I had the same problem and your line 65 patch (adding 's) fixed it.

@theRealStyro
Copy link

I think it would be a good idea to add this to the main branch

@ghost
Copy link
Author

ghost commented Jan 28, 2021

Fixed.

@ghost ghost closed this as completed Jan 28, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants