Chances are you have a Wi-Fi network at home, or live close to one (or more) that tantalizingly pop up in a list whenever you boot up the laptop.
|Null Byte - WonderHowTo|
The problem is, if there's a lock next to the network name (the SSID, or service set identifier), that indicates security is turned on. Without the password or passphrase, you're not going to get access to that network, or the sweet, sweet internet that goes with it.
Perhaps you forgot the password on your own network, or don't have neighbors willing to share the Wi-Fi goodness. You could just go to a café, buy a latte, and use the "free" Wi-Fi there. Download an app for your phone like wifi map (available for iOS and Android), and you'll have a list of over 2 million hotspots with free Wi-Fi for the taking (including some passwords for locked Wi-Fi connections, if they're shared by any of the app's 7 million users).
But there are other ways to get back on the wireless, though some of them require such extreme patience and waiting, that the café idea is going to look pretty good.
Windows Commands to Get the Key
This trick works to recover a Wi-Fi network password (aka network security key) only if you've previously attached to the Wi-Fi in question using that very password. In other words, it only works if you've forgotten a password.
It works because Windows 8 and 10 create a profile of every Wi-Fi network to which you attach. If you tell Windows to forget the network, then it also forgets the password, so this won't work. But most people never explicitly do that.
It requires that you go into a Windows Command Prompt with administrative privileges. To do so, use Cortana to search for "cmd" and the menu will show Command Prompt; right-click that entry and select "Run as administrator." That'll open the black box full of white text with the prompt inside—it's the line with a > at the end, probably something like C:\WINDOWS\system32\>. A blinking cursor will indicate where you type. Start with this:
netsh wlan show profile
The results will bring up a section called User Profiles—those are all the Wi-Fi networks (aka WLANs, or wireless local area networks) you've accessed and saved. Pick the one you want to get the password for, highlight it, and copy it. At the prompt below, type the following, but replace the Xs with the network name you copied; you only need the quotation marks if the network name has spaces in it.
netsh wlan show profile name="XXXXXXXX" key=clear
In the new data that comes up, look under Security Settings for the line "Key Content." The word displayed is the Wi-Fi password/key you are missing.
On macOS, open up the Spotlight search (Cmd+Space) and type terminal to get the Mac equivalent of a command prompt. Type the following, replacing the Xs with the network name.
security find-generic-password -wa XXXXX
for more details - http://in.pcmag.com/networking-1/41050/feature/how-to-hack-wi-fi-passwords