diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2abb40b --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/HostedNetwork/Hostednetwork.dev +/HostedNetwork/Hostednetwork.layout +/HostedNetwork/hostednetwork_private.h +/HostedNetwork/Hostednetwork_private.rc +/HostedNetwork/Hostednetwork_private.res diff --git a/HostedNetwork/Hostednetwork.cpp b/HostedNetwork/Hostednetwork.cpp new file mode 100644 index 0000000..828baca --- /dev/null +++ b/HostedNetwork/Hostednetwork.cpp @@ -0,0 +1,63 @@ +#include +#include +#include +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; +} diff --git a/HostedNetwork/Hostednetwork.ico b/HostedNetwork/Hostednetwork.ico new file mode 100644 index 0000000..283fe4e Binary files /dev/null and b/HostedNetwork/Hostednetwork.ico differ