Compare commits

..

No commits in common. "master" and "v1.1" have entirely different histories.
master ... v1.1

6 changed files with 139 additions and 242 deletions

3
.gitattributes vendored
View File

@ -1,3 +0,0 @@
*.xml text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf

71
Wi-Fi-Sincoolka 5G.xml Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>Sincoolka 5G</name>
<SSIDConfig>
<SSID>
<hex>53696E636F6F6C6B61203547</hex>
<name>Sincoolka 5G</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>WPA2</authentication>
<encryption>AES</encryption>
<useOneX>true</useOneX>
</authEncryption>
<PMKCacheMode>enabled</PMKCacheMode>
<PMKCacheTTL>720</PMKCacheTTL>
<PMKCacheSize>128</PMKCacheSize>
<preAuthMode>disabled</preAuthMode>
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
<authMode>user</authMode>
<EAPConfig>
<EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapMethod>
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">25</Type>
<VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
<VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</AuthorId>
</EapMethod>
<Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
<Type>25</Type>
<EapType xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1">
<ServerValidation>
<DisableUserPromptForServerValidation>false</DisableUserPromptForServerValidation>
<ServerNames>radius.sin.cvut.cz</ServerNames>
<TrustedRootCA>d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 </TrustedRootCA>
</ServerValidation>
<FastReconnect>true</FastReconnect>
<InnerEapOptional>false</InnerEapOptional>
<Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
<Type>26</Type>
<EapType xmlns="http://www.microsoft.com/provisioning/MsChapV2ConnectionPropertiesV1">
<UseWinLogonCredentials>false</UseWinLogonCredentials>
</EapType>
</Eap>
<EnableQuarantineChecks>false</EnableQuarantineChecks>
<RequireCryptoBinding>false</RequireCryptoBinding>
<PeapExtensions>
<PerformServerValidation xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2">true</PerformServerValidation>
<AcceptServerName xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2">true</AcceptServerName>
<PeapExtensionsV2 xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2">
<AllowPromptingWhenServerCANotFound xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV3">true</AllowPromptingWhenServerCANotFound>
</PeapExtensionsV2>
</PeapExtensions>
</EapType>
</Eap>
</Config>
</EapHostConfig>
</EAPConfig>
</OneX>
</security>
</MSM>
<MacRandomization xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
<enableRandomization>false</enableRandomization>
<randomizationSeed>1813427014</randomizationSeed>
</MacRandomization>
</WLANProfile>

View File

@ -6,11 +6,9 @@
<hex>53696E636F6F6C6B61</hex>
<name>Sincoolka</name>
</SSID>
<nonBroadcast>false</nonBroadcast>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<autoSwitch>false</autoSwitch>
<MSM>
<security>
<authEncryption>
@ -23,35 +21,46 @@
<PMKCacheSize>128</PMKCacheSize>
<preAuthMode>disabled</preAuthMode>
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
<cacheUserData>true</cacheUserData>
<authMode>user</authMode>
<EAPConfig>
<EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapMethod>
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">21</Type>
<VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
<VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">311</AuthorId>
</EapMethod>
<Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapTtls
xmlns="http://www.microsoft.com/provisioning/EapTtlsConnectionPropertiesV1">
<ServerValidation>
<ServerNames>radius.sin.cvut.cz</ServerNames>
<TrustedRootCAHash>2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e </TrustedRootCAHash>
<DisablePrompt>true</DisablePrompt>
</ServerValidation>
<Phase2Authentication>
<PAPAuthentication />
</Phase2Authentication>
<Phase1Identity>
<IdentityPrivacy>true</IdentityPrivacy>
<AnonymousIdentity>anonymous@sin.cvut.cz</AnonymousIdentity>
</Phase1Identity>
</EapTtls>
</Config>
</EapHostConfig>
</EAPConfig>
<EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapMethod>
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">25</Type>
<VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
<VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</AuthorId>
</EapMethod>
<Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
<Type>25</Type>
<EapType xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1">
<ServerValidation>
<DisableUserPromptForServerValidation>false</DisableUserPromptForServerValidation>
<ServerNames>radius.sin.cvut.cz</ServerNames>
<TrustedRootCA>d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 </TrustedRootCA>
</ServerValidation>
<FastReconnect>true</FastReconnect>
<InnerEapOptional>false</InnerEapOptional>
<Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
<Type>26</Type>
<EapType xmlns="http://www.microsoft.com/provisioning/MsChapV2ConnectionPropertiesV1">
<UseWinLogonCredentials>false</UseWinLogonCredentials>
</EapType>
</Eap>
<EnableQuarantineChecks>false</EnableQuarantineChecks>
<RequireCryptoBinding>false</RequireCryptoBinding>
<PeapExtensions>
<PerformServerValidation xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2">true</PerformServerValidation>
<AcceptServerName xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2">true</AcceptServerName>
<PeapExtensionsV2 xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2">
<AllowPromptingWhenServerCANotFound xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV3">true</AllowPromptingWhenServerCANotFound>
</PeapExtensionsV2>
</PeapExtensions>
</EapType>
</Eap>
</Config>
</EapHostConfig>
</EAPConfig>
</OneX>
</security>
</MSM>
@ -59,4 +68,4 @@
<enableRandomization>false</enableRandomization>
<randomizationSeed>1813427014</randomizationSeed>
</MacRandomization>
</WLANProfile>
</WLANProfile>

View File

@ -1,62 +0,0 @@
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>Sincoolka 5G</name>
<SSIDConfig>
<SSID>
<hex>53696E636F6F6C6B61203547</hex>
<name>Sincoolka 5G</name>
</SSID>
<nonBroadcast>false</nonBroadcast>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<autoSwitch>false</autoSwitch>
<MSM>
<security>
<authEncryption>
<authentication>WPA2</authentication>
<encryption>AES</encryption>
<useOneX>true</useOneX>
</authEncryption>
<PMKCacheMode>enabled</PMKCacheMode>
<PMKCacheTTL>10</PMKCacheTTL>
<PMKCacheSize>128</PMKCacheSize>
<preAuthMode>disabled</preAuthMode>
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
<cacheUserData>true</cacheUserData>
<authMode>user</authMode>
<EAPConfig>
<EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapMethod>
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">21</Type>
<VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
<VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">311</AuthorId>
</EapMethod>
<Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapTtls
xmlns="http://www.microsoft.com/provisioning/EapTtlsConnectionPropertiesV1">
<ServerValidation>
<ServerNames>radius.sin.cvut.cz</ServerNames>
<TrustedRootCAHash>2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e </TrustedRootCAHash>
<DisablePrompt>true</DisablePrompt>
</ServerValidation>
<Phase2Authentication>
<PAPAuthentication />
</Phase2Authentication>
<Phase1Identity>
<IdentityPrivacy>true</IdentityPrivacy>
<AnonymousIdentity>anonymous@sin.cvut.cz</AnonymousIdentity>
</Phase1Identity>
</EapTtls>
</Config>
</EapHostConfig>
</EAPConfig>
</OneX>
</security>
</MSM>
<MacRandomization xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
<enableRandomization>false</enableRandomization>
<randomizationSeed>1813427014</randomizationSeed>
</MacRandomization>
</WLANProfile>

View File

@ -1,62 +0,0 @@
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>Sincoolka FT</name>
<SSIDConfig>
<SSID>
<hex>53696E636F6F6C6B61204654</hex>
<name>Sincoolka FT</name>
</SSID>
<nonBroadcast>false</nonBroadcast>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<autoSwitch>false</autoSwitch>
<MSM>
<security>
<authEncryption>
<authentication>WPA2</authentication>
<encryption>AES</encryption>
<useOneX>true</useOneX>
</authEncryption>
<PMKCacheMode>enabled</PMKCacheMode>
<PMKCacheTTL>10</PMKCacheTTL>
<PMKCacheSize>128</PMKCacheSize>
<preAuthMode>disabled</preAuthMode>
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
<cacheUserData>true</cacheUserData>
<authMode>user</authMode>
<EAPConfig>
<EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapMethod>
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">21</Type>
<VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
<VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">311</AuthorId>
</EapMethod>
<Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapTtls
xmlns="http://www.microsoft.com/provisioning/EapTtlsConnectionPropertiesV1">
<ServerValidation>
<ServerNames>radius.sin.cvut.cz</ServerNames>
<TrustedRootCAHash>2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e </TrustedRootCAHash>
<DisablePrompt>true</DisablePrompt>
</ServerValidation>
<Phase2Authentication>
<PAPAuthentication />
</Phase2Authentication>
<Phase1Identity>
<IdentityPrivacy>true</IdentityPrivacy>
<AnonymousIdentity>anonymous@sin.cvut.cz</AnonymousIdentity>
</Phase1Identity>
</EapTtls>
</Config>
</EapHostConfig>
</EAPConfig>
</OneX>
</security>
</MSM>
<MacRandomization xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
<enableRandomization>false</enableRandomization>
<randomizationSeed>1813427014</randomizationSeed>
</MacRandomization>
</WLANProfile>

View File

@ -1,25 +1,27 @@
@echo off
set mypath=%~dp0
set rights_admin=0
:: Check admin rights
NET SESSION >nul 2>&1
NET SESSION >nul 2>&1
IF NOT %ERRORLEVEL% EQU 0 (
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 ######## ######## ######## ####### ########
echo ## ## ## ## ## ## ## ## ##
echo ## ## ## ## ## ## ## ## ##
echo ###### ######## ######## ## ## ########
echo ## ## ## ## ## ## ## ## ##
echo ## ## ## ## ## ## ## ## ##
echo ######## ## ## ## ## ####### ## ##
echo.
pause
) ELSE (
set rights_admin=1
echo.
echo ####### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED #########
echo This script must be run as administrator to work properly!
echo If you're seeing this after clicking on a start menu icon, then right click on the shortcut and select "Run As Administrator".
echo ##########################################################
echo.
PAUSE
EXIT /B 1
)
@ -31,31 +33,17 @@ IF NOT %ERRORLEVEL% EQU 0 (
:main
cls
ECHO What you want to do now?
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.
ECHO 1. Configure Wi-Fi connection
rem ECHO 2. Configure Wired connection
ECHO 3. Print MAC adresses
ECHO 4. Exit
set choice=
set /p choice=Choice:
if not '%choice%'=='' set choice=%choice:~0,1%
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
if '%choice%'=='1' goto setup_wifi
rem if '%choice%'=='2' goto setup_eth
if '%choice%'=='3' goto print_mac
if '%choice%'=='4' EXIT
ECHO "%choice%" is not valid, try again
ECHO.
goto main
@ -64,45 +52,12 @@ goto main
:: 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
:: Import Sincoolka and Sincoolka 5G Wi-Fi profile
:setup_wifi
cls
set cmd_user=current
IF %rights_admin% EQU 1 (
set cmd_user=all
)
netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka.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%
netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka.xml"
netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka 5G.xml"
echo.
@ -110,17 +65,6 @@ 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
@ -155,7 +99,7 @@ echo.
:setEth
:: Print all network interfaces
echo List of Available Interfaces:
echo List of Avaliable 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 (
@ -191,7 +135,7 @@ goto main
:print_mac
cls
wmic nic where 'NOT Manufacturer like "%%Microsoft%%" and NOT Manufacturer like "%%Windows%%"' get MACAddress,Caption,NetConnectionID 2>nul
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 (
getmac /v 2>nul
IF NOT %ERRORLEVEL% EQU 0 (