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

[Feat]: Get empty BSSID string in macOS Monterey (> 12.1) #180

Open
pf895929 opened this issue Mar 28, 2022 · 2 comments
Open

[Feat]: Get empty BSSID string in macOS Monterey (> 12.1) #180

pf895929 opened this issue Mar 28, 2022 · 2 comments

Comments

@pf895929
Copy link

Is your feature request related to a problem? Please describe.

I have an issue when trying to get the BSSID from getCurrentConnection. As a new Apple security update since macOS Monterey 12.1, we are not able to get the BSSID from /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport without sudo.

Describe the solution you'd like

Add a flag when running getCurrentConnection to use under sudo. If the app has right privileges, shall return the BSSID; otherwise will thrown an error that needs upper privileges while using it with the sudo flag.

Describe alternatives you've considered

There is no other way to get the BSSID without sudo.

Teachability, Documentation, Adoption, Migration Strategy

No response

@pf895929 pf895929 changed the title [Bug]: Get empty BSSID string in macOS Monterey (> 12.1) [Feat]: Get empty BSSID string in macOS Monterey (> 12.1) Mar 28, 2022
@wobsoriano
Copy link

wobsoriano commented Apr 3, 2022

Mac and BSSID will not return without sudo privileges now.

My proposal is to let the users update their sudoers file or better add a file inside sudoers.d.

> sudo visudo -f /private/etc/sudoers.d/airplane

and add this to that airplane file.

yourusername ALL=(ALL:ALL) NOPASSWD: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

Also, update the commands to

const command = () => ({
  cmd: 'sudo',
  args: ['/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport', '--scan']
});

More info on sudoers https://osxdaily.com/2014/02/06/add-user-sudoers-file-mac/

@keypuncherlabs
Copy link

Any updates on this? Seems like a very useful feature to have this implemented or fixed.

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

No branches or pull requests

3 participants