How C # connects to WiFi and specifies IP

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.