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> <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,32 +21,43 @@
<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>
<EapType xmlns="http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1">
<ServerValidation> <ServerValidation>
<DisableUserPromptForServerValidation>false</DisableUserPromptForServerValidation>
<ServerNames>radius.sin.cvut.cz</ServerNames> <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> <TrustedRootCA>d1 eb 23 a4 6d 17 d6 8f d9 25 64 c2 f1 f1 60 17 64 d8 e3 49 </TrustedRootCA>
<DisablePrompt>true</DisablePrompt>
</ServerValidation> </ServerValidation>
<Phase2Authentication> <FastReconnect>true</FastReconnect>
<PAPAuthentication /> <InnerEapOptional>false</InnerEapOptional>
</Phase2Authentication> <Eap xmlns="http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1">
<Phase1Identity> <Type>26</Type>
<IdentityPrivacy>true</IdentityPrivacy> <EapType xmlns="http://www.microsoft.com/provisioning/MsChapV2ConnectionPropertiesV1">
<AnonymousIdentity>anonymous@sin.cvut.cz</AnonymousIdentity> <UseWinLogonCredentials>false</UseWinLogonCredentials>
</Phase1Identity> </EapType>
</EapTtls> </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> </Config>
</EapHostConfig> </EapHostConfig>
</EAPConfig> </EAPConfig>

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 @echo off
set mypath=%~dp0 set mypath=%~dp0
set rights_admin=0
:: Check admin rights :: Check admin rights
NET SESSION >nul 2>&1
NET SESSION >nul 2>&1
IF NOT %ERRORLEVEL% EQU 0 ( IF NOT %ERRORLEVEL% EQU 0 (
echo ############### !! FRIENDLY NOTICE ############## echo ######## ######## ######## ####### ########
echo # Please, run this script as an administrator. # echo ## ## ## ## ## ## ## ## ##
echo # Otherwise, the added Wi-Fi network will # echo ## ## ## ## ## ## ## ## ##
echo # NOT remember your username and password. # echo ###### ######## ######## ## ## ########
echo # # echo ## ## ## ## ## ## ## ## ##
echo # Please close this window, right-click the # echo ## ## ## ## ## ## ## ## ##
echo # sin-setup.bat, and select # echo ######## ## ## ## ## ####### ## ##
echo # Run as administrator. #
echo #################################################
echo. echo.
pause echo.
) ELSE ( echo ####### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED #########
set rights_admin=1 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 :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,45 +52,12 @@ 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
set cmd_user=current netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka.xml"
IF %rights_admin% EQU 1 ( netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka 5G.xml"
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%
echo. echo.
@ -110,17 +65,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 +99,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 +135,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 (