0x0XDev / JamWiFi

A GUI, easy to use WiFi network jammer for Mac OS X
413 stars 49 forks source link

Prompt for admin privileges #12

Closed acheong08 closed 4 years ago

acheong08 commented 4 years ago

I am working on a project for MacOS (not on GitHub) but can't figure out how to prompt for admin privileges.

acheong08 commented 4 years ago

Is there a one-liner to prompt for these privileges?

GGAALL98 commented 4 years ago

sudo

anonymouz4 commented 4 years ago

You can’t elevate an existing process without kext, but you can relaunch your own process with extended privileges via AuthorizationExecuteWithPrivileges, but it’s deprecated and Apple advices for PrivilegedHelper instead. This project is open-source anyway, so I don’t really get your question.