C language to build your own pure ad-free wifi.

Source: Internet
Author: User
Tags strcmp

Directly paste the code. The code is also very simple, what does not have the thread message.

#include <stdio.h>
#include <string.h>
#include <windows.h>

/* #include "stdafx.h"

#pragma COMMENT (linker, "/subsystem:windows/entry:maincrtstartup")
void exit ()
{
MessageBox (NULL, "WiFi is about to exit.") "," WiFi ", 0);
}
*/
void Open ()
{

Char ssid[10],key[16];
Char str1[57]= "netsh wlan set hostednetwork mode=allow ssid=";
Char str2[57]= "netsh wlan set hostednetwork mode=allow key=";

printf ("Build Your Own wifi.\n");
printf ("Enter your own WiFi name:");
scanf ("%s", SSID);
printf ("Enter WiFi password, 8-16 bit:");
scanf ("%s", key);
strcat (STR1,SSID);
System (STR1);
System ("netsh wlan start hostednetwork");
}
void Close ()
{
System ("netsh wlan stop hostednetwork");
System ("Netsh wlan set hostednetwork mode=disallow");
}
void Conceal ()
{
printf ("Not yet fulfilled, please expect." \ n ");
}

int main ()
{
Char i[20];
int n=0,k,flag=1;

printf ("Own WiFi, pure no ads.") \ n ");
printf ("feature option: \ n");
printf ("\t1. Build WiFi. \ n ");
printf ("\t2. Turn off WiFi. \ n ");
printf ("\t3. Hide the interface. \ n ");

do{
printf ("Input:");
scanf ("%s", I);
do{
for (k=0;i[k]!= ' n '; k++);
if (k>=20)
{
printf ("Input more than 20 words, re-enter.") Exit input Exit ");
scanf ("%s", I);
}
Else
Flag = 0;
if (strcmp ("Exit", i) ==0)
{
Exit ();
return 0;
}
}while (flag&&strcmp ("Exit", I));
for (k=0;i[k]!= ' n '; k++);
printf ("%d\n", K);
while (k>0)
{
n = n*10 + i[k-1]-' 0 ';
printf ("%.0f\n", N);
k--;
}
printf ("%.0f\n", N);

Switch (n)
{

Case 1:
Open ();
Break
Case 2:
Close ();
Break
Case 3:
Conceal ();
Break
Default
printf ("Visual only 3 features, what else do you want to do?") \ n ");
printf ("The Year of the Sao" re-enter a chant. \ n ");
n = 0;
}
}while (1);

}

C language to build your own pure ad-free wifi.

Related Article

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.