суббота, 13 февраля 2016 г.

Get saved wi-fi passwords in Windows with PowerShell script

Powershell script which get a list of all saved wi-fi networks with passwords:

function Get-WifiNetworks {
  $networks = netsh wlan show profiles | where {$_ -match '^.*All User Profile.*$'}
  foreach ($network in $networks) {
    $SSID = $network.split(':')[1].Trim()
    $networkInfo = netsh wlan show profiles key=clear name="$SSID"
    $current = @{}
    $current['SSID']=$SSID
    foreach ($infoString in $networkInfo) {
        if ($infoString -match '^\s+(.*)\s+:\s+(.*)\s*$') {
            $current[$matches[1].trim()] = $matches[2].trim()           
        }
    }
    new-object psobject -property $current
  }
}
Get-WifiNetworks | select SSID, "Key Content", Authentication | Format-Table -Wrap -Autosize

пятница, 12 февраля 2016 г.

Узнать сохраненный пароль от WIFI в Windows 10

В командной строке под Администратором

netsh wlan show profiles

Profiles on interface Wi-Fi:

Group policy profiles (read only)
---------------------------------
    <None>

User profiles
-------------
    All User Profile     : asrc_acess point
    All User Profile     : SWEETINN-AP1

Находим нужную сеть и подставляем его в параметр команды

netsh wlan show profiles key=clear name="asrc_acess point"

Profile asrc_acess point on interface Wi-Fi:
=======================================================================

Applied: All User Profile

Profile information
-------------------
    Version                : 1
    Type                   : Wireless LAN
    Name                   : asrc_acess point
    Control options        :
        Connection mode    : Connect automatically
        Network broadcast  : Connect only if this network is broadcasting
        AutoSwitch         : Do not switch to other networks
        MAC Randomization  : Disabled

Connectivity settings
---------------------
    Number of SSIDs        : 1
    SSID name              : "asrc_acess point"
    Network type           : Infrastructure
    Radio type             : [ Any Radio Type ]
    Vendor extension          : Not present

Security settings
-----------------
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Security key           : Present
    Key Content            : 1243683176383

Cost settings
-------------
    Cost                   : Unrestricted
    Congested              : No
    Approaching Data Limit : No
    Over Data Limit        : No
    Roaming                : No
    Cost Source            : Default

Пароль в строке Key Content