Hello everyone, this is my first time to write a blog, I am also the end of a freshman, self-taught more than 10 days C #, there is no right to welcome you correct, recently because of the project of the WiFi and IP has been tortured for a long time, later borrowed a SimpleWifi.dll of foreigners And I wrote a ZhuWifi.dll.
Ability to connect to WiFi directly via WiFi name and password in this class I also wrote a function that specifies the IP. Let's see how it's used.
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;//Required References:usingSystem.Diagnostics;usingSystem.ComponentModel;usingSimplewifi;//in the SimpleWifi.dllusingSimplewifi.win32;//in the Simple.dllusingZhuwifi;//in the ZhuWifi.dllnamespacewifidemo{//Special attention//need to put the <requestedexecutionlevel in the right manifest level= "AsInvoker" uiaccess= "false"/>//Change to <requestedexecutionlevel level= "Requireadministrator" uiaccess= "false"/>//This will successfully modify the IP classProgram {Static voidMain (string[] args) { stringWifiname ="Nanyuan"; ; stringWifikey ="QWERTYUIOP"; stringIP ="192.168.1.47"; //instantiation ofWififun s =NewWififun (); Console.readkey (); //For connecting WiFi and assigning IP BOOLflag1=s.connectequipment (Wifiname, Wifikey, IP);
Only used to specify IP
BOOL Flag2 = S.setip (IP); Wifiname ="2014011"; Wifikey="456789FAN"; Console.readkey (); //Onlyused to connect to WiFi BOOLflag3=S.connectcomputer (Wifiname, Wifikey); Console.readkey (); } }}
This is how you can connect to WiFi, if you can add a dictionary will be able to brute force to crack wifi.
Notice that my class library inside the SetIP method is called Dos to modify the IP, you have to write the program code as an administrator to run, this you Baidu on the line
Those two DLL files in my cloud disk, Link: http://pan.baidu.com/s/1o67pmsy
I hope you will like my article in the future
How C # connects to WiFi and specifies IP