kevva / wifi-password

Get current wifi password
MIT License
617 stars 54 forks source link

Error when SSID contains directory characters #17

Open A1rPun opened 6 years ago

A1rPun commented 6 years ago

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

aflansburg commented 6 years ago

I imagine that those characters would have to be escaped.