What that script do is basically finding a password that is already stored in your PC. Script can find the password to WiFi only, if you have been connected to it earlier.