12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ShareWifi.Utils.Net
- {
- class WifiUtils
- {
- /// <summary>
- /// 获取WIFI SSID
- /// </summary>
- /// <returns></returns>
- public static string getSSID()
- {
- string v = Shell.RunCmd("netsh wlan show interfaces | findstr SSID");
- return v;
- }
- /// <summary>
- /// 根据SSID获取密码
- /// </summary>
- /// <param name="ssid">SSID</param>
- /// <returns></returns>
- public static string getSSDIPassword(string ssid)
- {
- string v = Shell.RunCmd("netsh wlan show profile name=" + ssid + " key=clear | findstr Key");
- return v;
- }
- }
- }
|