自作無線共有ツールC++ソースコード
3596 ワード
// wire.cpp : 。
//
#include
#include <string.h>
using namespace std;
int main()
{
for (;;)
{
cout << "1 ,2 ,3 :";
int n;
cin >> n;
if (n == 1)
system("netsh wlan start hostednetwork");
else if (n == 2)
{
char destination[100] = "netsh wlan set hostednetwork mode=allow ssid= ";
char ssid[100], key[100], keyh[100] = " key=", *k = " ";
cout << " :";
cin >> ssid;
cout << endl;
cout << " :";
cin >> key;
cout << endl;
strcat(destination, ssid);
strcat(destination, keyh);
strcat(destination, key);
system(destination);
system("netsh wlan start hostednetwork");
}
else
system("netsh wlan stop hostednetwork");
}
return 0;
}