I am at my school and the computer I am currently using is connected to a Wi-Fi network. I want to know the Wi-Fi password and I am on a Mac. I know there is a way to do it through Terminal.
What I am using is:
security find-generic-password -ga AirPort
I use that to find the password if it is in a keychain, but I know there is another way to do it. My friend who is a coder told me their is but they said they wont help me. All they told me was "generic" was a hint. I used "generic" in my command but I don't get it.
I tried your answer but it keeps asking my for the admin password. I am connected to the wifi but it still wont work. My coding friend looked at this and said I'm not looking for a AirPort password I'm looking for a regular password.