Added HostedNetwork project
Added HostedNetwork project and .gitignore to match the project.
This commit is contained in:
parent
6f59a9689f
commit
8b7a3aea44
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/HostedNetwork/Hostednetwork.dev
|
||||
/HostedNetwork/Hostednetwork.layout
|
||||
/HostedNetwork/hostednetwork_private.h
|
||||
/HostedNetwork/Hostednetwork_private.rc
|
||||
/HostedNetwork/Hostednetwork_private.res
|
63
HostedNetwork/Hostednetwork.cpp
Normal file
63
HostedNetwork/Hostednetwork.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
#include <Windows.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int action[2];
|
||||
bool exit = false;
|
||||
string ssid, password;
|
||||
|
||||
do
|
||||
{
|
||||
system("cls");
|
||||
cout << "1 - Change hostednetwork settings" << endl;
|
||||
cout << "2 - Start hostednetwork" << endl;
|
||||
cout << "3 - Check hostednetwork state" << endl;
|
||||
cout << "4 - Stop hostednetwork" << endl;
|
||||
cout << "5 - Exit" << endl;
|
||||
cout << endl << "admin@hostednetwork:~$";
|
||||
cin >> action[0];
|
||||
switch(action[0])
|
||||
{
|
||||
case 1: system("cls");
|
||||
cout << "1 - BJP Wi-Fi" << endl;
|
||||
cout << "2 - Free Wi-Fi" << endl;
|
||||
cout << "3 - Manually insert only for this time" << endl;
|
||||
cout << "4 - Go back" << endl;
|
||||
cout << endl << "admin@hostednetwork:~$";
|
||||
cin >> action[1];
|
||||
switch(action[1])
|
||||
{
|
||||
case 1: system("netsh wlan set hostednetwork mode=allow ssid=\"BJP Wi-Fi\" key=BJPR3t3W1f1 keyusage=persistent");
|
||||
Sleep(3000);
|
||||
break;
|
||||
case 2: system("netsh wlan set hostednetwork mode=allow ssid=\"Free Wi-fi (pass:12345678)\" key=12345678 keyusage=persistent");
|
||||
Sleep(3000);
|
||||
break;
|
||||
case 3: cout << "Insert SSID: ";
|
||||
cin >> ssid;
|
||||
cout << "Insert password: ";
|
||||
cin >> password;
|
||||
system(("netsh wlan set hostednetwork mode=allow ssid=" + ssid + " key=" + password + " keyusage=persistent").c_str());
|
||||
Sleep(3000);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
case 2: system("netsh wlan start hostednetwork");
|
||||
Sleep(3000);
|
||||
break;
|
||||
case 3: system("netsh wlan show hostednetwork");
|
||||
cout << "Premi qualsiasi tasto per continuare ";
|
||||
system("pause > nul");
|
||||
break;
|
||||
case 4: system("netsh wlan stop hostednetwork");
|
||||
Sleep(3000);
|
||||
break;
|
||||
default: exit=true; break;
|
||||
}
|
||||
} while (!exit);
|
||||
return 0;
|
||||
}
|
BIN
HostedNetwork/Hostednetwork.ico
Normal file
BIN
HostedNetwork/Hostednetwork.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user