Compare commits

..

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

6 changed files with 128 additions and 232 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>2b 8f 1b 57 33 0d bb a2 d0 7a 6c 51 f7 0e e9 0d da b9 ad 8e </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> <hex>53696E636F6F6C6B61</hex>
<name>Sincoolka</name> <name>Sincoolka</name>
</SSID> </SSID>
<nonBroadcast>false</nonBroadcast>
</SSIDConfig> </SSIDConfig>
<connectionType>ESS</connectionType> <connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode> <connectionMode>auto</connectionMode>
<autoSwitch>false</autoSwitch>
<MSM> <MSM>
<security> <security>
<authEncryption> <authEncryption>
@ -23,35 +21,46 @@
<PMKCacheSize>128</PMKCacheSize> <PMKCacheSize>128</PMKCacheSize>
<preAuthMode>disabled</preAuthMode> <preAuthMode>disabled</preAuthMode>
<OneX xmlns="http://www.microsoft.com/networking/OneX/v1"> <OneX xmlns="http://www.microsoft.com/networking/OneX/v1">
<cacheUserData>true</cacheUserData>
<authMode>user</authMode> <authMode>user</authMode>
<EAPConfig> <EAPConfig>
<EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> <EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapMethod> <EapMethod>
<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">21</Type> <Type xmlns="http://www.microsoft.com/provisioning/EapCommon">25</Type>
<VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId> <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
<VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType> <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">311</AuthorId> <AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</AuthorId>
</EapMethod> </EapMethod>
<Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
<EapTtls <Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
xmlns="http://www.microsoft.com/provisioning/EapTtlsConnectionPropertiesV1"> <Type>25</Type>
<ServerValidation> <EapType xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1">
<ServerNames>radius.sin.cvut.cz</ServerNames> <ServerValidation>
<TrustedRootCAHash>2b 8f 1b 57 33 d bb a2 d0 7a 6c 51 f7 e e9 d da b9 ad 8e </TrustedRootCAHash> <DisableUserPromptForServerValidation>false</DisableUserPromptForServerValidation>
<DisablePrompt>true</DisablePrompt> <ServerNames>radius.sin.cvut.cz</ServerNames>
</ServerValidation> <TrustedRootCA>2b 8f 1b 57 33 0d bb a2 d0 7a 6c 51 f7 0e e9 0d da b9 ad 8e </TrustedRootCA>
<Phase2Authentication> </ServerValidation>
<PAPAuthentication /> <FastReconnect>true</FastReconnect>
</Phase2Authentication> <InnerEapOptional>false</InnerEapOptional>
<Phase1Identity> <Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
<IdentityPrivacy>true</IdentityPrivacy> <Type>26</Type>
<AnonymousIdentity>anonymous@sin.cvut.cz</AnonymousIdentity> <EapType xmlns="http://www.microsoft.com/provisioning/MsChapV2ConnectionPropertiesV1">
</Phase1Identity> <UseWinLogonCredentials>false</UseWinLogonCredentials>
</EapTtls> </EapType>
</Config> </Eap>
</EapHostConfig> <EnableQuarantineChecks>false</EnableQuarantineChecks>
</EAPConfig> <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> </OneX>
</security> </security>
</MSM> </MSM>
@ -59,4 +68,4 @@
<enableRandomization>false</enableRandomization> <enableRandomization>false</enableRandomization>
<randomizationSeed>1813427014</randomizationSeed> <randomizationSeed>1813427014</randomizationSeed>
</MacRandomization> </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

@ -7,15 +7,12 @@ set rights_admin=0
NET SESSION >nul 2>&1 NET SESSION >nul 2>&1
IF NOT %ERRORLEVEL% EQU 0 ( IF NOT %ERRORLEVEL% EQU 0 (
echo ############### !! FRIENDLY NOTICE ############## echo ####### Running as a regular user #########
echo # Please, run this script as an administrator. # echo # The Wi-Fi profiles will be installed #
echo # Otherwise, the added Wi-Fi network will # echo # for the current user. #
echo # NOT remember your username and password. # echo # Run as administrator to install them #
echo # # echo # for all users. #
echo # Please close this window, right-click the # echo ###########################################
echo # sin-setup.bat, and select #
echo # Run as administrator. #
echo #################################################
echo. echo.
pause pause
) ELSE ( ) ELSE (
@ -31,31 +28,17 @@ IF NOT %ERRORLEVEL% EQU 0 (
:main :main
cls cls
ECHO What you want to do now? ECHO What you want to do now?
ECHO 1. Configure Wi-Fi connection - Sincoolka FT (recommended) ECHO 1. Configure Wi-Fi connection
ECHO 2. Configure Wi-Fi connection - Sincoolka (if the FT does not work properly) rem ECHO 2. Configure Wired connection
ECHO 3. Configure Wi-Fi connection - Sincoolka 5G (expert, 5 GHz only) ECHO 3. Print MAC adresses
ECHO. ECHO 4. Exit
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 choice=
set /p choice=Choice: set /p choice=Choice:
if not '%choice%'=='' set choice=%choice:~0,1% if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto setup_wifi_ft if '%choice%'=='1' goto setup_wifi
if '%choice%'=='2' goto setup_wifi rem if '%choice%'=='2' goto setup_eth
if '%choice%'=='3' goto setup_wifi_5g if '%choice%'=='3' goto print_mac
if '%choice%'=='4' goto cleanup_wifi if '%choice%'=='4' EXIT
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 "%choice%" is not valid, try again
ECHO. ECHO.
goto main goto main
@ -64,22 +47,7 @@ goto main
:: Import Sincoolka FT Wi-Fi profile :: Import Sincoolka and Sincoolka 5G 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 :setup_wifi
cls cls
@ -88,21 +56,7 @@ IF %rights_admin% EQU 1 (
set cmd_user=all 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.xml" user=%cmd_user%
netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka 5G.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. echo.
@ -110,17 +64,6 @@ set /p iface="Press Enter to continue . . . "
goto main 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 +98,7 @@ echo.
:setEth :setEth
:: Print all network interfaces :: Print all network interfaces
echo List of Available Interfaces: echo List of Avaliable Interfaces:
echo. echo.
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 PhysicalAdapter=TRUE and NOT Manufacturer like "%%Windows%%"' get Manufacturer,MACAddress,NetConnectionID 2>nul
IF NOT %ERRORLEVEL% EQU 0 ( IF NOT %ERRORLEVEL% EQU 0 (
@ -191,7 +134,7 @@ goto main
:print_mac :print_mac
cls 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 ( IF NOT %ERRORLEVEL% EQU 0 (
getmac /v 2>nul getmac /v 2>nul
IF NOT %ERRORLEVEL% EQU 0 ( IF NOT %ERRORLEVEL% EQU 0 (