From 387c3dadea0977f7cca51f6f612907a4557d3976 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Sun, 1 Oct 2023 11:36:17 +0200 Subject: [PATCH 1/8] Change CA to USERTrust RSA + light configuration changes --- Wi-Fi-Sincoolka 5G.xml | 11 ++--------- Wi-Fi-Sincoolka.xml | 14 ++++---------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/Wi-Fi-Sincoolka 5G.xml b/Wi-Fi-Sincoolka 5G.xml index cfcdcfc..580d5d4 100644 --- a/Wi-Fi-Sincoolka 5G.xml +++ b/Wi-Fi-Sincoolka 5G.xml @@ -35,9 +35,9 @@ 25 - false + true radius.sin.cvut.cz - d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 + 2b8f1b57330dbba2d07a6c51f70ee90ddab9ad8e true false @@ -49,13 +49,6 @@ false false - - true - true - - true - - diff --git a/Wi-Fi-Sincoolka.xml b/Wi-Fi-Sincoolka.xml index 40032d3..e739e87 100644 --- a/Wi-Fi-Sincoolka.xml +++ b/Wi-Fi-Sincoolka.xml @@ -21,7 +21,8 @@ 128 disabled - user + true + user @@ -35,9 +36,9 @@ 25 - false + true radius.sin.cvut.cz - d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 + 2b8f1b57330dbba2d07a6c51f70ee90ddab9ad8e true false @@ -49,13 +50,6 @@ false false - - true - true - - true - - From dd4ac0790269607ce6ac86a5bc8005e1d8e572b9 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Mon, 30 Sep 2024 21:51:01 +0200 Subject: [PATCH 2/8] Changed CA for Wi-Fi --- Wi-Fi-Sincoolka 5G.xml | 2 +- Wi-Fi-Sincoolka.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Wi-Fi-Sincoolka 5G.xml b/Wi-Fi-Sincoolka 5G.xml index cfcdcfc..7ddcb7e 100644 --- a/Wi-Fi-Sincoolka 5G.xml +++ b/Wi-Fi-Sincoolka 5G.xml @@ -37,7 +37,7 @@ false radius.sin.cvut.cz - d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 + 2b 8f 1b 57 33 0d bb a2 d0 7a 6c 51 f7 0e e9 0d da b9 ad 8e true false diff --git a/Wi-Fi-Sincoolka.xml b/Wi-Fi-Sincoolka.xml index 40032d3..0656bf4 100644 --- a/Wi-Fi-Sincoolka.xml +++ b/Wi-Fi-Sincoolka.xml @@ -37,7 +37,7 @@ false radius.sin.cvut.cz - d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 + 2b 8f 1b 57 33 0d bb a2 d0 7a 6c 51 f7 0e e9 0d da b9 ad 8e true false From 7c0cbc1f35b5286ae1fe95c41431c7d089ede684 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Mon, 7 Oct 2024 22:47:04 +0200 Subject: [PATCH 3/8] Add Sincoolka FT again, change filenames, modify WLAN profile XML files to conform to EAP-TTLS specs --- Wi-Fi-Sincoolka 5G.xml | 71 ------------------------------------------ Wi-Fi-Sincoolka.xml | 69 ++++++++++++++++++---------------------- Wi-Fi-Sincoolka5G.xml | 62 ++++++++++++++++++++++++++++++++++++ Wi-Fi-SincoolkaFT.xml | 62 ++++++++++++++++++++++++++++++++++++ sin-setup.bat | 4 +-- 5 files changed, 156 insertions(+), 112 deletions(-) delete mode 100644 Wi-Fi-Sincoolka 5G.xml create mode 100644 Wi-Fi-Sincoolka5G.xml create mode 100644 Wi-Fi-SincoolkaFT.xml diff --git a/Wi-Fi-Sincoolka 5G.xml b/Wi-Fi-Sincoolka 5G.xml deleted file mode 100644 index 7ddcb7e..0000000 --- a/Wi-Fi-Sincoolka 5G.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - Sincoolka 5G - - - 53696E636F6F6C6B61203547 - Sincoolka 5G - - - ESS - auto - - - - WPA2 - AES - true - - enabled - 720 - 128 - disabled - - user - - - - 25 - 0 - 0 - 0 - - - - 25 - - - false - radius.sin.cvut.cz - 2b 8f 1b 57 33 0d bb a2 d0 7a 6c 51 f7 0e e9 0d da b9 ad 8e - - true - false - - 26 - - false - - - false - false - - true - true - - true - - - - - - - - - - - - false - 1813427014 - - diff --git a/Wi-Fi-Sincoolka.xml b/Wi-Fi-Sincoolka.xml index 0656bf4..4415f18 100644 --- a/Wi-Fi-Sincoolka.xml +++ b/Wi-Fi-Sincoolka.xml @@ -6,9 +6,11 @@ 53696E636F6F6C6B61 Sincoolka + false ESS auto + false @@ -21,46 +23,35 @@ 128 disabled + true user - - - 25 - 0 - 0 - 0 - - - - 25 - - - false - radius.sin.cvut.cz - 2b 8f 1b 57 33 0d bb a2 d0 7a 6c 51 f7 0e e9 0d da b9 ad 8e - - true - false - - 26 - - false - - - false - false - - true - true - - true - - - - - - - + + + 21 + 0 + 0 + 311 + + + + + radius.sin.cvut.cz + 2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e + true + + + + + + true + anonymous@sin.cvut.cz + + + + + @@ -68,4 +59,4 @@ false 1813427014 - + \ No newline at end of file diff --git a/Wi-Fi-Sincoolka5G.xml b/Wi-Fi-Sincoolka5G.xml new file mode 100644 index 0000000..8033972 --- /dev/null +++ b/Wi-Fi-Sincoolka5G.xml @@ -0,0 +1,62 @@ + + + Sincoolka 5G + + + 53696E636F6F6C6B61203547 + Sincoolka 5G + + false + + ESS + auto + false + + + + WPA2 + AES + true + + enabled + 10 + 128 + disabled + + true + user + + + + 21 + 0 + 0 + 311 + + + + + radius.sin.cvut.cz + 2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e + true + + + + + + true + anonymous@sin.cvut.cz + + + + + + + + + + false + 1813427014 + + \ No newline at end of file diff --git a/Wi-Fi-SincoolkaFT.xml b/Wi-Fi-SincoolkaFT.xml new file mode 100644 index 0000000..c51926c --- /dev/null +++ b/Wi-Fi-SincoolkaFT.xml @@ -0,0 +1,62 @@ + + + Sincoolka FT + + + 53696E636F6F6C6B61204654 + Sincoolka FT + + false + + ESS + auto + false + + + + WPA2 + AES + true + + enabled + 10 + 128 + disabled + + true + user + + + + 21 + 0 + 0 + 311 + + + + + radius.sin.cvut.cz + 2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e + true + + + + + + true + anonymous@sin.cvut.cz + + + + + + + + + + false + 1813427014 + + \ No newline at end of file diff --git a/sin-setup.bat b/sin-setup.bat index 1d7f8b8..c955679 100644 --- a/sin-setup.bat +++ b/sin-setup.bat @@ -47,7 +47,7 @@ goto main -:: Import Sincoolka and Sincoolka 5G Wi-Fi profile +:: Import Sincoolka and Sincoolka FT Wi-Fi profile :setup_wifi cls @@ -56,7 +56,7 @@ IF %rights_admin% EQU 1 ( set cmd_user=all ) netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka.xml" user=%cmd_user% -netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka 5G.xml" user=%cmd_user% +netsh wlan add profile "filename=%mypath%Wi-Fi-SincoolkaFT.xml" user=%cmd_user% echo. From 081e8c5d4856e7e5f30d17b4b629f4a6f2486d7f Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Mon, 7 Oct 2024 22:49:28 +0200 Subject: [PATCH 4/8] Change the "admin needed" warning --- sin-setup.bat | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sin-setup.bat b/sin-setup.bat index c955679..7e33e13 100644 --- a/sin-setup.bat +++ b/sin-setup.bat @@ -7,12 +7,15 @@ set rights_admin=0 NET SESSION >nul 2>&1 IF NOT %ERRORLEVEL% EQU 0 ( - echo ####### Running as a regular user ######### - echo # The Wi-Fi profiles will be installed # - echo # for the current user. # - echo # Run as administrator to install them # - echo # for all users. # - echo ########################################### + echo ############### !! FRIENDLY NOTICE ############## + echo # Please, run this script as an administrator. # + echo # Otherwise, the added Wi-Fi network will # + echo # NOT remember your username and password. # + echo # # + echo # Please close this window, right-click the # + echo # sin-setup.bat, and select # + echo # Run as administrator. # + echo ################################################# echo. pause ) ELSE ( From 6e9bd3f3e077c9673a24e0c7cc07a2b3fc4acc31 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Mon, 7 Oct 2024 22:59:22 +0200 Subject: [PATCH 5/8] Split Wi-Fi configs into FT, normal and 5G, add cleanup option --- sin-setup.bat | 74 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/sin-setup.bat b/sin-setup.bat index 7e33e13..43b11a4 100644 --- a/sin-setup.bat +++ b/sin-setup.bat @@ -31,17 +31,31 @@ IF NOT %ERRORLEVEL% EQU 0 ( :main cls ECHO What you want to do now? -ECHO 1. Configure Wi-Fi connection -rem ECHO 2. Configure Wired connection -ECHO 3. Print MAC adresses -ECHO 4. Exit +ECHO 1. Configure Wi-Fi connection - Sincoolka FT (recommended) +ECHO 2. Configure Wi-Fi connection - Sincoolka (if the FT does not work properly) +ECHO 3. Configure Wi-Fi connection - Sincoolka 5G (expert, 5 GHz only) +ECHO. +ECHO 4. Remove all Sincoolka profiles +ECHO. +IF %rights_admin% EQU 1 ( +ECHO 5. Configure wired connection for 802.1X +ECHO. +) +ECHO 9. Print MAC adresses +ECHO 0. Exit +ECHO. set choice= set /p choice=Choice: if not '%choice%'=='' set choice=%choice:~0,1% -if '%choice%'=='1' goto setup_wifi -rem if '%choice%'=='2' goto setup_eth -if '%choice%'=='3' goto print_mac -if '%choice%'=='4' EXIT +if '%choice%'=='1' goto setup_wifi_ft +if '%choice%'=='2' goto setup_wifi +if '%choice%'=='3' goto setup_wifi_5g +if '%choice%'=='4' goto cleanup_wifi +IF %rights_admin% EQU 1 ( + if '%choice%'=='5' goto setup_eth +) +if '%choice%'=='9' goto print_mac +if '%choice%'=='0' EXIT ECHO "%choice%" is not valid, try again ECHO. goto main @@ -50,7 +64,22 @@ goto main -:: Import Sincoolka and Sincoolka FT Wi-Fi profile +:: Import Sincoolka FT Wi-Fi profile + +:setup_wifi_ft +cls +set cmd_user=current +IF %rights_admin% EQU 1 ( + set cmd_user=all +) +netsh wlan add profile "filename=%mypath%Wi-Fi-SincoolkaFT.xml" user=%cmd_user% + +echo. + +set /p iface="Press Enter to continue . . . " +goto main + +:: Import Sincoolka Wi-Fi profile :setup_wifi cls @@ -59,7 +88,21 @@ IF %rights_admin% EQU 1 ( set cmd_user=all ) netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka.xml" user=%cmd_user% -netsh wlan add profile "filename=%mypath%Wi-Fi-SincoolkaFT.xml" user=%cmd_user% + +echo. + +set /p iface="Press Enter to continue . . . " +goto main + +:: Import Sincoolka 5G Wi-Fi profile + +:setup_wifi_5g +cls +set cmd_user=current +IF %rights_admin% EQU 1 ( + set cmd_user=all +) +netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka5G.xml" user=%cmd_user% echo. @@ -67,6 +110,17 @@ set /p iface="Press Enter to continue . . . " goto main +:cleanup_wifi +cls +:: Cleanup all our Wi-Fi profiles +netsh wlan delete profile name="Sincoolka" i=* +netsh wlan delete profile name="Sincoolka FT" i=* +netsh wlan delete profile name="Sincoolka 5G" i=* + +echo. + +set /p iface="Press Enter to continue . . . " +goto main From 7e112b055200292745199214fb47df8a82ffacd4 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Mon, 7 Oct 2024 23:07:35 +0200 Subject: [PATCH 6/8] Fixing "get MAC address" to include wireless interfaces With Wi-Fi adapters, they often do not show as physical adapters, hence that needs to be turned off. Instead, I add a caption to better identify Wi-Fi and Gigabit Ethernet. --- sin-setup.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sin-setup.bat b/sin-setup.bat index 43b11a4..d081c34 100644 --- a/sin-setup.bat +++ b/sin-setup.bat @@ -191,7 +191,7 @@ goto main :print_mac cls -wmic nic where 'NOT Manufacturer like "%%Microsoft%%" and PhysicalAdapter=TRUE and NOT Manufacturer like "%%Windows%%"' get Manufacturer,MACAddress,NetConnectionID 2>nul +wmic nic where 'NOT Manufacturer like "%%Microsoft%%" and NOT Manufacturer like "%%Windows%%"' get MACAddress,Caption,NetConnectionID 2>nul IF NOT %ERRORLEVEL% EQU 0 ( getmac /v 2>nul IF NOT %ERRORLEVEL% EQU 0 ( From a192f78dce06962c0ca6fb2d3dd7b1308d1719b8 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Tue, 8 Oct 2024 01:13:58 +0200 Subject: [PATCH 7/8] Fix typo in Ethernet --- sin-setup.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sin-setup.bat b/sin-setup.bat index d081c34..0d4a6a6 100644 --- a/sin-setup.bat +++ b/sin-setup.bat @@ -155,7 +155,7 @@ echo. :setEth :: Print all network interfaces -echo List of Avaliable Interfaces: +echo List of Available Interfaces: echo. wmic nic where 'NOT Manufacturer like "%%Microsoft%%" and PhysicalAdapter=TRUE and NOT Manufacturer like "%%Windows%%"' get Manufacturer,MACAddress,NetConnectionID 2>nul IF NOT %ERRORLEVEL% EQU 0 ( From c0d3fe88be7807a380553107118b321590c7b468 Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Tue, 8 Oct 2024 01:33:52 +0200 Subject: [PATCH 8/8] Set CRLF for XML, CMD and BAT files --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..502eaca --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.xml text eol=crlf +*.bat text eol=crlf +*.cmd text eol=crlf