mirror of
https://github.com/Wind4/vlmcsd.git
synced 2025-07-03 09:17:57 +08:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
cd488aeb85 | |||
28a50f7bba | |||
550df56794 | |||
5a29226593 | |||
c5e1a0a591 | |||
af593fc11b |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "debian"]
|
||||||
|
path = debian
|
||||||
|
url = https://github.com/Wind4/vlmcsd-debian.git
|
@ -198,6 +198,7 @@ help:
|
|||||||
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(BASE_PROGRAM_NAME)."
|
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(BASE_PROGRAM_NAME)."
|
||||||
@echo " -DSIMPLE_SOCKETS Compile $(BASE_PROGRAM_NAME) with basic socket support only. Removes -L option."
|
@echo " -DSIMPLE_SOCKETS Compile $(BASE_PROGRAM_NAME) with basic socket support only. Removes -L option."
|
||||||
@echo " -DSIMPLE_RPC Don't support RPC with NDR64 and BTFN in $(BASE_PROGRAM_NAME) (but do in $(BASE_CLIENT_NAME)). Makes emulator detection easy."
|
@echo " -DSIMPLE_RPC Don't support RPC with NDR64 and BTFN in $(BASE_PROGRAM_NAME) (but do in $(BASE_CLIENT_NAME)). Makes emulator detection easy."
|
||||||
|
@echo " -DNO_TAP Compile $(BASE_PROGRAM_NAME) without VPN support (Windows and Cygwin only)."
|
||||||
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(BASE_PROGRAM_NAME)."
|
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(BASE_PROGRAM_NAME)."
|
||||||
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(BASE_PROGRAM_NAME)."
|
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(BASE_PROGRAM_NAME)."
|
||||||
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(BASE_PROGRAM_NAME)."
|
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(BASE_PROGRAM_NAME)."
|
||||||
|
10
VisualStudio/vlmcsd/vlmcsd.vcxproj
Executable file → Normal file
10
VisualStudio/vlmcsd/vlmcsd.vcxproj
Executable file → Normal file
@ -29,7 +29,7 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
@ -137,13 +137,14 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions);_CRYPTO_WINDOWS;_PEDANTIC</PreprocessorDefinitions>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
<DisableSpecificWarnings>4201;4200;4214;4706</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@ -306,9 +307,11 @@
|
|||||||
<ClInclude Include="..\..\src\output.h" />
|
<ClInclude Include="..\..\src\output.h" />
|
||||||
<ClInclude Include="..\..\src\rpc.h" />
|
<ClInclude Include="..\..\src\rpc.h" />
|
||||||
<ClInclude Include="..\..\src\shared_globals.h" />
|
<ClInclude Include="..\..\src\shared_globals.h" />
|
||||||
|
<ClInclude Include="..\..\src\tap-windows.h" />
|
||||||
<ClInclude Include="..\..\src\types.h" />
|
<ClInclude Include="..\..\src\types.h" />
|
||||||
<ClInclude Include="..\..\src\vlmcsd.h" />
|
<ClInclude Include="..\..\src\vlmcsd.h" />
|
||||||
<ClInclude Include="..\..\src\wingetopt.h" />
|
<ClInclude Include="..\..\src\wingetopt.h" />
|
||||||
|
<ClInclude Include="..\..\src\wintap.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\src\crypto.c" />
|
<ClCompile Include="..\..\src\crypto.c" />
|
||||||
@ -324,6 +327,7 @@
|
|||||||
<ClCompile Include="..\..\src\shared_globals.c" />
|
<ClCompile Include="..\..\src\shared_globals.c" />
|
||||||
<ClCompile Include="..\..\src\vlmcsd.c" />
|
<ClCompile Include="..\..\src\vlmcsd.c" />
|
||||||
<ClCompile Include="..\..\src\wingetopt.c" />
|
<ClCompile Include="..\..\src\wingetopt.c" />
|
||||||
|
<ClCompile Include="..\..\src\wintap.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
9
VisualStudio/vlmcsd/vlmcsd.vcxproj.filters
Executable file → Normal file
9
VisualStudio/vlmcsd/vlmcsd.vcxproj.filters
Executable file → Normal file
@ -63,6 +63,12 @@
|
|||||||
<ClInclude Include="..\..\src\kmsdata.h">
|
<ClInclude Include="..\..\src\kmsdata.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\tap-windows.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\wintap.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\src\crypto.c">
|
<ClCompile Include="..\..\src\crypto.c">
|
||||||
@ -104,5 +110,8 @@
|
|||||||
<ClCompile Include="..\..\src\kmsdata.c">
|
<ClCompile Include="..\..\src\kmsdata.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\wintap.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
3
VisualStudio/vlmcsdmulti/vlmcsdmulti.vcxproj
Executable file → Normal file
3
VisualStudio/vlmcsdmulti/vlmcsdmulti.vcxproj
Executable file → Normal file
@ -292,6 +292,7 @@
|
|||||||
<ClCompile Include="..\..\src\vlmcsd.c" />
|
<ClCompile Include="..\..\src\vlmcsd.c" />
|
||||||
<ClCompile Include="..\..\src\vlmcsdmulti.c" />
|
<ClCompile Include="..\..\src\vlmcsdmulti.c" />
|
||||||
<ClCompile Include="..\..\src\wingetopt.c" />
|
<ClCompile Include="..\..\src\wingetopt.c" />
|
||||||
|
<ClCompile Include="..\..\src\wintap.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\src\config.h" />
|
<ClInclude Include="..\..\src\config.h" />
|
||||||
@ -307,10 +308,12 @@
|
|||||||
<ClInclude Include="..\..\src\output.h" />
|
<ClInclude Include="..\..\src\output.h" />
|
||||||
<ClInclude Include="..\..\src\rpc.h" />
|
<ClInclude Include="..\..\src\rpc.h" />
|
||||||
<ClInclude Include="..\..\src\shared_globals.h" />
|
<ClInclude Include="..\..\src\shared_globals.h" />
|
||||||
|
<ClInclude Include="..\..\src\tap-windows.h" />
|
||||||
<ClInclude Include="..\..\src\types.h" />
|
<ClInclude Include="..\..\src\types.h" />
|
||||||
<ClInclude Include="..\..\src\vlmcs.h" />
|
<ClInclude Include="..\..\src\vlmcs.h" />
|
||||||
<ClInclude Include="..\..\src\vlmcsd.h" />
|
<ClInclude Include="..\..\src\vlmcsd.h" />
|
||||||
<ClInclude Include="..\..\src\wingetopt.h" />
|
<ClInclude Include="..\..\src\wingetopt.h" />
|
||||||
|
<ClInclude Include="..\..\src\wintap.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
9
VisualStudio/vlmcsdmulti/vlmcsdmulti.vcxproj.filters
Executable file → Normal file
9
VisualStudio/vlmcsdmulti/vlmcsdmulti.vcxproj.filters
Executable file → Normal file
@ -63,6 +63,9 @@
|
|||||||
<ClCompile Include="..\..\src\kmsdata-full.c">
|
<ClCompile Include="..\..\src\kmsdata-full.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\wintap.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\src\config.h">
|
<ClInclude Include="..\..\src\config.h">
|
||||||
@ -116,5 +119,11 @@
|
|||||||
<ClInclude Include="..\..\src\kmsdata.h">
|
<ClInclude Include="..\..\src\kmsdata.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\tap-windows.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\wintap.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
1
debian
Submodule
1
debian
Submodule
Submodule debian added at 8b03b141ee
276
etc/vlmcsd.ini
276
etc/vlmcsd.ini
@ -1,127 +1,149 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Sample vlmcsd.ini
|
# Sample vlmcsd.ini
|
||||||
#
|
#
|
||||||
# An ini file for vlmcsd is normally not required. It is for advanced users only.
|
# An ini file for vlmcsd is normally not required. It is for advanced users only.
|
||||||
# vlmcsd uses an ini file only if specified using the -i option in the command line parameters.
|
# vlmcsd uses an ini file only if specified using the -i option in the command line parameters.
|
||||||
# There is no default ini file because vlmcsd is designed to run on many platforms.
|
# There is no default ini file because vlmcsd is designed to run on many platforms.
|
||||||
#
|
#
|
||||||
# Every line starting with a number sign (#) or semicolon (;) is treated as a comment.
|
# Every line starting with a number sign (#) or semicolon (;) is treated as a comment.
|
||||||
# If a key word is used more than once, the last occurrence is used. The only exception
|
# If a key word is used more than once, the last occurrence is used. The only exception
|
||||||
# to this is Listen. You can use Listen=<ip address>[:port] more than once.
|
# to this is Listen. You can use Listen=<ip address>[:port] more than once.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Set ePID/HwId for Windows explicitly
|
# Set ePID/HwId for Windows explicitly
|
||||||
;Windows = 06401-00206-471-111111-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
|
;Windows = 06401-00206-471-111111-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
|
||||||
|
|
||||||
# Set ePID for Office 2010 (including Visio and Project) explicitly
|
# Set ePID for Office 2010 (including Visio and Project) explicitly
|
||||||
;Office2010 = 06401-00096-199-222222-03-1033-9600.0000-3622014
|
;Office2010 = 06401-00096-199-222222-03-1033-17763.0000-2822018
|
||||||
|
|
||||||
# Set ePID/HwId for Office 2013 (including Visio and Project) explicitly
|
# Set ePID/HwId for Office 2013 (including Visio and Project) explicitly
|
||||||
;Office2013 = 06401-00206-234-333333-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
|
;Office2013 = 06401-00206-234-333333-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
|
||||||
|
|
||||||
# Set ePID/HwId for Office 2016 (including Visio and Project) explicitly
|
# Set ePID/HwId for Office 2016 (including Visio and Project) explicitly
|
||||||
;Office2016 = 06401-00206-437-444444-03-1033-9600.0000-3622014 / 01 02 03 04 05 06 07 08
|
;Office2016 = 06401-00206-437-444444-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
|
||||||
|
|
||||||
# Use custom TCP port
|
# Set ePID/HwId for Office 2019 (including Visio and Project) explicitly
|
||||||
# Command line: -P
|
;Office2019 = 06401-00206-666-666666-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
|
||||||
# ***The Port directive only works if vlmcsd was compiled to use MS RPC or simple sockets
|
|
||||||
# ***Use Listen otherwise
|
# Set ePID/HwId for Windows China Government (Enterprise G/GN) explicitly
|
||||||
;Port = 1234
|
;WinChinaGov = 06401-03858-000-555555-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
|
||||||
|
|
||||||
# Listen on all IPv4 addresses (default port 1688)
|
# Use a compatible VPN device to create a hidden local IPv4 address
|
||||||
# Command line: -L
|
# Command line: -O
|
||||||
# Does not work with MS RPC or simple sockets, use Port=
|
# VPN = <VPN adapter name>[=<IPv4 address>][/<CIDR mask>][:<DHCP lease duration>]
|
||||||
;Listen = 0.0.0.0:1688
|
# Use VPN adapter "KMS Mirror" give it IP address 192.168.123.100 with a lease duration of one day and make entire 192.168.128.x a hidden local IPv4 address.
|
||||||
|
;VPN = KMS Mirror=192.168.123.100/24:1d
|
||||||
# Listen on all IPv6 addresses (default port 1688)
|
|
||||||
# Command line: -L
|
# Use custom TCP port
|
||||||
;Listen = [::]:1688
|
# Command line: -P
|
||||||
|
# ***The Port directive only works if vlmcsd was compiled to use MS RPC or simple sockets
|
||||||
# Listen on all private IP addresses and reject incoming requests from public IP addresses
|
# ***Use Listen otherwise
|
||||||
# Command line: -o
|
;Port = 1234
|
||||||
# PublicIPProtectionLevel = 3
|
|
||||||
|
# Listen on all IPv4 addresses (default port 1688)
|
||||||
# Allow binding to foreign IP addresses
|
# Command line: -L
|
||||||
# Command line: -F0 and -F1
|
# Does not work with MS RPC or simple sockets, use Port=
|
||||||
;FreeBind = true
|
;Listen = 0.0.0.0:1688
|
||||||
|
|
||||||
# Randomize ePIDs at program start up (only those that are not explicitly specified)
|
# Listen on all IPv6 addresses (default port 1688)
|
||||||
# Command line: -r
|
# Command line: -L
|
||||||
;RandomizationLevel = 1
|
;Listen = [::]:1688
|
||||||
|
|
||||||
# Use a specific culture (1033 = English US) in ePIDs even if the ePID is randomized
|
# Listen on all private IP addresses and reject incoming requests from public IP addresses
|
||||||
# Command line: -C
|
# Command line: -o
|
||||||
;LCID = 1033
|
# PublicIPProtectionLevel = 3
|
||||||
|
|
||||||
# Set a maximum of 4 workers (forked processes or threads)
|
# Allow binding to foreign IP addresses
|
||||||
# Command line: -m
|
# Command line: -F0 and -F1
|
||||||
;MaxWorkers = 4
|
;FreeBind = true
|
||||||
|
|
||||||
# Disconnect users after 30 seconds of inactivity
|
# Randomize ePIDs at program start up (only those that are not explicitly specified)
|
||||||
# Command line: -t
|
# Command line: -r
|
||||||
;ConnectionTimeout = 30
|
;RandomizationLevel = 1
|
||||||
|
|
||||||
# Disconnect clients immediately after each request
|
# Use a specific host build in ePIDs even if the ePID is randomized
|
||||||
# Command line: -d and -k
|
# Command line: -H
|
||||||
;DisconnectClientsImmediately = yes
|
;HostBuild = 17763
|
||||||
|
|
||||||
# Write a pid file (a file containing the process id of vlmcsd)
|
# Use a specific culture (1033 = English US) in ePIDs even if the ePID is randomized
|
||||||
# Command line: -p
|
# Command line: -C
|
||||||
;PidFile = /var/run/vlmcsd.pid
|
;LCID = 1033
|
||||||
|
|
||||||
# Load a KMS data file
|
# Set a maximum of 4 workers (forked processes or threads)
|
||||||
# Command line: -j
|
# Command line: -m
|
||||||
;KmsData = /etc/vlmcsd.kmd
|
;MaxWorkers = 4
|
||||||
|
|
||||||
# Write log to /var/log/vlmcsd.log
|
# Disconnect users after 30 seconds of inactivity
|
||||||
# Command line: -l (-e and -f also override this directive)
|
# Command line: -t
|
||||||
;LogFile = /var/log/vlmcsd.log
|
;ConnectionTimeout = 30
|
||||||
|
|
||||||
# Don't include date and time in logs (default is true)
|
# Disconnect clients immediately after each request
|
||||||
# Command line: -T0 and -T1
|
# Command line: -d and -k
|
||||||
;LogDateAndTime = false
|
;DisconnectClientsImmediately = yes
|
||||||
|
|
||||||
# Create a verbose log
|
# Write a pid file (a file containing the process id of vlmcsd)
|
||||||
# Command line: -v and -q
|
# Command line: -p
|
||||||
;LogVerbose = true
|
;PidFile = /var/run/vlmcsd.pid
|
||||||
|
|
||||||
# Whitelist known products
|
# Load a KMS data file
|
||||||
# Command line: -K0, -K1, -K2, -K3
|
# Command line: -j
|
||||||
;WhiteListingLevel = 0
|
;KmsData = /etc/vlmcsd.kmd
|
||||||
|
|
||||||
# Check that the client time is within +/- 4 hours of the system time
|
# Write log to /var/log/vlmcsd.log
|
||||||
# Command line: -c0, -c1
|
# Command line: -l (-e and -f also override this directive)
|
||||||
;CheckClientTime = false
|
;LogFile = /var/log/vlmcsd.log
|
||||||
|
|
||||||
# Maintain a list of CMIDs
|
# Don't include date and time in logs (default is true)
|
||||||
# Command line: -M0, -M1
|
# Command line: -T0 and -T1
|
||||||
;MaintainClients = false
|
;LogDateAndTime = false
|
||||||
|
|
||||||
# Start with empty CMID list (Requires MaintainClients = true)
|
# Create a verbose log
|
||||||
# Command line: -E0, -E1
|
# Command line: -v and -q
|
||||||
;StartEmpty = false
|
;LogVerbose = true
|
||||||
|
|
||||||
# Set activation interval to 2 hours
|
# Whitelist known products
|
||||||
# Command line: -A
|
# Command line: -K0, -K1, -K2, -K3
|
||||||
;ActivationInterval = 2h
|
;WhiteListingLevel = 0
|
||||||
|
|
||||||
# Set renewal interval to 7 days
|
# Check that the client time is within +/- 4 hours of the system time
|
||||||
# Command line: -R
|
# Command line: -c0, -c1
|
||||||
;RenewalInterval = 7d
|
;CheckClientTime = false
|
||||||
|
|
||||||
# Run program as user vlmcsduser
|
# Maintain a list of CMIDs
|
||||||
# Command line: -u
|
# Command line: -M0, -M1
|
||||||
;user = vlmcsduser
|
;MaintainClients = false
|
||||||
|
|
||||||
# Run program as group vlmcsdgroup
|
# Start with empty CMID list (Requires MaintainClients = true)
|
||||||
# Command line: -g
|
# Command line: -E0, -E1
|
||||||
;group = vlmcsdgroup
|
;StartEmpty = false
|
||||||
|
|
||||||
# Disable or enable the NDR64 transfer syntax in RPC (default enabled)
|
# Set activation interval to 2 hours
|
||||||
# Command line: -N0 and -N1
|
# Command line: -A
|
||||||
;UseNDR64 = true
|
;ActivationInterval = 2h
|
||||||
|
|
||||||
# Disable or enable bind time feature negotiation in RPC (default enabled)
|
# Set renewal interval to 7 days
|
||||||
# Command line: -B0 and -B1
|
# Command line: -R
|
||||||
;UseBTFN = true
|
;RenewalInterval = 7d
|
||||||
|
|
||||||
|
# Exit vlmcsd if warning of certain level has been reached
|
||||||
|
# Command line: -x
|
||||||
|
# 0 = Never
|
||||||
|
# 1 = Exit, if any listening socket could not be established or TAP error occurs
|
||||||
|
;ExitLevel = 0
|
||||||
|
|
||||||
|
# Run program as user vlmcsduser
|
||||||
|
# Command line: -u
|
||||||
|
;user = vlmcsduser
|
||||||
|
|
||||||
|
# Run program as group vlmcsdgroup
|
||||||
|
# Command line: -g
|
||||||
|
;group = vlmcsdgroup
|
||||||
|
|
||||||
|
# Disable or enable the NDR64 transfer syntax in RPC (default enabled)
|
||||||
|
# Command line: -N0 and -N1
|
||||||
|
;UseNDR64 = true
|
||||||
|
|
||||||
|
# Disable or enable bind time feature negotiation in RPC (default enabled)
|
||||||
|
# Command line: -B0 and -B1
|
||||||
|
;UseBTFN = true
|
||||||
|
BIN
etc/vlmcsd.kmd
BIN
etc/vlmcsd.kmd
Binary file not shown.
Binary file not shown.
2908
hotbird64-mass-build/make_bs
Executable file
2908
hotbird64-mass-build/make_bs
Executable file
File diff suppressed because it is too large
Load Diff
69
hotbird64-mass-build/make_dyson
Executable file
69
hotbird64-mass-build/make_dyson
Executable file
@ -0,0 +1,69 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export VLMCSD_VERSION=$(git describe)
|
||||||
|
export VERBOSE=3
|
||||||
|
#export CAT=2
|
||||||
|
|
||||||
|
if [ `uname -s` != "SunOS" ]; then
|
||||||
|
echo "This is no SunOS operating system."
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$( dirname "$0" )"
|
||||||
|
make -C .. clean
|
||||||
|
|
||||||
|
|
||||||
|
SOLARIS_VERSION=`uname -v`
|
||||||
|
|
||||||
|
MAKEFLAGS="-Bj"
|
||||||
|
REUSEOBJFLAGS="-j"
|
||||||
|
|
||||||
|
cd ../src
|
||||||
|
BINDIR="../bin"
|
||||||
|
MANDIR="../man"
|
||||||
|
|
||||||
|
CF="-flto=12 -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants -Wno-char-subscripts"
|
||||||
|
LF="-static-libgcc -fwhole-program -Wl,--hash-style=sysv,--build-id=none,-z,norelro"
|
||||||
|
|
||||||
|
export PROGRAM_NAME=$BINDIR/vlmcsd-Solaris-x64
|
||||||
|
export CLIENT_NAME=$BINDIR/vlmcs-Solaris-x64
|
||||||
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-Solaris-x64
|
||||||
|
|
||||||
|
make $MAKEFLAGS DNS_PARSER=OS CFLAGS="$CF" CC=gcc LDFLAGS="$LF" allmulti
|
||||||
|
|
||||||
|
export PROGRAM_NAME=$BINDIR/vlmcsd-Solaris-x64-threads
|
||||||
|
make $MAKEFLAGS DNS_PARSER=OS CFLAGS="$CF" CC=gcc LDFLAGS="$LF" THREADS=1 vlmcsd
|
||||||
|
|
||||||
|
export PROGRAM_NAME=$BINDIR/vlmcsd-Solaris-x86
|
||||||
|
export CLIENT_NAME=$BINDIR/vlmcs-Solaris-x86
|
||||||
|
export MULTI_NAME=$BINDIR/vlmcsdmulti-Solaris-x86
|
||||||
|
|
||||||
|
make $MAKEFLAGS DNS_PARSER=OS CFLAGS="$CF" PLATFORMFLAGS="-m32" CC=gcc LDFLAGS="$LF" allmulti
|
||||||
|
|
||||||
|
export PROGRAM_NAME=$BINDIR/vlmcsd-Solaris-x86-threads
|
||||||
|
make $MAKEFLAGS DNS_PARSER=OS CFLAGS="$CF" PLATFORMFLAGS="-m32" CC=gcc LDFLAGS="$LF" THREADS=1 vlmcsd
|
||||||
|
|
||||||
|
scp -p $BINDIR/* root@ubuntu64.internal:x/binaries/Solaris/intel
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
BINDIR="./bin"
|
||||||
|
MANDIR="./man"
|
||||||
|
|
||||||
|
mkdir /tmp/vlmcsd
|
||||||
|
cp -af $MANDIR/*.1 $MANDIR/*.5 $MANDIR/*.7 $MANDIR/*.8 /tmp/vlmcsd
|
||||||
|
xz /tmp/vlmcsd/*
|
||||||
|
|
||||||
|
sudo mkdir -p /usr/local/man/man1
|
||||||
|
sudo mkdir -p /usr/local/man/man5
|
||||||
|
sudo mkdir -p /usr/local/man/man7
|
||||||
|
sudo mkdir -p /usr/local/man/man8
|
||||||
|
|
||||||
|
sudo cp -af /tmp/vlmcsd/*.1.xz /usr/local/man/man1
|
||||||
|
sudo cp -af /tmp/vlmcsd/*.5.xz /usr/local/man/man5
|
||||||
|
sudo cp -af /tmp/vlmcsd/*.7.xz /usr/local/man/man7
|
||||||
|
sudo cp -af /tmp/vlmcsd/*.8.xz /usr/local/man/man8
|
||||||
|
|
||||||
|
rm -fr /tmp/vlmcsd
|
||||||
|
|
||||||
|
sudo cp -af $BINDIR/vlmcsd-Solaris-x86 /usr/local/bin/vlmcsd
|
||||||
|
sudo cp -af $BINDIR/vlmcs-Solaris-x86 /usr/local/bin/vlmcs
|
@ -12,7 +12,7 @@ cd ../src
|
|||||||
VERSION="$(uname -r | sed -e 's/-.*//')"
|
VERSION="$(uname -r | sed -e 's/-.*//')"
|
||||||
MAKE="gmake"
|
MAKE="gmake"
|
||||||
BINDIR="../bin"
|
BINDIR="../bin"
|
||||||
|
PATH=/usr/local/bin:$PATH
|
||||||
|
|
||||||
MAKEFLAGS="-B -j12"
|
MAKEFLAGS="-B -j12"
|
||||||
REUSEOBJFLAGS="-j12"
|
REUSEOBJFLAGS="-j12"
|
||||||
@ -22,16 +22,16 @@ CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tabl
|
|||||||
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
|
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
|
||||||
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
|
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
|
||||||
|
|
||||||
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-gcc CC=gcc6 CFLAGS="$CF" LDFLAGS="$LF"
|
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-gcc CC=gcc9 CFLAGS="$CF" LDFLAGS="$LF"
|
||||||
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
|
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64 CC=clang-devel CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
|
||||||
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86 CC=clang-devel CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||||
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-gcc CC=gcc6 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
|
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-gcc CC=gcc9 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
|
||||||
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads-gcc THREADS=1 CC=gcc6 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
|
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads-gcc THREADS=1 CC=gcc9 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
|
||||||
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
|
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads THREADS=1 CC=clang-devel CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
|
||||||
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads THREADS=1 CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
|
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads THREADS=1 CC=clang-devel CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
|
||||||
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads-gcc THREADS=1 CC=gcc6 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
|
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads-gcc THREADS=1 CC=gcc9 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
|
||||||
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG" LDFLAGS="$LF"
|
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL CC=clang-devel CFLAGS="$CFCLANG" LDFLAGS="$LF"
|
||||||
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL CC=clang38 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL CC=clang-devel CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
|
||||||
|
|
||||||
cd ../bin
|
cd ../bin
|
||||||
|
|
||||||
|
@ -711,7 +711,7 @@ export PROGRAM_NAME=../binaries/Android/intel/bionic/vlmcsd-android23-x86
|
|||||||
export MULTI_NAME=../binaries/Android/intel/static/vlmcsdmulti-android23-x86
|
export MULTI_NAME=../binaries/Android/intel/static/vlmcsdmulti-android23-x86
|
||||||
export CC=/opt/toolchains/x86-android-9/bin/i686-linux-android-gcc
|
export CC=/opt/toolchains/x86-android-9/bin/i686-linux-android-gcc
|
||||||
export CFLAGS="$SMALLCC"
|
export CFLAGS="$SMALLCC"
|
||||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m32"
|
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=i386 -m32"
|
||||||
export THREADS=1
|
export THREADS=1
|
||||||
export LDFLAGS="$SMALLLD"
|
export LDFLAGS="$SMALLLD"
|
||||||
|
|
||||||
@ -745,7 +745,7 @@ export PROGRAM_NAME=../binaries/Android/intel/bionic/vlmcsd-android41-x86
|
|||||||
export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android41-x86
|
export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android41-x86
|
||||||
export CC=/opt/toolchains/x86-android-16/bin/i686-linux-android-gcc
|
export CC=/opt/toolchains/x86-android-16/bin/i686-linux-android-gcc
|
||||||
export CFLAGS="$SMALLCC"
|
export CFLAGS="$SMALLCC"
|
||||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m32 -fPIE -pie"
|
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=i386 -m32 -fPIE -pie"
|
||||||
export THREADS=1
|
export THREADS=1
|
||||||
export LDFLAGS="$SMALLLD"
|
export LDFLAGS="$SMALLLD"
|
||||||
|
|
||||||
@ -797,7 +797,7 @@ export PROGRAM_NAME=../binaries/Android/intel/bionic/vlmcsd-android50-x64
|
|||||||
export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android50-x64
|
export MULTI_NAME=../binaries/Android/intel/bionic/vlmcsdmulti-android50-x64
|
||||||
export CC=/opt/toolchains/x86_64-android-21/bin/x86_64-linux-android-gcc
|
export CC=/opt/toolchains/x86_64-android-21/bin/x86_64-linux-android-gcc
|
||||||
export CFLAGS="$SMALLCC"
|
export CFLAGS="$SMALLCC"
|
||||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=atom -m64 -fPIE -pie"
|
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64 -fPIE -pie"
|
||||||
export THREADS=0
|
export THREADS=0
|
||||||
export LDFLAGS="$SMALLLD"
|
export LDFLAGS="$SMALLLD"
|
||||||
|
|
||||||
@ -819,7 +819,7 @@ export PROGRAM_NAME=../binaries/Android/intel/static/vlmcsd-android50-x64-static
|
|||||||
export MULTI_NAME=../binaries/Android/intel/static/vlmcsdmulti-android50-x64-static
|
export MULTI_NAME=../binaries/Android/intel/static/vlmcsdmulti-android50-x64-static
|
||||||
export CC=/opt/toolchains/x86_64-android-21/bin/x86_64-linux-android-gcc
|
export CC=/opt/toolchains/x86_64-android-21/bin/x86_64-linux-android-gcc
|
||||||
export CFLAGS="$SMALLCC"
|
export CFLAGS="$SMALLCC"
|
||||||
export PLATFORMFLAGS="-flto=16 -fwhole-program -march=nocona -m64"
|
export PLATFORMFLAGS="-flto=16 -fwhole-program -m64"
|
||||||
export THREADS=0
|
export THREADS=0
|
||||||
export LDFLAGS="$SMALLLD -static"
|
export LDFLAGS="$SMALLLD -static"
|
||||||
|
|
||||||
|
@ -12,6 +12,58 @@ BINDIR="../bin"
|
|||||||
MANDIR="../man"
|
MANDIR="../man"
|
||||||
cd ../src
|
cd ../src
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p ../binaries/Linux/intel/glibc
|
||||||
|
mkdir -p ../binaries/Linux/intel/uclibc
|
||||||
|
mkdir -p ../binaries/Linux/intel/static
|
||||||
|
mkdir -p ../binaries/Linux/intel/musl
|
||||||
|
|
||||||
|
mkdir -p ../binaries/Linux/sparc/glibc
|
||||||
|
mkdir -p ../binaries/Linux/s390/glibc
|
||||||
|
|
||||||
|
mkdir -p ../binaries/Android/arm/bionic
|
||||||
|
mkdir -p ../binaries/Android/arm/static
|
||||||
|
mkdir -p ../binaries/Android/intel/bionic
|
||||||
|
mkdir -p ../binaries/Android/intel/static
|
||||||
|
mkdir -p ../binaries/Android/mips/bionic
|
||||||
|
mkdir -p ../binaries/Android/mips/static
|
||||||
|
|
||||||
|
mkdir -p ../binaries/Linux/arm/little-endian/glibc
|
||||||
|
mkdir -p ../binaries/Linux/arm/little-endian/musl
|
||||||
|
mkdir -p ../binaries/Linux/arm/little-endian/uclibc
|
||||||
|
mkdir -p ../binaries/Linux/arm/little-endian/static
|
||||||
|
mkdir -p ../binaries/Linux/arm/big-endian/uclibc
|
||||||
|
mkdir -p ../binaries/Linux/arm/big-endian/static
|
||||||
|
|
||||||
|
mkdir -p ../binaries/Linux/mips/little-endian/glibc
|
||||||
|
mkdir -p ../binaries/Linux/mips/little-endian/uclibc
|
||||||
|
mkdir -p ../binaries/Linux/mips/little-endian/static
|
||||||
|
mkdir -p ../binaries/Linux/mips/little-endian/musl
|
||||||
|
mkdir -p ../binaries/Linux/mips/big-endian/uclibc
|
||||||
|
mkdir -p ../binaries/Linux/mips/big-endian/static
|
||||||
|
mkdir -p ../binaries/Linux/mips/big-endian/glibc
|
||||||
|
mkdir -p ../binaries/Linux/mips/big-endian/musl
|
||||||
|
|
||||||
|
mkdir -p ../binaries/Linux/ppc/little-endian/glibc
|
||||||
|
mkdir -p ../binaries/Linux/ppc/big-endian/glibc
|
||||||
|
mkdir -p ../binaries/Linux/ppc/big-endian/uclibc
|
||||||
|
mkdir -p ../binaries/Linux/ppc/big-endian/musl
|
||||||
|
mkdir -p ../binaries/Linux/ppc/big-endian/static
|
||||||
|
|
||||||
|
mkdir -p ../binaries/MacOSX/intel
|
||||||
|
mkdir -p ../binaries/MacOSX/ppc
|
||||||
|
mkdir -p ../binaries/iOS/arm
|
||||||
|
|
||||||
|
mkdir -p ../binaries/FreeBSD/intel
|
||||||
|
mkdir -p ../binaries/NetBSD/intel
|
||||||
|
mkdir -p ../binaries/OpenBSD/intel
|
||||||
|
mkdir -p ../binaries/DragonFly/intel
|
||||||
|
mkdir -p ../binaries/Solaris/intel
|
||||||
|
mkdir -p ../binaries/Windows/intel
|
||||||
|
mkdir -p ../binaries/Minix/intel
|
||||||
|
mkdir -p ../binaries/Hurd/intel
|
||||||
|
|
||||||
|
|
||||||
## IBM S/390
|
## IBM S/390
|
||||||
|
|
||||||
export CFLAGS="$SMALLCC"
|
export CFLAGS="$SMALLCC"
|
||||||
@ -22,17 +74,17 @@ export FEATURES=full
|
|||||||
export CC=s390x-linux-gnu-gcc
|
export CC=s390x-linux-gnu-gcc
|
||||||
export VERBOSE=3
|
export VERBOSE=3
|
||||||
|
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-s390-glibc
|
export MULTI_NAME=~/x/binaries/Linux/s390/glibc/vlmcsdmulti-s390-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-s390-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/s390/glibc/vlmcs-s390-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-s390-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/s390/glibc/vlmcsd-s390-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
|
|
||||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-s390x-glibc
|
export MULTI_NAME=~/x/binaries/Linux/s390/glibc/vlmcsdmulti-s390x-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-s390x-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/s390/glibc/vlmcs-s390x-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-s390x-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/s390/glibc/vlmcsd-s390x-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
@ -44,9 +96,9 @@ export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mcpu=v7"
|
|||||||
export LDFLAGS="$SMALLLD"
|
export LDFLAGS="$SMALLLD"
|
||||||
export CC=sparc64-linux-gnu-gcc
|
export CC=sparc64-linux-gnu-gcc
|
||||||
|
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-sparc64v9-glibc
|
export MULTI_NAME=~/x/binaries/Linux/sparc/glibc/vlmcsdmulti-sparc64v9-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-sparc64v9-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/sparc/glibc/vlmcs-sparc64v9-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-sparc64v9-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/sparc/glibc/vlmcsd-sparc64v9-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
@ -59,16 +111,16 @@ export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
|
|||||||
export LDFLAGS="$SMALLLD"
|
export LDFLAGS="$SMALLLD"
|
||||||
export CC=mips64-linux-gnuabi64-gcc
|
export CC=mips64-linux-gnuabi64-gcc
|
||||||
|
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64-glibc
|
export MULTI_NAME=~/x/binaries/Linux/mips/big-endian/glibc/vlmcsdmulti-mips64-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-mips64-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/mips/big-endian/glibc/vlmcs-mips64-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/mips/big-endian/glibc/vlmcsd-mips64-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64mm-glibc
|
export MULTI_NAME=~/x/binaries/Linux/mips/big-endian/glibc/vlmcsdmulti-mips64mm-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-mips64mm-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/mips/big-endian/glibc/vlmcs-mips64mm-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64mm-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/mips/big-endian/glibc/vlmcsd-mips64mm-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
@ -80,45 +132,24 @@ export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
|
|||||||
export LDFLAGS="$SMALLLD"
|
export LDFLAGS="$SMALLLD"
|
||||||
export CC=mips64el-linux-gnuabi64-gcc
|
export CC=mips64el-linux-gnuabi64-gcc
|
||||||
|
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64el-glibc
|
export MULTI_NAME=~/x/binaries/Linux/mips/little-endian/glibc/vlmcsdmulti-mips64el-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-mips64el-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/mips/little-endian/glibc/vlmcs-mips64el-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64el-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/mips/little-endian/glibc/vlmcsd-mips64el-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
|
||||||
export MULTI_NAME=$BINDIR/vlmcsdmulti-mips64elmm-glibc
|
export MULTI_NAME=~/x/binaries/Linux/mips/little-endian/glibc/vlmcsdmulti-mips64elmm-glibc
|
||||||
export CLIENT_NAME=$BINDIR/vlmcs-mips64elmm-glibc
|
export CLIENT_NAME=~/x/binaries/Linux/mips/little-endian/glibc/vlmcs-mips64elmm-glibc
|
||||||
export PROGRAM_NAME=$BINDIR/vlmcsd-mips64elmm-glibc
|
export PROGRAM_NAME=~/x/binaries/Linux/mips/little-endian/glibc/vlmcsd-mips64elmm-glibc
|
||||||
|
|
||||||
make -B -j`nproc` allmulti
|
make -B -j`nproc` allmulti
|
||||||
|
|
||||||
cd $BINDIR
|
|
||||||
sstrip -z *
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" == "nocopy" ]; then
|
if [ "$1" == "nocopy" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $MANDIR
|
scp -p -P 2222 ~/x/binaries/Linux/s390/glibc/vlmcsdmulti-s390-glibc ~/x/binaries/Linux/s390/glibc/vlmcs-s390-glibc ~/x/binaries/Linux/s390/glibc/vlmcsd-s390-glibc ~/x/binaries/Linux/s390/glibc/vlmcsdmulti-s390x-glibc ~/x/binaries/Linux/s390/glibc/vlmcs-s390x-glibc ~/x/binaries/Linux/s390/glibc/vlmcsd-s390x-glibc s390:vlmcsd
|
||||||
|
scp -p -P 2222 ~/x/binaries/Linux/s390/glibc/vlmcsdmulti-s390-glibc ~/x/binaries/Linux/s390/glibc/vlmcsdmulti-s390x-glibc s390:/usr/local/sbin
|
||||||
mkdir -p /usr/local/man/man1 2>/dev/null
|
|
||||||
mkdir -p /usr/local/man/man5 2>/dev/null
|
|
||||||
mkdir -p /usr/local/man/man8 2>/dev/null
|
|
||||||
mkdir -p /usr/local/man/man7 2>/dev/null
|
|
||||||
cp -a vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
|
|
||||||
cp -a vlmcsd.7 /usr/local/man/man7/
|
|
||||||
cp -a vlmcsd.8 /usr/local/man/man8/
|
|
||||||
cp -a vlmcsd.ini.5 /usr/local/man/man5/
|
|
||||||
pbzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
|
||||||
|
|
||||||
cd $BINDIR
|
|
||||||
|
|
||||||
scp -p vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc ubuntu64.internal:x/binaries/Linux/s390/glibc
|
|
||||||
scp -p vlmcsdmulti-sparc64v9-glibc vlmcs-sparc64v9-glibc vlmcsd-sparc64v9-glibc ubuntu64.internal:x/binaries/Linux/sparc/glibc
|
|
||||||
scp -p vlmcsdmulti-mips64-glibc vlmcs-mips64-glibc vlmcsd-mips64-glibc vlmcsdmulti-mips64mm-glibc vlmcs-mips64mm-glibc vlmcsd-mips64mm-glibc ubuntu64.internal:x/binaries/Linux/mips/big-endian/glibc
|
|
||||||
scp -p vlmcsdmulti-mips64el-glibc vlmcs-mips64el-glibc vlmcsd-mips64el-glibc vlmcsdmulti-mips64elmm-glibc vlmcs-mips64elmm-glibc vlmcsd-mips64elmm-glibc ubuntu64.internal:x/binaries/Linux/mips/little-endian/glibc
|
|
||||||
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc s390:vlmcsd
|
|
||||||
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcsdmulti-s390x-glibc s390:/usr/local/sbin
|
|
||||||
|
154
hotbird64-mass-build/make_nonbs
Executable file
154
hotbird64-mass-build/make_nonbs
Executable file
@ -0,0 +1,154 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $(id -u) != 0 ]; then
|
||||||
|
echo "Must be root to run this"
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$( dirname "$0" )"
|
||||||
|
|
||||||
|
IS64ONLY=0
|
||||||
|
|
||||||
|
if [ "$(uname -r|grep Microsoft)" != "" ]; then
|
||||||
|
IS64ONLY=1
|
||||||
|
echo "Warning 32-bit toolchains do not run."
|
||||||
|
fi
|
||||||
|
|
||||||
|
export VLMCSD_VERSION=$(git describe)
|
||||||
|
|
||||||
|
export VERBOSE=3
|
||||||
|
export DNS_PARSER=internal
|
||||||
|
|
||||||
|
MAKEFLAGS="-j200 -B"
|
||||||
|
REUSEOBJFLAGS="-j200"
|
||||||
|
SMALLCC="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
||||||
|
SMALLLD="-pipe -Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
|
||||||
|
SMALL="$SMALLCC $SMALLLD"
|
||||||
|
|
||||||
|
rm -f vlmcs vlmcsdmulti vlmcsd 2>/dev/null
|
||||||
|
rm -fr ../binaries
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/intel/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/intel/uclibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/intel/static
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/intel/musl
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/sparc/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/s390/glibc
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Android/arm/bionic
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Android/arm/static
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Android/intel/bionic
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Android/intel/static
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Android/mips/bionic
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Android/mips/static
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/arm/little-endian/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/arm/little-endian/musl
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/arm/little-endian/uclibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/arm/little-endian/static
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/arm/big-endian/uclibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/arm/big-endian/static
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/little-endian/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/little-endian/uclibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/little-endian/static
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/little-endian/musl
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/big-endian/uclibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/big-endian/static
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/big-endian/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/mips/big-endian/musl
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/ppc/little-endian/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/ppc/big-endian/glibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/ppc/big-endian/uclibc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/ppc/big-endian/musl
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Linux/ppc/big-endian/static
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/MacOSX/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/MacOSX/ppc
|
||||||
|
mkdir -p ../../debian/root/x/binaries/iOS/arm
|
||||||
|
|
||||||
|
mkdir -p ../../debian/root/x/binaries/FreeBSD/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/NetBSD/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/OpenBSD/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/DragonFly/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Solaris/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Windows/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Minix/intel
|
||||||
|
mkdir -p ../../debian/root/x/binaries/Hurd/intel
|
||||||
|
|
||||||
|
../../bin/prepare-debian
|
||||||
|
OLDHOME=$HOME
|
||||||
|
export HOME=/root
|
||||||
|
chroot ../../debian /root/x/hotbird64-mass-build/make_bs
|
||||||
|
chroot ../../debian /root/x/hotbird64-mass-build/make_multilib_linux
|
||||||
|
export HOME=$OLDHOME
|
||||||
|
|
||||||
|
rm -f *_all.c vlmcsd.o vlmcs.o vlmcsdmulti.o 2> /dev/null
|
||||||
|
export STAGING_DIR=.
|
||||||
|
|
||||||
|
cd ../src
|
||||||
|
pwd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Linux x32 glibc
|
||||||
|
export FEATURES=full
|
||||||
|
export MULTI_NAME=../../debian/root/x/binaries/Linux/intel/glibc/vlmcsdmulti-x32-glibc
|
||||||
|
export CLIENT_NAME=../../debian/root/x/binaries/Linux/intel/glibc/vlmcs-x32-glibc
|
||||||
|
export PROGRAM_NAME=../../debian/root/x/binaries/Linux/intel/glibc/vlmcsd-x32-glibc
|
||||||
|
export CC=gcc
|
||||||
|
export CFLAGS="$SMALLCC"
|
||||||
|
export PLATFORMFLAGS="-flto=16 -fwhole-program -mx32 -march=nocona -mtune=generic"
|
||||||
|
export LDFLAGS="-fuse-ld=bfd $SMALLLD -Wl,--hash-style=gnu"
|
||||||
|
export THREADS=0
|
||||||
|
export NOPROCFS=0
|
||||||
|
export AUXV=1
|
||||||
|
|
||||||
|
make DNS_PARSER=OS $MAKEFLAGS allmulti
|
||||||
|
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo Error creating $CLIENT_NAME and/or $PROGRAM_NAME
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Linux x32 glibc threads
|
||||||
|
export FEATURES=full
|
||||||
|
export PROGRAM_NAME=../../debian/root/x/binaries/Linux/intel/glibc/vlmcsd-x32-glibc-threads
|
||||||
|
export CC=gcc
|
||||||
|
export CFLAGS="$SMALLCC"
|
||||||
|
export PLATFORMFLAGS="-flto=16 -fwhole-program -mx32 -march=nocona -mtune=generic"
|
||||||
|
export LDFLAGS="-fuse-ld=bfd $SMALLLD -Wl,--hash-style=gnu -lpthread"
|
||||||
|
export THREADS=1
|
||||||
|
export NOPROCFS=0
|
||||||
|
export AUXV=1
|
||||||
|
|
||||||
|
make DNS_PARSER=OS $MAKEFLAGS $PROGRAM_NAME
|
||||||
|
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo Error creating $PROGRAM_NAME
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
make alldocs
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p /usr/local/man/man1 2>/dev/null
|
||||||
|
mkdir -p /usr/local/man/man5 2>/dev/null
|
||||||
|
mkdir -p /usr/local/man/man8 2>/dev/null
|
||||||
|
mkdir -p /usr/local/man/man7 2>/dev/null
|
||||||
|
cp -a man/vlmcs.1 man/vlmcsdmulti.1 /usr/local/man/man1/
|
||||||
|
cp -a man/vlmcsd-floppy.7 man/vlmcsd.7 /usr/local/man/man7/
|
||||||
|
cp -a man/vlmcsd.8 /usr/local/man/man8/
|
||||||
|
cp -a man/vlmcsd.ini.5 /usr/local/man/man5/
|
||||||
|
pbzip2 -f -9 /usr/local/man/man7/vlmcsd-floppy.7 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
|
||||||
|
|
||||||
|
mandb >/dev/null 2>&1
|
@ -49,10 +49,10 @@ PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS allmulti MULTI
|
|||||||
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj allmulti SAFE_MODE=1 MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-ppc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-ppc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
|
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj allmulti SAFE_MODE=1 MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-ppc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-ppc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
|
||||||
|
|
||||||
|
|
||||||
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-gcc CC=gcc-7 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
||||||
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-threads-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x86-threads-gcc CC=gcc-7 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
|
||||||
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
make $MAKEFLAGS allmulti MULTI_NAME=$BINDIR/vlmcsdmulti-MacOSX-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-MacOSX-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-gcc CC=gcc-7 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
||||||
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-threads-gcc CC=gcc-6 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
make $MAKEFLAGS vlmcsd THREADS=1 PROGRAM_NAME=$BINDIR/vlmcsd-MacOSX-x64-threads-gcc CC=gcc-7 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
|
||||||
|
|
||||||
# Sign the iOS binaries
|
# Sign the iOS binaries
|
||||||
#ldid -S *iOS*
|
#ldid -S *iOS*
|
||||||
|
@ -4,7 +4,7 @@ cd "$( dirname "$0" )"
|
|||||||
|
|
||||||
export VLMCSD_VERSION=$(git describe)
|
export VLMCSD_VERSION=$(git describe)
|
||||||
|
|
||||||
msbuild='/cygdrive/c/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe'
|
msbuild='/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/amd64/msbuild.exe'
|
||||||
version="$VLMCSD_VERSION, built $(date -u '+%Y-%m-%d %H:%M:%S') UTC"
|
version="$VLMCSD_VERSION, built $(date -u '+%Y-%m-%d %H:%M:%S') UTC"
|
||||||
|
|
||||||
make -C .. clean
|
make -C .. clean
|
||||||
@ -41,7 +41,7 @@ make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-c
|
|||||||
make $MAKEFLAGS vlmcsdmulti MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
make $MAKEFLAGS vlmcsdmulti MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||||
make $MAKEFLAGS vlmcsdmulti MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
make $MAKEFLAGS vlmcsdmulti MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=../bin/vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
||||||
|
|
||||||
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=../bin/vlmcsd-cygwin-x86-openssl-EXPERIMENTAL CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
#make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=../bin/vlmcsd-cygwin-x86-openssl-EXPERIMENTAL CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
|
||||||
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=../bin/vlmcsd-cygwin-x64-openssl-EXPERIMENTAL CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=../bin/vlmcs-cygwin-msrpc-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=../bin/vlmcsd-cygwin-x64-openssl-EXPERIMENTAL CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
|
||||||
|
|
||||||
export CAT=2
|
export CAT=2
|
||||||
|
@ -19,7 +19,7 @@ DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
|
|||||||
groff -Thtml -mandoc -c $< > $@
|
groff -Thtml -mandoc -c $< > $@
|
||||||
|
|
||||||
%.unix.txt : %
|
%.unix.txt : %
|
||||||
groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
|
groff -P -c -Tascii -mandoc -c $< | col -bx > $@
|
||||||
|
|
||||||
%.dos.txt : %.unix.txt
|
%.dos.txt : %.unix.txt
|
||||||
# unix2dos -n $< $@
|
# unix2dos -n $< $@
|
||||||
|
@ -52,8 +52,8 @@ OPTIONS
|
|||||||
Show help.
|
Show help.
|
||||||
|
|
||||||
|
|
||||||
-V Displays extended version information. This includes the com‐
|
-V Displays extended version information. This includes the com-
|
||||||
piler used to build vlmcs, the intended platform and flags (com‐
|
piler used to build vlmcs, the intended platform and flags (com-
|
||||||
pile time options) to build vlmcs. If you have the source code
|
pile time options) to build vlmcs. If you have the source code
|
||||||
of vlmcsd, you can type make help (or gmake help on systems that
|
of vlmcsd, you can type make help (or gmake help on systems that
|
||||||
do not use the GNU version of make(1) by default) to see the
|
do not use the GNU version of make(1) by default) to see the
|
||||||
@ -72,7 +72,7 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-l application
|
-l application
|
||||||
Request activation for a specific application. Valid applica‐
|
Request activation for a specific application. Valid applica-
|
||||||
tions can be displayed by using -x. The default application is
|
tions can be displayed by using -x. The default application is
|
||||||
Windows Vista Business. The list of available applications is
|
Windows Vista Business. The list of available applications is
|
||||||
not complete. You may supply GUIDs with -a, -k and -s to specify
|
not complete. You may supply GUIDs with -a, -k and -s to specify
|
||||||
@ -91,7 +91,7 @@ OPTIONS
|
|||||||
vlmcs ignores the minor protocol number (e.g. sends a v4 request
|
vlmcs ignores the minor protocol number (e.g. sends a v4 request
|
||||||
for version 4.1). If the major version number is less then 4, it
|
for version 4.1). If the major version number is less then 4, it
|
||||||
sends a v4 request. If the major version is greater then 6, it
|
sends a v4 request. If the major version is greater then 6, it
|
||||||
sends a v6 request. In any case the protocol-version as speci‐
|
sends a v6 request. In any case the protocol-version as speci-
|
||||||
fied by -K is put in the version fields of the request.
|
fied by -K is put in the version fields of the request.
|
||||||
|
|
||||||
|
|
||||||
@ -115,10 +115,10 @@ OPTIONS
|
|||||||
this flag.
|
this flag.
|
||||||
|
|
||||||
|
|
||||||
-d Use NetBIOS names instead of DNS names. By default vlmcsd gener‐
|
-d Use NetBIOS names instead of DNS names. By default vlmcsd gener-
|
||||||
ates some random DNS names for each request. If you prefer Net‐
|
ates some random DNS names for each request. If you prefer Net-
|
||||||
BIOS names, you may use -d. A real Microsoft activation client
|
BIOS names, you may use -d. A real Microsoft activation client
|
||||||
uses DNS names or NetBIOS depending on the client name configu‐
|
uses DNS names or NetBIOS depending on the client name configu-
|
||||||
ration. KMS servers treat the workstation name as a comment that
|
ration. KMS servers treat the workstation name as a comment that
|
||||||
affects logging only. Clients will be identified by a GUID that
|
affects logging only. Clients will be identified by a GUID that
|
||||||
can be specified using -c. -d has no effect if you also specify
|
can be specified using -c. -d has no effect if you also specify
|
||||||
@ -126,7 +126,7 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-a application-guid
|
-a application-guid
|
||||||
Send requests with a specific application-guid. There are cur‐
|
Send requests with a specific application-guid. There are cur-
|
||||||
rently only three known valid application-guids:
|
rently only three known valid application-guids:
|
||||||
|
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ OPTIONS
|
|||||||
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
|
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
|
||||||
|
|
||||||
|
|
||||||
A Microsoft KMS server uses these GUIDs to have seperate coun‐
|
A Microsoft KMS server uses these GUIDs to have seperate coun-
|
||||||
ters for the already activated clients. A client that does not
|
ters for the already activated clients. A client that does not
|
||||||
contact the KMS server within 30 days will be deleted from the
|
contact the KMS server within 30 days will be deleted from the
|
||||||
database. Emulated KMS servers are always fully charged.
|
database. Emulated KMS servers are always fully charged.
|
||||||
@ -153,8 +153,8 @@ OPTIONS
|
|||||||
The activation-guid defines the actual product, e.g. "Windows
|
The activation-guid defines the actual product, e.g. "Windows
|
||||||
8.1 Professional WMC KMSCLIENT edition". A activation-guid maps
|
8.1 Professional WMC KMSCLIENT edition". A activation-guid maps
|
||||||
1:1 to a product key. However, neither a Microsoft KMS server
|
1:1 to a product key. However, neither a Microsoft KMS server
|
||||||
nor emulated servers check this id. The activation-guid is use‐
|
nor emulated servers check this id. The activation-guid is use-
|
||||||
ful in logging to get a specific product description like "Win‐
|
ful in logging to get a specific product description like "Win-
|
||||||
dows 8.1 Professional WMC". A list of current activation-guids
|
dows 8.1 Professional WMC". A list of current activation-guids
|
||||||
can be found in kms.c (table ExtendedProductList).
|
can be found in kms.c (table ExtendedProductList).
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ OPTIONS
|
|||||||
test an emulated KMS server whether it suffers from memory
|
test an emulated KMS server whether it suffers from memory
|
||||||
leaks. To test for memory leaks use -n with a large number of
|
leaks. To test for memory leaks use -n with a large number of
|
||||||
requests (> 100000) and then test twice (with and without -T).
|
requests (> 100000) and then test twice (with and without -T).
|
||||||
This option may become neccessary for future versions of Micro‐
|
This option may become neccessary for future versions of Micro-
|
||||||
soft's KMS server because multiple requests with different
|
soft's KMS server because multiple requests with different
|
||||||
clients-guids for the same kms-id-guid are impossible in a real
|
clients-guids for the same kms-id-guid are impossible in a real
|
||||||
KMS szenario over the same TCP connection.
|
KMS szenario over the same TCP connection.
|
||||||
@ -195,9 +195,9 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-G filename
|
-G filename
|
||||||
Grabs ePIDs and HWIDs from a KMS server and writes the informa‐
|
Grabs ePIDs and HWIDs from a KMS server and writes the informa-
|
||||||
tion to filename in format suitable to be used as a configura‐
|
tion to filename in format suitable to be used as a configura-
|
||||||
tion file (aka ini file) for vlmcsd(8). This is especially use‐
|
tion file (aka ini file) for vlmcsd(8). This is especially use-
|
||||||
ful if you have access to a genuine KMS server and want to use
|
ful if you have access to a genuine KMS server and want to use
|
||||||
the same data with vlmcsd(8).
|
the same data with vlmcsd(8).
|
||||||
|
|
||||||
@ -229,8 +229,8 @@ OPTIONS
|
|||||||
Reports a specific license status to the KMS server. status is a
|
Reports a specific license status to the KMS server. status is a
|
||||||
number that can be from 0 to 6. 0=unlicensed, 1=licensed, 2=OOB
|
number that can be from 0 to 6. 0=unlicensed, 1=licensed, 2=OOB
|
||||||
grace, 3=OOT grace, 4=Non-genuinue grace, 5=notification,
|
grace, 3=OOT grace, 4=Non-genuinue grace, 5=notification,
|
||||||
6=extended grace. Refer to TechNet ⟨http://
|
6=extended grace. Refer to TechNet <http://
|
||||||
technet.microsoft.com/en-us/library/ff686879.aspx#_Toc257201371⟩
|
technet.microsoft.com/en-us/library/ff686879.aspx#_Toc257201371>
|
||||||
for more information. A Microsoft KMS server collects this
|
for more information. A Microsoft KMS server collects this
|
||||||
information for statistics only.
|
information for statistics only.
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ OPTIONS
|
|||||||
Disables (-N0) or enables (-N1) the NDR64 transfer syntax in the
|
Disables (-N0) or enables (-N1) the NDR64 transfer syntax in the
|
||||||
RPC protocol. Disable NDR64 only in case of problems. If NDR64
|
RPC protocol. Disable NDR64 only in case of problems. If NDR64
|
||||||
is not used, vlmcs cannot detect many RPC protocol errors in KMS
|
is not used, vlmcs cannot detect many RPC protocol errors in KMS
|
||||||
emulators. If you want to test whether a KMS emulator fully sup‐
|
emulators. If you want to test whether a KMS emulator fully sup-
|
||||||
ports NDR64, you must use the -n option to send at least two
|
ports NDR64, you must use the -n option to send at least two
|
||||||
requests. This is because Microsoft's client always sends the
|
requests. This is because Microsoft's client always sends the
|
||||||
first request using NDR32 syntax and subsequent requests using
|
first request using NDR32 syntax and subsequent requests using
|
||||||
@ -271,7 +271,7 @@ OPTIONS
|
|||||||
|
|
||||||
-B0 and -B1
|
-B0 and -B1
|
||||||
Disables (-B0) or enables (-B1) bind time feature negotiation
|
Disables (-B0) or enables (-B1) bind time feature negotiation
|
||||||
(BTFN) in the RPC protocol. Disable BTFN only in case of prob‐
|
(BTFN) in the RPC protocol. Disable BTFN only in case of prob-
|
||||||
lems. If BTFN is not used, vlmcs cannot detect many RPC protocol
|
lems. If BTFN is not used, vlmcs cannot detect many RPC protocol
|
||||||
errors in KMS emulators.
|
errors in KMS emulators.
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ EXAMPLES
|
|||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
Some platforms (e.g. Solaris) may have a man(7) system that does not
|
Some platforms (e.g. Solaris) may have a man(7) system that does not
|
||||||
handle URLs. URLs may be omitted in the documentation on those plat‐
|
handle URLs. URLs may be omitted in the documentation on those plat-
|
||||||
forms. Cygwin, Linux, FreeBSD and Mac OS X are known to work correctly.
|
forms. Cygwin, Linux, FreeBSD and Mac OS X are known to work correctly.
|
||||||
|
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ AUTHOR
|
|||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos‐
|
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos-
|
||||||
ferati87, qad, Ratiborus, vityan666, ...
|
ferati87, qad, Ratiborus, vityan666, ...
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!-- Creator : groff version 1.22.3 -->
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
<!-- CreationDate: Mon Nov 28 01:28:23 2016 -->
|
<!-- CreationDate: Sat Oct 20 09:49:39 2018 -->
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
BIN
man/vlmcs.1.pdf
BIN
man/vlmcs.1.pdf
Binary file not shown.
@ -52,8 +52,8 @@ OPTIONS
|
|||||||
Show help.
|
Show help.
|
||||||
|
|
||||||
|
|
||||||
-V Displays extended version information. This includes the com‐
|
-V Displays extended version information. This includes the com-
|
||||||
piler used to build vlmcs, the intended platform and flags (com‐
|
piler used to build vlmcs, the intended platform and flags (com-
|
||||||
pile time options) to build vlmcs. If you have the source code
|
pile time options) to build vlmcs. If you have the source code
|
||||||
of vlmcsd, you can type make help (or gmake help on systems that
|
of vlmcsd, you can type make help (or gmake help on systems that
|
||||||
do not use the GNU version of make(1) by default) to see the
|
do not use the GNU version of make(1) by default) to see the
|
||||||
@ -72,7 +72,7 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-l application
|
-l application
|
||||||
Request activation for a specific application. Valid applica‐
|
Request activation for a specific application. Valid applica-
|
||||||
tions can be displayed by using -x. The default application is
|
tions can be displayed by using -x. The default application is
|
||||||
Windows Vista Business. The list of available applications is
|
Windows Vista Business. The list of available applications is
|
||||||
not complete. You may supply GUIDs with -a, -k and -s to specify
|
not complete. You may supply GUIDs with -a, -k and -s to specify
|
||||||
@ -91,7 +91,7 @@ OPTIONS
|
|||||||
vlmcs ignores the minor protocol number (e.g. sends a v4 request
|
vlmcs ignores the minor protocol number (e.g. sends a v4 request
|
||||||
for version 4.1). If the major version number is less then 4, it
|
for version 4.1). If the major version number is less then 4, it
|
||||||
sends a v4 request. If the major version is greater then 6, it
|
sends a v4 request. If the major version is greater then 6, it
|
||||||
sends a v6 request. In any case the protocol-version as speci‐
|
sends a v6 request. In any case the protocol-version as speci-
|
||||||
fied by -K is put in the version fields of the request.
|
fied by -K is put in the version fields of the request.
|
||||||
|
|
||||||
|
|
||||||
@ -115,10 +115,10 @@ OPTIONS
|
|||||||
this flag.
|
this flag.
|
||||||
|
|
||||||
|
|
||||||
-d Use NetBIOS names instead of DNS names. By default vlmcsd gener‐
|
-d Use NetBIOS names instead of DNS names. By default vlmcsd gener-
|
||||||
ates some random DNS names for each request. If you prefer Net‐
|
ates some random DNS names for each request. If you prefer Net-
|
||||||
BIOS names, you may use -d. A real Microsoft activation client
|
BIOS names, you may use -d. A real Microsoft activation client
|
||||||
uses DNS names or NetBIOS depending on the client name configu‐
|
uses DNS names or NetBIOS depending on the client name configu-
|
||||||
ration. KMS servers treat the workstation name as a comment that
|
ration. KMS servers treat the workstation name as a comment that
|
||||||
affects logging only. Clients will be identified by a GUID that
|
affects logging only. Clients will be identified by a GUID that
|
||||||
can be specified using -c. -d has no effect if you also specify
|
can be specified using -c. -d has no effect if you also specify
|
||||||
@ -126,7 +126,7 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-a application-guid
|
-a application-guid
|
||||||
Send requests with a specific application-guid. There are cur‐
|
Send requests with a specific application-guid. There are cur-
|
||||||
rently only three known valid application-guids:
|
rently only three known valid application-guids:
|
||||||
|
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ OPTIONS
|
|||||||
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
|
0ff1ce15-a989-479d-af46-f275c6370663 (Office 2013)
|
||||||
|
|
||||||
|
|
||||||
A Microsoft KMS server uses these GUIDs to have seperate coun‐
|
A Microsoft KMS server uses these GUIDs to have seperate coun-
|
||||||
ters for the already activated clients. A client that does not
|
ters for the already activated clients. A client that does not
|
||||||
contact the KMS server within 30 days will be deleted from the
|
contact the KMS server within 30 days will be deleted from the
|
||||||
database. Emulated KMS servers are always fully charged.
|
database. Emulated KMS servers are always fully charged.
|
||||||
@ -153,8 +153,8 @@ OPTIONS
|
|||||||
The activation-guid defines the actual product, e.g. "Windows
|
The activation-guid defines the actual product, e.g. "Windows
|
||||||
8.1 Professional WMC KMSCLIENT edition". A activation-guid maps
|
8.1 Professional WMC KMSCLIENT edition". A activation-guid maps
|
||||||
1:1 to a product key. However, neither a Microsoft KMS server
|
1:1 to a product key. However, neither a Microsoft KMS server
|
||||||
nor emulated servers check this id. The activation-guid is use‐
|
nor emulated servers check this id. The activation-guid is use-
|
||||||
ful in logging to get a specific product description like "Win‐
|
ful in logging to get a specific product description like "Win-
|
||||||
dows 8.1 Professional WMC". A list of current activation-guids
|
dows 8.1 Professional WMC". A list of current activation-guids
|
||||||
can be found in kms.c (table ExtendedProductList).
|
can be found in kms.c (table ExtendedProductList).
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ OPTIONS
|
|||||||
test an emulated KMS server whether it suffers from memory
|
test an emulated KMS server whether it suffers from memory
|
||||||
leaks. To test for memory leaks use -n with a large number of
|
leaks. To test for memory leaks use -n with a large number of
|
||||||
requests (> 100000) and then test twice (with and without -T).
|
requests (> 100000) and then test twice (with and without -T).
|
||||||
This option may become neccessary for future versions of Micro‐
|
This option may become neccessary for future versions of Micro-
|
||||||
soft's KMS server because multiple requests with different
|
soft's KMS server because multiple requests with different
|
||||||
clients-guids for the same kms-id-guid are impossible in a real
|
clients-guids for the same kms-id-guid are impossible in a real
|
||||||
KMS szenario over the same TCP connection.
|
KMS szenario over the same TCP connection.
|
||||||
@ -195,9 +195,9 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-G filename
|
-G filename
|
||||||
Grabs ePIDs and HWIDs from a KMS server and writes the informa‐
|
Grabs ePIDs and HWIDs from a KMS server and writes the informa-
|
||||||
tion to filename in format suitable to be used as a configura‐
|
tion to filename in format suitable to be used as a configura-
|
||||||
tion file (aka ini file) for vlmcsd(8). This is especially use‐
|
tion file (aka ini file) for vlmcsd(8). This is especially use-
|
||||||
ful if you have access to a genuine KMS server and want to use
|
ful if you have access to a genuine KMS server and want to use
|
||||||
the same data with vlmcsd(8).
|
the same data with vlmcsd(8).
|
||||||
|
|
||||||
@ -229,8 +229,8 @@ OPTIONS
|
|||||||
Reports a specific license status to the KMS server. status is a
|
Reports a specific license status to the KMS server. status is a
|
||||||
number that can be from 0 to 6. 0=unlicensed, 1=licensed, 2=OOB
|
number that can be from 0 to 6. 0=unlicensed, 1=licensed, 2=OOB
|
||||||
grace, 3=OOT grace, 4=Non-genuinue grace, 5=notification,
|
grace, 3=OOT grace, 4=Non-genuinue grace, 5=notification,
|
||||||
6=extended grace. Refer to TechNet ⟨http://
|
6=extended grace. Refer to TechNet <http://
|
||||||
technet.microsoft.com/en-us/library/ff686879.aspx#_Toc257201371⟩
|
technet.microsoft.com/en-us/library/ff686879.aspx#_Toc257201371>
|
||||||
for more information. A Microsoft KMS server collects this
|
for more information. A Microsoft KMS server collects this
|
||||||
information for statistics only.
|
information for statistics only.
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ OPTIONS
|
|||||||
Disables (-N0) or enables (-N1) the NDR64 transfer syntax in the
|
Disables (-N0) or enables (-N1) the NDR64 transfer syntax in the
|
||||||
RPC protocol. Disable NDR64 only in case of problems. If NDR64
|
RPC protocol. Disable NDR64 only in case of problems. If NDR64
|
||||||
is not used, vlmcs cannot detect many RPC protocol errors in KMS
|
is not used, vlmcs cannot detect many RPC protocol errors in KMS
|
||||||
emulators. If you want to test whether a KMS emulator fully sup‐
|
emulators. If you want to test whether a KMS emulator fully sup-
|
||||||
ports NDR64, you must use the -n option to send at least two
|
ports NDR64, you must use the -n option to send at least two
|
||||||
requests. This is because Microsoft's client always sends the
|
requests. This is because Microsoft's client always sends the
|
||||||
first request using NDR32 syntax and subsequent requests using
|
first request using NDR32 syntax and subsequent requests using
|
||||||
@ -271,7 +271,7 @@ OPTIONS
|
|||||||
|
|
||||||
-B0 and -B1
|
-B0 and -B1
|
||||||
Disables (-B0) or enables (-B1) bind time feature negotiation
|
Disables (-B0) or enables (-B1) bind time feature negotiation
|
||||||
(BTFN) in the RPC protocol. Disable BTFN only in case of prob‐
|
(BTFN) in the RPC protocol. Disable BTFN only in case of prob-
|
||||||
lems. If BTFN is not used, vlmcs cannot detect many RPC protocol
|
lems. If BTFN is not used, vlmcs cannot detect many RPC protocol
|
||||||
errors in KMS emulators.
|
errors in KMS emulators.
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ EXAMPLES
|
|||||||
|
|
||||||
BUGS
|
BUGS
|
||||||
Some platforms (e.g. Solaris) may have a man(7) system that does not
|
Some platforms (e.g. Solaris) may have a man(7) system that does not
|
||||||
handle URLs. URLs may be omitted in the documentation on those plat‐
|
handle URLs. URLs may be omitted in the documentation on those plat-
|
||||||
forms. Cygwin, Linux, FreeBSD and Mac OS X are known to work correctly.
|
forms. Cygwin, Linux, FreeBSD and Mac OS X are known to work correctly.
|
||||||
|
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ AUTHOR
|
|||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos‐
|
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos-
|
||||||
ferati87, qad, Ratiborus, vityan666, ...
|
ferati87, qad, Ratiborus, vityan666, ...
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.mso www.tmac
|
.mso www.tmac
|
||||||
.TH "VLMCSD-FLOPPY" 7 "October 2016" "Hotbird64" "KMS Activation Manual"
|
.TH "VLMCSD-FLOPPY" 7 "May 2017" "Hotbird64" "KMS Activation Manual"
|
||||||
.LO 8
|
.LO 8
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -102,7 +102,13 @@ Defines the ePID that is used for Windows activations. If you ommit this paramet
|
|||||||
Defines the ePID that is used for Office 2010 activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
Defines the ePID that is used for Office 2010 activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
||||||
|
|
||||||
.IP "\fBOFFICE2013=\fIepid\fR"
|
.IP "\fBOFFICE2013=\fIepid\fR"
|
||||||
Defines the ePID that is used for Office (versions 2013 and greater) activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
Defines the ePID that is used for Office 2016 activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
||||||
|
|
||||||
|
.IP "\fBOFFICE2016=\fIepid\fR"
|
||||||
|
Defines the ePID that is used for Office 2016 activations. If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
||||||
|
|
||||||
|
.IP "\fBWINCHINAGOV=\fIepid\fR"
|
||||||
|
Defines the ePID that is used for Windows China Government Edition activations (Enterprise G/GN). If you ommit this parameter, \fBvlmcsd\fR(8) generates a random ePID when it is started.
|
||||||
|
|
||||||
.IP "\fBHWID=\fIhwid\fR"
|
.IP "\fBHWID=\fIhwid\fR"
|
||||||
Defines the HwId that is sent to clients. \fIhwid\fR must be specified as 16 hex digits that are interpreted as a series of 8 bytes (big endian). Any character that is not a hex digit will be ignored. This is for better readability.
|
Defines the HwId that is sent to clients. \fIhwid\fR must be specified as 16 hex digits that are interpreted as a series of 8 bytes (big endian). Any character that is not a hex digit will be ignored. This is for better readability.
|
||||||
|
@ -8,12 +8,12 @@ NAME
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
floppy144.vfd is an image of a bootable floppy that contains a minimal
|
floppy144.vfd is an image of a bootable floppy that contains a minimal
|
||||||
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri‐
|
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri-
|
||||||
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
|
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
|
||||||
it easy to use vlmcsd(8) to activate the virtual machine's host com‐
|
it easy to use vlmcsd(8) to activate the virtual machine's host com-
|
||||||
puter which is not possible in Windows 8.1 and up. The floppy image is
|
puter which is not possible in Windows 8.1 and up. The floppy image is
|
||||||
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
|
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
|
||||||
FAT12 filesystem. The floppy can be mounted to apply several customiza‐
|
FAT12 filesystem. The floppy can be mounted to apply several customiza-
|
||||||
tions.
|
tions.
|
||||||
|
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ SETUP
|
|||||||
has floppy boot disabled by default). If possible, setup a virtual
|
has floppy boot disabled by default). If possible, setup a virtual
|
||||||
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
|
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
|
||||||
machine, enable the compatibility support mode (CSM) to allow a BIOS
|
machine, enable the compatibility support mode (CSM) to allow a BIOS
|
||||||
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa‐
|
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa-
|
||||||
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
|
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
|
||||||
Linux kernel can't handle this and ignores any devices connected to
|
Linux kernel can't handle this and ignores any devices connected to
|
||||||
these buses.
|
these buses.
|
||||||
@ -49,10 +49,10 @@ SETUP
|
|||||||
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
|
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
|
||||||
Selecting a paravirtualized driver slightly improves performance. In
|
Selecting a paravirtualized driver slightly improves performance. In
|
||||||
VirtualBox you can simply select virtio in the network configuration
|
VirtualBox you can simply select virtio in the network configuration
|
||||||
dialog. VMWare requires that you add or change the VMX file. Use 'eth‐
|
dialog. VMWare requires that you add or change the VMX file. Use 'eth-
|
||||||
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
|
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
|
||||||
|
|
||||||
If you are using QEMU, you must also setup a TAP adapter. Port redi‐
|
If you are using QEMU, you must also setup a TAP adapter. Port redi-
|
||||||
rection does not work to activate your own computer.
|
rection does not work to activate your own computer.
|
||||||
|
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ CONFIGURATION
|
|||||||
must be mounted. Under Linux you can simply attach floppy144.vfd to a
|
must be mounted. Under Linux you can simply attach floppy144.vfd to a
|
||||||
loop device which is mountable like any other block device. For Windows
|
loop device which is mountable like any other block device. For Windows
|
||||||
you must use some software that allows mounting a floppy image, e.g.
|
you must use some software that allows mounting a floppy image, e.g.
|
||||||
OSFMount ⟨http://www.osforensics.com/tools/mount-disk-images.html⟩
|
OSFMount <http://www.osforensics.com/tools/mount-disk-images.html>
|
||||||
|
|
||||||
OSFMount works under all Windows versions beginning with Windows XP up
|
OSFMount works under all Windows versions beginning with Windows XP up
|
||||||
to Windows 10 (32- and 64-bit).
|
to Windows 10 (32- and 64-bit).
|
||||||
@ -75,7 +75,7 @@ CONFIGURATION
|
|||||||
|
|
||||||
LABEL dhcp
|
LABEL dhcp
|
||||||
KERNEL bzImage
|
KERNEL bzImage
|
||||||
APPEND vga=773 quiet initrd=initrd KBD=us LIS‐
|
APPEND vga=773 quiet initrd=initrd KBD=us LIS-
|
||||||
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
||||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||||
@ -86,9 +86,9 @@ CONFIGURATION
|
|||||||
|
|
||||||
LABEL static
|
LABEL static
|
||||||
KERNEL bzImage
|
KERNEL bzImage
|
||||||
APPEND vga=773 quiet initrd=initrd KBD=fr LIS‐
|
APPEND vga=773 quiet initrd=initrd KBD=fr LIS-
|
||||||
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
||||||
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE‐
|
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE-
|
||||||
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
|
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
|
||||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||||
@ -98,7 +98,7 @@ CONFIGURATION
|
|||||||
There are two configurations in this files: dhcp (for configuring the
|
There are two configurations in this files: dhcp (for configuring the
|
||||||
IPv4 network via DHCP) and static (for a static IPv4 configuration).
|
IPv4 network via DHCP) and static (for a static IPv4 configuration).
|
||||||
The kernel always boots the dhcp configuration without asking (lines
|
The kernel always boots the dhcp configuration without asking (lines
|
||||||
'prompt 0' and 'default dhcp'). You can simply change the default con‐
|
'prompt 0' and 'default dhcp'). You can simply change the default con-
|
||||||
figuration to static and then customize the APPEND line in the static
|
figuration to static and then customize the APPEND line in the static
|
||||||
configuration. For more details how to customize the syslinux.cfg file
|
configuration. For more details how to customize the syslinux.cfg file
|
||||||
see syslinux(1).
|
see syslinux(1).
|
||||||
@ -108,11 +108,11 @@ CONFIGURATION
|
|||||||
|
|
||||||
|
|
||||||
vga=vesa-video-mode
|
vga=vesa-video-mode
|
||||||
Sets the VESA display mode for the virtual machine. The parame‐
|
Sets the VESA display mode for the virtual machine. The parame-
|
||||||
ter is not optional. If you ommit it, you will not see anything
|
ter is not optional. If you ommit it, you will not see anything
|
||||||
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
|
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
|
||||||
⟨https://en.wikipedia.org/wiki/
|
<https://en.wikipedia.org/wiki/
|
||||||
VESA_BIOS_Extensions#Linux_video_mode_numbers⟩ for more video
|
VESA_BIOS_Extensions#Linux_video_mode_numbers> for more video
|
||||||
modes. Note that all 16 color (4-bit) modes will not work. Use
|
modes. Note that all 16 color (4-bit) modes will not work. Use
|
||||||
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
|
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
|
||||||
16 Million colors) only. All modes above 1280x1024 are non-VESA-
|
16 Million colors) only. All modes above 1280x1024 are non-VESA-
|
||||||
@ -123,14 +123,14 @@ CONFIGURATION
|
|||||||
may omit quiet but it doesn't make much sense. The boot log is
|
may omit quiet but it doesn't make much sense. The boot log is
|
||||||
actually very verbose and scrolls away from screen quickly. If
|
actually very verbose and scrolls away from screen quickly. If
|
||||||
any errors occur during boot, they will be displayed even if
|
any errors occur during boot, they will be displayed even if
|
||||||
quiet is present in the APPEND line. You may evaluate the com‐
|
quiet is present in the APPEND line. You may evaluate the com-
|
||||||
plete boot log later by using the dmesg command or the menu on
|
plete boot log later by using the dmesg command or the menu on
|
||||||
/dev/tty8.
|
/dev/tty8.
|
||||||
|
|
||||||
|
|
||||||
initrd=initial-ram-disk-file
|
initrd=initial-ram-disk-file
|
||||||
This defines the initial ram disk that the kernel will read.
|
This defines the initial ram disk that the kernel will read.
|
||||||
There is only one initial ram disk on the floppy thus leave ini‐
|
There is only one initial ram disk on the floppy thus leave ini-
|
||||||
trd=initrd as it is.
|
trd=initrd as it is.
|
||||||
|
|
||||||
|
|
||||||
@ -176,9 +176,21 @@ CONFIGURATION
|
|||||||
|
|
||||||
|
|
||||||
OFFICE2013=epid
|
OFFICE2013=epid
|
||||||
Defines the ePID that is used for Office (versions 2013 and
|
Defines the ePID that is used for Office 2016 activations. If
|
||||||
greater) activations. If you ommit this parameter, vlmcsd(8)
|
you ommit this parameter, vlmcsd(8) generates a random ePID when
|
||||||
generates a random ePID when it is started.
|
it is started.
|
||||||
|
|
||||||
|
|
||||||
|
OFFICE2016=epid
|
||||||
|
Defines the ePID that is used for Office 2016 activations. If
|
||||||
|
you ommit this parameter, vlmcsd(8) generates a random ePID when
|
||||||
|
it is started.
|
||||||
|
|
||||||
|
|
||||||
|
WINCHINAGOV=epid
|
||||||
|
Defines the ePID that is used for Windows China Government Edi-
|
||||||
|
tion activations (Enterprise G/GN). If you ommit this parameter,
|
||||||
|
vlmcsd(8) generates a random ePID when it is started.
|
||||||
|
|
||||||
|
|
||||||
HWID=hwid
|
HWID=hwid
|
||||||
@ -190,8 +202,8 @@ CONFIGURATION
|
|||||||
|
|
||||||
TZ=posix-time-zone-string
|
TZ=posix-time-zone-string
|
||||||
Set the time zone to posix-time-zone-string. It must conform to
|
Set the time zone to posix-time-zone-string. It must conform to
|
||||||
the POSIX ⟨http://pubs.opengroup.org/onlinepubs/009695399/
|
the POSIX <http://pubs.opengroup.org/onlinepubs/009695399/
|
||||||
basedefs/xbd_chap08.html⟩ specification. Simplified time zone
|
basedefs/xbd_chap08.html> specification. Simplified time zone
|
||||||
strings like "Europe/London" or "America/Detroit" are not
|
strings like "Europe/London" or "America/Detroit" are not
|
||||||
allowed. This has the very simple reason that there is no space
|
allowed. This has the very simple reason that there is no space
|
||||||
on the floppy to store the time zone database.
|
on the floppy to store the time zone database.
|
||||||
@ -201,7 +213,7 @@ CONFIGURATION
|
|||||||
|
|
||||||
CET The standard (winter) time zone has the name CET.
|
CET The standard (winter) time zone has the name CET.
|
||||||
|
|
||||||
-1 The standard time zone is one hour east of UTC. Nega‐
|
-1 The standard time zone is one hour east of UTC. Nega-
|
||||||
tive numbers are east of UTC. Positive numbers are
|
tive numbers are east of UTC. Positive numbers are
|
||||||
west of UTC.
|
west of UTC.
|
||||||
|
|
||||||
@ -228,12 +240,12 @@ CONFIGURATION
|
|||||||
|
|
||||||
IPV4_CONFIG=DHCP | STATIC
|
IPV4_CONFIG=DHCP | STATIC
|
||||||
This determines how you want to configure IPv4 networking. If
|
This determines how you want to configure IPv4 networking. If
|
||||||
you use IPV4_CONFIG=STATIC, you must supply additional para‐
|
you use IPV4_CONFIG=STATIC, you must supply additional para-
|
||||||
maters to the APPEND command line.
|
maters to the APPEND command line.
|
||||||
|
|
||||||
|
|
||||||
IPV4_ADDRESS=ipv4-address/CIDR-mask
|
IPV4_ADDRESS=ipv4-address/CIDR-mask
|
||||||
Use ipv4-address with netmask CIDR-mask for static IPv4 configu‐
|
Use ipv4-address with netmask CIDR-mask for static IPv4 configu-
|
||||||
ration. The netmask must not be ommitted. For IPv4 address
|
ration. The netmask must not be ommitted. For IPv4 address
|
||||||
192.168.12.17 with a netmask of 255.255.255.0 use
|
192.168.12.17 with a netmask of 255.255.255.0 use
|
||||||
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
|
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
|
||||||
@ -245,7 +257,7 @@ CONFIGURATION
|
|||||||
Use ipv4-address as the default gateway. This is usually the
|
Use ipv4-address as the default gateway. This is usually the
|
||||||
IPv4 address of your router. You may specify NONE explicitly for
|
IPv4 address of your router. You may specify NONE explicitly for
|
||||||
no gateway. In this case your virtual machine is only visible on
|
no gateway. In this case your virtual machine is only visible on
|
||||||
its local LAN. This paramater is ignored, if you used IPV4_CON‐
|
its local LAN. This paramater is ignored, if you used IPV4_CON-
|
||||||
FIG=DHCP.
|
FIG=DHCP.
|
||||||
|
|
||||||
|
|
||||||
@ -262,9 +274,9 @@ CONFIGURATION
|
|||||||
|
|
||||||
IPV4_DNS2=ipv4-address | NONE
|
IPV4_DNS2=ipv4-address | NONE
|
||||||
Use ipv4-address as the secondary name server. It serves as a
|
Use ipv4-address as the secondary name server. It serves as a
|
||||||
backup if the primary name server is not available. Home net‐
|
backup if the primary name server is not available. Home net-
|
||||||
works often don't have a secondary name server. In this case set
|
works often don't have a secondary name server. In this case set
|
||||||
this to NONE. This paramater is ignored, if you used IPV4_CON‐
|
this to NONE. This paramater is ignored, if you used IPV4_CON-
|
||||||
FIG=DHCP.
|
FIG=DHCP.
|
||||||
|
|
||||||
|
|
||||||
@ -282,7 +294,7 @@ CONFIGURATION
|
|||||||
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
|
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
|
||||||
domain part of an FQDN will be replaced by that name. This host
|
domain part of an FQDN will be replaced by that name. This host
|
||||||
name or host part of an FQDN will not replaced by a host name
|
name or host part of an FQDN will not replaced by a host name
|
||||||
returned via DHCP. The host name is not important for the opera‐
|
returned via DHCP. The host name is not important for the opera-
|
||||||
tion of floppy144.vfd.
|
tion of floppy144.vfd.
|
||||||
|
|
||||||
|
|
||||||
@ -319,10 +331,10 @@ CONFIGURATION
|
|||||||
OPERATION
|
OPERATION
|
||||||
Diskless System
|
Diskless System
|
||||||
The floppy144.vfd virtual machine is a diskless system that works
|
The floppy144.vfd virtual machine is a diskless system that works
|
||||||
entirely from RAM. The file system is actually a RAM disk that is cre‐
|
entirely from RAM. The file system is actually a RAM disk that is cre-
|
||||||
ated from the initrd(4) file on the floppy image.
|
ated from the initrd(4) file on the floppy image.
|
||||||
|
|
||||||
Anything you'll do from inside the virtual machine, for instance edit‐
|
Anything you'll do from inside the virtual machine, for instance edit-
|
||||||
ing a config file, will be lost when you reboot the machine. So, if you
|
ing a config file, will be lost when you reboot the machine. So, if you
|
||||||
ever asked yourself if rm -fr / (root privileges required) really
|
ever asked yourself if rm -fr / (root privileges required) really
|
||||||
deletes all files from all mounted partitions, the floppy144.vfd VM is
|
deletes all files from all mounted partitions, the floppy144.vfd VM is
|
||||||
@ -338,7 +350,7 @@ OPERATION
|
|||||||
The kernel boots up very quickly and the init script (/sbin/init) waits
|
The kernel boots up very quickly and the init script (/sbin/init) waits
|
||||||
5 seconds. In these 5 seconds you can:
|
5 seconds. In these 5 seconds you can:
|
||||||
|
|
||||||
Press 'm' to manually enter the time zone and the IPv4 parame‐
|
Press 'm' to manually enter the time zone and the IPv4 parame-
|
||||||
ters. These will be queried interactively.
|
ters. These will be queried interactively.
|
||||||
Press 't' to manually enter the time zone only.
|
Press 't' to manually enter the time zone only.
|
||||||
Press 's' to escape to a shell.
|
Press 's' to escape to a shell.
|
||||||
@ -351,7 +363,7 @@ OPERATION
|
|||||||
|
|
||||||
Logging into the system
|
Logging into the system
|
||||||
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
|
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
|
||||||
to these logins, simply press ALT-F2 to ALT-F6. To return to the con‐
|
to these logins, simply press ALT-F2 to ALT-F6. To return to the con-
|
||||||
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
|
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
|
||||||
use telnet(1). This allows you use a terminal program (e.g. putty) that
|
use telnet(1). This allows you use a terminal program (e.g. putty) that
|
||||||
can utilize your keyboard layout, can be resized and has full UTF-8
|
can utilize your keyboard layout, can be resized and has full UTF-8
|
||||||
@ -369,7 +381,7 @@ OPERATION
|
|||||||
The menu system
|
The menu system
|
||||||
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
|
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
|
||||||
allows you performing some administrative tasks and to view various
|
allows you performing some administrative tasks and to view various
|
||||||
system information. It is mainly for users that do not have much expe‐
|
system information. It is mainly for users that do not have much expe-
|
||||||
rience with Unix commands.
|
rience with Unix commands.
|
||||||
|
|
||||||
|
|
||||||
@ -419,7 +431,7 @@ OPERATION
|
|||||||
|
|
||||||
8) Show TCP/IP configuration
|
8) Show TCP/IP configuration
|
||||||
Shows the TCP/IP configuration, listening sockets and current
|
Shows the TCP/IP configuration, listening sockets and current
|
||||||
TCP and UDP connections. Useful, if you problems with net con‐
|
TCP and UDP connections. Useful, if you problems with net con-
|
||||||
nectivity. The output is piped through less(1). So press 'q' to
|
nectivity. The output is piped through less(1). So press 'q' to
|
||||||
return to the menu.
|
return to the menu.
|
||||||
|
|
||||||
@ -431,7 +443,7 @@ OPERATION
|
|||||||
|
|
||||||
s) Shutdown
|
s) Shutdown
|
||||||
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
|
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
|
||||||
not required. It is ok to use a hard power off in your virtual‐
|
not required. It is ok to use a hard power off in your virtual-
|
||||||
ization program.
|
ization program.
|
||||||
|
|
||||||
|
|
||||||
@ -476,7 +488,7 @@ PERMANENT CHANGES OF INITRD
|
|||||||
works on almost any unix-like OS, it does not work on Windows even not
|
works on almost any unix-like OS, it does not work on Windows even not
|
||||||
with Cygwin. The reason is that the NTFS file system can't handle uids
|
with Cygwin. The reason is that the NTFS file system can't handle uids
|
||||||
and gids. These cannot be preserved when unpacking the cpio(1) archive
|
and gids. These cannot be preserved when unpacking the cpio(1) archive
|
||||||
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver‐
|
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver-
|
||||||
sary Update) and later, you must make sure to unpack the initrd(4) file
|
sary Update) and later, you must make sure to unpack the initrd(4) file
|
||||||
to a directory on VolFs (normally everything that is not mounted under
|
to a directory on VolFs (normally everything that is not mounted under
|
||||||
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
|
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
|
||||||
@ -484,7 +496,7 @@ PERMANENT CHANGES OF INITRD
|
|||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
On what distro is the floppy image based?
|
On what distro is the floppy image based?
|
||||||
None. Besides the boot loader ldlinux.sys, there are only three bina‐
|
None. Besides the boot loader ldlinux.sys, there are only three bina-
|
||||||
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
|
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
|
||||||
static. bzImage and busybox(1) have been compiled with carefully
|
static. bzImage and busybox(1) have been compiled with carefully
|
||||||
selected configuration parameters not found in any distro. This was
|
selected configuration parameters not found in any distro. This was
|
||||||
@ -494,7 +506,7 @@ FAQ
|
|||||||
Why is a rather old Linux kernel (3.12) used?
|
Why is a rather old Linux kernel (3.12) used?
|
||||||
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
|
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
|
||||||
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
|
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
|
||||||
boot. The floppy image is regularly tested with newer kernels. Every‐
|
boot. The floppy image is regularly tested with newer kernels. Every-
|
||||||
thing works except that you need to assign much more main memory to the
|
thing works except that you need to assign much more main memory to the
|
||||||
virtual machine.
|
virtual machine.
|
||||||
|
|
||||||
@ -513,7 +525,7 @@ FILES
|
|||||||
BUGS
|
BUGS
|
||||||
IPv6 cannot be configured with static or manual parameters.
|
IPv6 cannot be configured with static or manual parameters.
|
||||||
DHCPv6 is not supported.
|
DHCPv6 is not supported.
|
||||||
´ip route add ...' does not work. Use 'route add ...' instead.
|
'ip route add ...' does not work. Use 'route add ...' instead.
|
||||||
|
|
||||||
|
|
||||||
AUTHOR
|
AUTHOR
|
||||||
@ -533,4 +545,4 @@ SEE ALSO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hotbird64 October 2016 VLMCSD-FLOPPY(7)
|
Hotbird64 May 2017 VLMCSD-FLOPPY(7)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!-- Creator : groff version 1.22.3 -->
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
<!-- CreationDate: Mon Nov 28 01:28:23 2016 -->
|
<!-- CreationDate: Sat Oct 20 09:49:39 2018 -->
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
@ -282,9 +282,25 @@ started.</p>
|
|||||||
<p style="margin-left:11%;"><b>OFFICE2013=</b><i>epid</i></p>
|
<p style="margin-left:11%;"><b>OFFICE2013=</b><i>epid</i></p>
|
||||||
|
|
||||||
<p style="margin-left:22%;">Defines the ePID that is used
|
<p style="margin-left:22%;">Defines the ePID that is used
|
||||||
for Office (versions 2013 and greater) activations. If you
|
for Office 2016 activations. If you ommit this parameter,
|
||||||
ommit this parameter, <b>vlmcsd</b>(8) generates a random
|
<b>vlmcsd</b>(8) generates a random ePID when it is
|
||||||
ePID when it is started.</p>
|
started.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>OFFICE2016=</b><i>epid</i></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Defines the ePID that is used
|
||||||
|
for Office 2016 activations. If you ommit this parameter,
|
||||||
|
<b>vlmcsd</b>(8) generates a random ePID when it is
|
||||||
|
started.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>WINCHINAGOV=</b><i>epid</i></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Defines the ePID that is used
|
||||||
|
for Windows China Government Edition activations (Enterprise
|
||||||
|
G/GN). If you ommit this parameter, <b>vlmcsd</b>(8)
|
||||||
|
generates a random ePID when it is started.</p>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>HWID=</b><i>hwid</i></p>
|
<p style="margin-left:11%;"><b>HWID=</b><i>hwid</i></p>
|
||||||
|
|
||||||
|
Binary file not shown.
@ -8,12 +8,12 @@ NAME
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
floppy144.vfd is an image of a bootable floppy that contains a minimal
|
floppy144.vfd is an image of a bootable floppy that contains a minimal
|
||||||
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri‐
|
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri-
|
||||||
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
|
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
|
||||||
it easy to use vlmcsd(8) to activate the virtual machine's host com‐
|
it easy to use vlmcsd(8) to activate the virtual machine's host com-
|
||||||
puter which is not possible in Windows 8.1 and up. The floppy image is
|
puter which is not possible in Windows 8.1 and up. The floppy image is
|
||||||
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
|
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
|
||||||
FAT12 filesystem. The floppy can be mounted to apply several customiza‐
|
FAT12 filesystem. The floppy can be mounted to apply several customiza-
|
||||||
tions.
|
tions.
|
||||||
|
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ SETUP
|
|||||||
has floppy boot disabled by default). If possible, setup a virtual
|
has floppy boot disabled by default). If possible, setup a virtual
|
||||||
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
|
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
|
||||||
machine, enable the compatibility support mode (CSM) to allow a BIOS
|
machine, enable the compatibility support mode (CSM) to allow a BIOS
|
||||||
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa‐
|
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa-
|
||||||
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
|
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
|
||||||
Linux kernel can't handle this and ignores any devices connected to
|
Linux kernel can't handle this and ignores any devices connected to
|
||||||
these buses.
|
these buses.
|
||||||
@ -49,10 +49,10 @@ SETUP
|
|||||||
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
|
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
|
||||||
Selecting a paravirtualized driver slightly improves performance. In
|
Selecting a paravirtualized driver slightly improves performance. In
|
||||||
VirtualBox you can simply select virtio in the network configuration
|
VirtualBox you can simply select virtio in the network configuration
|
||||||
dialog. VMWare requires that you add or change the VMX file. Use 'eth‐
|
dialog. VMWare requires that you add or change the VMX file. Use 'eth-
|
||||||
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
|
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
|
||||||
|
|
||||||
If you are using QEMU, you must also setup a TAP adapter. Port redi‐
|
If you are using QEMU, you must also setup a TAP adapter. Port redi-
|
||||||
rection does not work to activate your own computer.
|
rection does not work to activate your own computer.
|
||||||
|
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ CONFIGURATION
|
|||||||
must be mounted. Under Linux you can simply attach floppy144.vfd to a
|
must be mounted. Under Linux you can simply attach floppy144.vfd to a
|
||||||
loop device which is mountable like any other block device. For Windows
|
loop device which is mountable like any other block device. For Windows
|
||||||
you must use some software that allows mounting a floppy image, e.g.
|
you must use some software that allows mounting a floppy image, e.g.
|
||||||
OSFMount ⟨http://www.osforensics.com/tools/mount-disk-images.html⟩
|
OSFMount <http://www.osforensics.com/tools/mount-disk-images.html>
|
||||||
|
|
||||||
OSFMount works under all Windows versions beginning with Windows XP up
|
OSFMount works under all Windows versions beginning with Windows XP up
|
||||||
to Windows 10 (32- and 64-bit).
|
to Windows 10 (32- and 64-bit).
|
||||||
@ -75,7 +75,7 @@ CONFIGURATION
|
|||||||
|
|
||||||
LABEL dhcp
|
LABEL dhcp
|
||||||
KERNEL bzImage
|
KERNEL bzImage
|
||||||
APPEND vga=773 quiet initrd=initrd KBD=us LIS‐
|
APPEND vga=773 quiet initrd=initrd KBD=us LIS-
|
||||||
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
|
||||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||||
@ -86,9 +86,9 @@ CONFIGURATION
|
|||||||
|
|
||||||
LABEL static
|
LABEL static
|
||||||
KERNEL bzImage
|
KERNEL bzImage
|
||||||
APPEND vga=773 quiet initrd=initrd KBD=fr LIS‐
|
APPEND vga=773 quiet initrd=initrd KBD=fr LIS-
|
||||||
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
|
||||||
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE‐
|
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE-
|
||||||
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
|
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
|
||||||
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
|
||||||
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
|
||||||
@ -98,7 +98,7 @@ CONFIGURATION
|
|||||||
There are two configurations in this files: dhcp (for configuring the
|
There are two configurations in this files: dhcp (for configuring the
|
||||||
IPv4 network via DHCP) and static (for a static IPv4 configuration).
|
IPv4 network via DHCP) and static (for a static IPv4 configuration).
|
||||||
The kernel always boots the dhcp configuration without asking (lines
|
The kernel always boots the dhcp configuration without asking (lines
|
||||||
'prompt 0' and 'default dhcp'). You can simply change the default con‐
|
'prompt 0' and 'default dhcp'). You can simply change the default con-
|
||||||
figuration to static and then customize the APPEND line in the static
|
figuration to static and then customize the APPEND line in the static
|
||||||
configuration. For more details how to customize the syslinux.cfg file
|
configuration. For more details how to customize the syslinux.cfg file
|
||||||
see syslinux(1).
|
see syslinux(1).
|
||||||
@ -108,11 +108,11 @@ CONFIGURATION
|
|||||||
|
|
||||||
|
|
||||||
vga=vesa-video-mode
|
vga=vesa-video-mode
|
||||||
Sets the VESA display mode for the virtual machine. The parame‐
|
Sets the VESA display mode for the virtual machine. The parame-
|
||||||
ter is not optional. If you ommit it, you will not see anything
|
ter is not optional. If you ommit it, you will not see anything
|
||||||
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
|
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
|
||||||
⟨https://en.wikipedia.org/wiki/
|
<https://en.wikipedia.org/wiki/
|
||||||
VESA_BIOS_Extensions#Linux_video_mode_numbers⟩ for more video
|
VESA_BIOS_Extensions#Linux_video_mode_numbers> for more video
|
||||||
modes. Note that all 16 color (4-bit) modes will not work. Use
|
modes. Note that all 16 color (4-bit) modes will not work. Use
|
||||||
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
|
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
|
||||||
16 Million colors) only. All modes above 1280x1024 are non-VESA-
|
16 Million colors) only. All modes above 1280x1024 are non-VESA-
|
||||||
@ -123,14 +123,14 @@ CONFIGURATION
|
|||||||
may omit quiet but it doesn't make much sense. The boot log is
|
may omit quiet but it doesn't make much sense. The boot log is
|
||||||
actually very verbose and scrolls away from screen quickly. If
|
actually very verbose and scrolls away from screen quickly. If
|
||||||
any errors occur during boot, they will be displayed even if
|
any errors occur during boot, they will be displayed even if
|
||||||
quiet is present in the APPEND line. You may evaluate the com‐
|
quiet is present in the APPEND line. You may evaluate the com-
|
||||||
plete boot log later by using the dmesg command or the menu on
|
plete boot log later by using the dmesg command or the menu on
|
||||||
/dev/tty8.
|
/dev/tty8.
|
||||||
|
|
||||||
|
|
||||||
initrd=initial-ram-disk-file
|
initrd=initial-ram-disk-file
|
||||||
This defines the initial ram disk that the kernel will read.
|
This defines the initial ram disk that the kernel will read.
|
||||||
There is only one initial ram disk on the floppy thus leave ini‐
|
There is only one initial ram disk on the floppy thus leave ini-
|
||||||
trd=initrd as it is.
|
trd=initrd as it is.
|
||||||
|
|
||||||
|
|
||||||
@ -176,9 +176,21 @@ CONFIGURATION
|
|||||||
|
|
||||||
|
|
||||||
OFFICE2013=epid
|
OFFICE2013=epid
|
||||||
Defines the ePID that is used for Office (versions 2013 and
|
Defines the ePID that is used for Office 2016 activations. If
|
||||||
greater) activations. If you ommit this parameter, vlmcsd(8)
|
you ommit this parameter, vlmcsd(8) generates a random ePID when
|
||||||
generates a random ePID when it is started.
|
it is started.
|
||||||
|
|
||||||
|
|
||||||
|
OFFICE2016=epid
|
||||||
|
Defines the ePID that is used for Office 2016 activations. If
|
||||||
|
you ommit this parameter, vlmcsd(8) generates a random ePID when
|
||||||
|
it is started.
|
||||||
|
|
||||||
|
|
||||||
|
WINCHINAGOV=epid
|
||||||
|
Defines the ePID that is used for Windows China Government Edi-
|
||||||
|
tion activations (Enterprise G/GN). If you ommit this parameter,
|
||||||
|
vlmcsd(8) generates a random ePID when it is started.
|
||||||
|
|
||||||
|
|
||||||
HWID=hwid
|
HWID=hwid
|
||||||
@ -190,8 +202,8 @@ CONFIGURATION
|
|||||||
|
|
||||||
TZ=posix-time-zone-string
|
TZ=posix-time-zone-string
|
||||||
Set the time zone to posix-time-zone-string. It must conform to
|
Set the time zone to posix-time-zone-string. It must conform to
|
||||||
the POSIX ⟨http://pubs.opengroup.org/onlinepubs/009695399/
|
the POSIX <http://pubs.opengroup.org/onlinepubs/009695399/
|
||||||
basedefs/xbd_chap08.html⟩ specification. Simplified time zone
|
basedefs/xbd_chap08.html> specification. Simplified time zone
|
||||||
strings like "Europe/London" or "America/Detroit" are not
|
strings like "Europe/London" or "America/Detroit" are not
|
||||||
allowed. This has the very simple reason that there is no space
|
allowed. This has the very simple reason that there is no space
|
||||||
on the floppy to store the time zone database.
|
on the floppy to store the time zone database.
|
||||||
@ -201,7 +213,7 @@ CONFIGURATION
|
|||||||
|
|
||||||
CET The standard (winter) time zone has the name CET.
|
CET The standard (winter) time zone has the name CET.
|
||||||
|
|
||||||
-1 The standard time zone is one hour east of UTC. Nega‐
|
-1 The standard time zone is one hour east of UTC. Nega-
|
||||||
tive numbers are east of UTC. Positive numbers are
|
tive numbers are east of UTC. Positive numbers are
|
||||||
west of UTC.
|
west of UTC.
|
||||||
|
|
||||||
@ -228,12 +240,12 @@ CONFIGURATION
|
|||||||
|
|
||||||
IPV4_CONFIG=DHCP | STATIC
|
IPV4_CONFIG=DHCP | STATIC
|
||||||
This determines how you want to configure IPv4 networking. If
|
This determines how you want to configure IPv4 networking. If
|
||||||
you use IPV4_CONFIG=STATIC, you must supply additional para‐
|
you use IPV4_CONFIG=STATIC, you must supply additional para-
|
||||||
maters to the APPEND command line.
|
maters to the APPEND command line.
|
||||||
|
|
||||||
|
|
||||||
IPV4_ADDRESS=ipv4-address/CIDR-mask
|
IPV4_ADDRESS=ipv4-address/CIDR-mask
|
||||||
Use ipv4-address with netmask CIDR-mask for static IPv4 configu‐
|
Use ipv4-address with netmask CIDR-mask for static IPv4 configu-
|
||||||
ration. The netmask must not be ommitted. For IPv4 address
|
ration. The netmask must not be ommitted. For IPv4 address
|
||||||
192.168.12.17 with a netmask of 255.255.255.0 use
|
192.168.12.17 with a netmask of 255.255.255.0 use
|
||||||
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
|
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
|
||||||
@ -245,7 +257,7 @@ CONFIGURATION
|
|||||||
Use ipv4-address as the default gateway. This is usually the
|
Use ipv4-address as the default gateway. This is usually the
|
||||||
IPv4 address of your router. You may specify NONE explicitly for
|
IPv4 address of your router. You may specify NONE explicitly for
|
||||||
no gateway. In this case your virtual machine is only visible on
|
no gateway. In this case your virtual machine is only visible on
|
||||||
its local LAN. This paramater is ignored, if you used IPV4_CON‐
|
its local LAN. This paramater is ignored, if you used IPV4_CON-
|
||||||
FIG=DHCP.
|
FIG=DHCP.
|
||||||
|
|
||||||
|
|
||||||
@ -262,9 +274,9 @@ CONFIGURATION
|
|||||||
|
|
||||||
IPV4_DNS2=ipv4-address | NONE
|
IPV4_DNS2=ipv4-address | NONE
|
||||||
Use ipv4-address as the secondary name server. It serves as a
|
Use ipv4-address as the secondary name server. It serves as a
|
||||||
backup if the primary name server is not available. Home net‐
|
backup if the primary name server is not available. Home net-
|
||||||
works often don't have a secondary name server. In this case set
|
works often don't have a secondary name server. In this case set
|
||||||
this to NONE. This paramater is ignored, if you used IPV4_CON‐
|
this to NONE. This paramater is ignored, if you used IPV4_CON-
|
||||||
FIG=DHCP.
|
FIG=DHCP.
|
||||||
|
|
||||||
|
|
||||||
@ -282,7 +294,7 @@ CONFIGURATION
|
|||||||
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
|
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
|
||||||
domain part of an FQDN will be replaced by that name. This host
|
domain part of an FQDN will be replaced by that name. This host
|
||||||
name or host part of an FQDN will not replaced by a host name
|
name or host part of an FQDN will not replaced by a host name
|
||||||
returned via DHCP. The host name is not important for the opera‐
|
returned via DHCP. The host name is not important for the opera-
|
||||||
tion of floppy144.vfd.
|
tion of floppy144.vfd.
|
||||||
|
|
||||||
|
|
||||||
@ -319,10 +331,10 @@ CONFIGURATION
|
|||||||
OPERATION
|
OPERATION
|
||||||
Diskless System
|
Diskless System
|
||||||
The floppy144.vfd virtual machine is a diskless system that works
|
The floppy144.vfd virtual machine is a diskless system that works
|
||||||
entirely from RAM. The file system is actually a RAM disk that is cre‐
|
entirely from RAM. The file system is actually a RAM disk that is cre-
|
||||||
ated from the initrd(4) file on the floppy image.
|
ated from the initrd(4) file on the floppy image.
|
||||||
|
|
||||||
Anything you'll do from inside the virtual machine, for instance edit‐
|
Anything you'll do from inside the virtual machine, for instance edit-
|
||||||
ing a config file, will be lost when you reboot the machine. So, if you
|
ing a config file, will be lost when you reboot the machine. So, if you
|
||||||
ever asked yourself if rm -fr / (root privileges required) really
|
ever asked yourself if rm -fr / (root privileges required) really
|
||||||
deletes all files from all mounted partitions, the floppy144.vfd VM is
|
deletes all files from all mounted partitions, the floppy144.vfd VM is
|
||||||
@ -338,7 +350,7 @@ OPERATION
|
|||||||
The kernel boots up very quickly and the init script (/sbin/init) waits
|
The kernel boots up very quickly and the init script (/sbin/init) waits
|
||||||
5 seconds. In these 5 seconds you can:
|
5 seconds. In these 5 seconds you can:
|
||||||
|
|
||||||
Press 'm' to manually enter the time zone and the IPv4 parame‐
|
Press 'm' to manually enter the time zone and the IPv4 parame-
|
||||||
ters. These will be queried interactively.
|
ters. These will be queried interactively.
|
||||||
Press 't' to manually enter the time zone only.
|
Press 't' to manually enter the time zone only.
|
||||||
Press 's' to escape to a shell.
|
Press 's' to escape to a shell.
|
||||||
@ -351,7 +363,7 @@ OPERATION
|
|||||||
|
|
||||||
Logging into the system
|
Logging into the system
|
||||||
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
|
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
|
||||||
to these logins, simply press ALT-F2 to ALT-F6. To return to the con‐
|
to these logins, simply press ALT-F2 to ALT-F6. To return to the con-
|
||||||
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
|
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
|
||||||
use telnet(1). This allows you use a terminal program (e.g. putty) that
|
use telnet(1). This allows you use a terminal program (e.g. putty) that
|
||||||
can utilize your keyboard layout, can be resized and has full UTF-8
|
can utilize your keyboard layout, can be resized and has full UTF-8
|
||||||
@ -369,7 +381,7 @@ OPERATION
|
|||||||
The menu system
|
The menu system
|
||||||
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
|
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
|
||||||
allows you performing some administrative tasks and to view various
|
allows you performing some administrative tasks and to view various
|
||||||
system information. It is mainly for users that do not have much expe‐
|
system information. It is mainly for users that do not have much expe-
|
||||||
rience with Unix commands.
|
rience with Unix commands.
|
||||||
|
|
||||||
|
|
||||||
@ -419,7 +431,7 @@ OPERATION
|
|||||||
|
|
||||||
8) Show TCP/IP configuration
|
8) Show TCP/IP configuration
|
||||||
Shows the TCP/IP configuration, listening sockets and current
|
Shows the TCP/IP configuration, listening sockets and current
|
||||||
TCP and UDP connections. Useful, if you problems with net con‐
|
TCP and UDP connections. Useful, if you problems with net con-
|
||||||
nectivity. The output is piped through less(1). So press 'q' to
|
nectivity. The output is piped through less(1). So press 'q' to
|
||||||
return to the menu.
|
return to the menu.
|
||||||
|
|
||||||
@ -431,7 +443,7 @@ OPERATION
|
|||||||
|
|
||||||
s) Shutdown
|
s) Shutdown
|
||||||
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
|
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
|
||||||
not required. It is ok to use a hard power off in your virtual‐
|
not required. It is ok to use a hard power off in your virtual-
|
||||||
ization program.
|
ization program.
|
||||||
|
|
||||||
|
|
||||||
@ -476,7 +488,7 @@ PERMANENT CHANGES OF INITRD
|
|||||||
works on almost any unix-like OS, it does not work on Windows even not
|
works on almost any unix-like OS, it does not work on Windows even not
|
||||||
with Cygwin. The reason is that the NTFS file system can't handle uids
|
with Cygwin. The reason is that the NTFS file system can't handle uids
|
||||||
and gids. These cannot be preserved when unpacking the cpio(1) archive
|
and gids. These cannot be preserved when unpacking the cpio(1) archive
|
||||||
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver‐
|
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver-
|
||||||
sary Update) and later, you must make sure to unpack the initrd(4) file
|
sary Update) and later, you must make sure to unpack the initrd(4) file
|
||||||
to a directory on VolFs (normally everything that is not mounted under
|
to a directory on VolFs (normally everything that is not mounted under
|
||||||
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
|
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
|
||||||
@ -484,7 +496,7 @@ PERMANENT CHANGES OF INITRD
|
|||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
On what distro is the floppy image based?
|
On what distro is the floppy image based?
|
||||||
None. Besides the boot loader ldlinux.sys, there are only three bina‐
|
None. Besides the boot loader ldlinux.sys, there are only three bina-
|
||||||
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
|
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
|
||||||
static. bzImage and busybox(1) have been compiled with carefully
|
static. bzImage and busybox(1) have been compiled with carefully
|
||||||
selected configuration parameters not found in any distro. This was
|
selected configuration parameters not found in any distro. This was
|
||||||
@ -494,7 +506,7 @@ FAQ
|
|||||||
Why is a rather old Linux kernel (3.12) used?
|
Why is a rather old Linux kernel (3.12) used?
|
||||||
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
|
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
|
||||||
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
|
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
|
||||||
boot. The floppy image is regularly tested with newer kernels. Every‐
|
boot. The floppy image is regularly tested with newer kernels. Every-
|
||||||
thing works except that you need to assign much more main memory to the
|
thing works except that you need to assign much more main memory to the
|
||||||
virtual machine.
|
virtual machine.
|
||||||
|
|
||||||
@ -513,7 +525,7 @@ FILES
|
|||||||
BUGS
|
BUGS
|
||||||
IPv6 cannot be configured with static or manual parameters.
|
IPv6 cannot be configured with static or manual parameters.
|
||||||
DHCPv6 is not supported.
|
DHCPv6 is not supported.
|
||||||
´ip route add ...' does not work. Use 'route add ...' instead.
|
'ip route add ...' does not work. Use 'route add ...' instead.
|
||||||
|
|
||||||
|
|
||||||
AUTHOR
|
AUTHOR
|
||||||
@ -533,4 +545,4 @@ SEE ALSO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hotbird64 October 2016 VLMCSD-FLOPPY(7)
|
Hotbird64 May 2017 VLMCSD-FLOPPY(7)
|
||||||
|
@ -19,7 +19,7 @@ DESCRIPTION
|
|||||||
KMS is a way to activate Microsoft products that was designed for
|
KMS is a way to activate Microsoft products that was designed for
|
||||||
medium and large businesses. In a standard SOHO environment you enter a
|
medium and large businesses. In a standard SOHO environment you enter a
|
||||||
product key during installation and then activate your product over the
|
product key during installation and then activate your product over the
|
||||||
Internet. This is done by sending a request to a server at micro‐
|
Internet. This is done by sending a request to a server at micro-
|
||||||
soft.com which then either grants or refuses activation.
|
soft.com which then either grants or refuses activation.
|
||||||
|
|
||||||
By entering a special key called General Volume License Key (GVLK),
|
By entering a special key called General Volume License Key (GVLK),
|
||||||
@ -28,13 +28,13 @@ DESCRIPTION
|
|||||||
usually resides in a company's intranet. vlmcsd is an independent open
|
usually resides in a company's intranet. vlmcsd is an independent open
|
||||||
source implementation of a KMS server that is available for everyone
|
source implementation of a KMS server that is available for everyone
|
||||||
while Microsoft gives their KMS server only to corporations that signed
|
while Microsoft gives their KMS server only to corporations that signed
|
||||||
a so called "Select contract". In addition vlmcsd never refuses activa‐
|
a so called "Select contract". In addition vlmcsd never refuses activa-
|
||||||
tion while the Microsoft KMS server only activates the products the
|
tion while the Microsoft KMS server only activates the products the
|
||||||
customer has paid for.
|
customer has paid for.
|
||||||
|
|
||||||
Product activation using vlmcsd is performed in three easy steps:
|
Product activation using vlmcsd is performed in three easy steps:
|
||||||
|
|
||||||
1) Run vlmcsd (or any other KMS emulator) on a computer in your net‐
|
1) Run vlmcsd (or any other KMS emulator) on a computer in your net-
|
||||||
work. This will be your KMS server. New users should simply run the
|
work. This will be your KMS server. New users should simply run the
|
||||||
program without any parameters. The defaults should fit the needs of
|
program without any parameters. The defaults should fit the needs of
|
||||||
most users.
|
most users.
|
||||||
@ -47,11 +47,11 @@ DESCRIPTION
|
|||||||
However, when it comes to the details, some things turn out to be more
|
However, when it comes to the details, some things turn out to be more
|
||||||
difficult than you might think.
|
difficult than you might think.
|
||||||
|
|
||||||
The most important thing to know is that KMS activation is not perma‐
|
The most important thing to know is that KMS activation is not perma-
|
||||||
nent. The computer remains activated for 180 days (30 or 45 days with
|
nent. The computer remains activated for 180 days (30 or 45 days with
|
||||||
consumer-only products). KMS activation however is not an evaluation
|
consumer-only products). KMS activation however is not an evaluation
|
||||||
license. You can repeat the activation anytime and as often as you like
|
license. You can repeat the activation anytime and as often as you like
|
||||||
to extend activation to another 180 days. This normally happens auto‐
|
to extend activation to another 180 days. This normally happens auto-
|
||||||
matically. For this to work, you have to ensure that a KMS server is
|
matically. For this to work, you have to ensure that a KMS server is
|
||||||
always reachable for the clients on your network.
|
always reachable for the clients on your network.
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ DESCRIPTION
|
|||||||
|
|
||||||
|
|
||||||
How to get a GVLK?
|
How to get a GVLK?
|
||||||
That is relatively simple. The GVLKs are published on Microsoft's Tech‐
|
That is relatively simple. The GVLKs are published on Microsoft's Tech-
|
||||||
net web site.
|
net web site.
|
||||||
|
|
||||||
Windows: http://technet.microsoft.com/en-us/library/jj612867.aspx
|
Windows: http://technet.microsoft.com/en-us/library/jj612867.aspx
|
||||||
@ -86,7 +86,7 @@ DESCRIPTION
|
|||||||
7B9N3-D94CG-YTVHR-QBPX3-RJP64 - Windows 8.1 Core N
|
7B9N3-D94CG-YTVHR-QBPX3-RJP64 - Windows 8.1 Core N
|
||||||
BB6NG-PQ82V-VRDPW-8XVD2-V8P66 - Windows 8.1 Core Single Language
|
BB6NG-PQ82V-VRDPW-8XVD2-V8P66 - Windows 8.1 Core Single Language
|
||||||
NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3 - Windows 8.1 Core Country Specific
|
NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3 - Windows 8.1 Core Country Specific
|
||||||
GNBB8-YVD74-QJHX6-27H4K-8QHDG - Windows 8 Professional with Media Cen‐
|
GNBB8-YVD74-QJHX6-27H4K-8QHDG - Windows 8 Professional with Media Cen-
|
||||||
ter
|
ter
|
||||||
BN3D2-R7TKB-3YPBD-8DRP2-27GG4 - Windows 8 Core
|
BN3D2-R7TKB-3YPBD-8DRP2-27GG4 - Windows 8 Core
|
||||||
8N2M2-HWPGY-7PGT9-HGDD8-GVGGY - Windows 8 Core N
|
8N2M2-HWPGY-7PGT9-HGDD8-GVGGY - Windows 8 Core N
|
||||||
@ -103,7 +103,7 @@ DESCRIPTION
|
|||||||
section.
|
section.
|
||||||
|
|
||||||
These are two Visual Basic script utilities that are used to control
|
These are two Visual Basic script utilities that are used to control
|
||||||
Microsoft's Software Protection system. To use them open a Windows Com‐
|
Microsoft's Software Protection system. To use them open a Windows Com-
|
||||||
mand Prompt. slmgr.vbs is for Windows. ospp.vbs is for Office 2010 and
|
mand Prompt. slmgr.vbs is for Windows. ospp.vbs is for Office 2010 and
|
||||||
2013. These utilities are installed with Windows and Office and you
|
2013. These utilities are installed with Windows and Office and you
|
||||||
don't need to download them.
|
don't need to download them.
|
||||||
@ -153,7 +153,7 @@ DESCRIPTION
|
|||||||
2) Type "cscript ospp.vbs /setprt:tcp-port". Example: cscript
|
2) Type "cscript ospp.vbs /setprt:tcp-port". Example: cscript
|
||||||
ospp.vbs /setprt:1688
|
ospp.vbs /setprt:1688
|
||||||
|
|
||||||
tcp-port is usually 1688 unless you instructed vlmcsd to use a differ‐
|
tcp-port is usually 1688 unless you instructed vlmcsd to use a differ-
|
||||||
ent port which is rarely necessary.
|
ent port which is rarely necessary.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!-- Creator : groff version 1.22.3 -->
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
<!-- CreationDate: Mon Nov 28 01:28:23 2016 -->
|
<!-- CreationDate: Sat Oct 20 09:49:39 2018 -->
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
BIN
man/vlmcsd.7.pdf
BIN
man/vlmcsd.7.pdf
Binary file not shown.
@ -19,7 +19,7 @@ DESCRIPTION
|
|||||||
KMS is a way to activate Microsoft products that was designed for
|
KMS is a way to activate Microsoft products that was designed for
|
||||||
medium and large businesses. In a standard SOHO environment you enter a
|
medium and large businesses. In a standard SOHO environment you enter a
|
||||||
product key during installation and then activate your product over the
|
product key during installation and then activate your product over the
|
||||||
Internet. This is done by sending a request to a server at micro‐
|
Internet. This is done by sending a request to a server at micro-
|
||||||
soft.com which then either grants or refuses activation.
|
soft.com which then either grants or refuses activation.
|
||||||
|
|
||||||
By entering a special key called General Volume License Key (GVLK),
|
By entering a special key called General Volume License Key (GVLK),
|
||||||
@ -28,13 +28,13 @@ DESCRIPTION
|
|||||||
usually resides in a company's intranet. vlmcsd is an independent open
|
usually resides in a company's intranet. vlmcsd is an independent open
|
||||||
source implementation of a KMS server that is available for everyone
|
source implementation of a KMS server that is available for everyone
|
||||||
while Microsoft gives their KMS server only to corporations that signed
|
while Microsoft gives their KMS server only to corporations that signed
|
||||||
a so called "Select contract". In addition vlmcsd never refuses activa‐
|
a so called "Select contract". In addition vlmcsd never refuses activa-
|
||||||
tion while the Microsoft KMS server only activates the products the
|
tion while the Microsoft KMS server only activates the products the
|
||||||
customer has paid for.
|
customer has paid for.
|
||||||
|
|
||||||
Product activation using vlmcsd is performed in three easy steps:
|
Product activation using vlmcsd is performed in three easy steps:
|
||||||
|
|
||||||
1) Run vlmcsd (or any other KMS emulator) on a computer in your net‐
|
1) Run vlmcsd (or any other KMS emulator) on a computer in your net-
|
||||||
work. This will be your KMS server. New users should simply run the
|
work. This will be your KMS server. New users should simply run the
|
||||||
program without any parameters. The defaults should fit the needs of
|
program without any parameters. The defaults should fit the needs of
|
||||||
most users.
|
most users.
|
||||||
@ -47,11 +47,11 @@ DESCRIPTION
|
|||||||
However, when it comes to the details, some things turn out to be more
|
However, when it comes to the details, some things turn out to be more
|
||||||
difficult than you might think.
|
difficult than you might think.
|
||||||
|
|
||||||
The most important thing to know is that KMS activation is not perma‐
|
The most important thing to know is that KMS activation is not perma-
|
||||||
nent. The computer remains activated for 180 days (30 or 45 days with
|
nent. The computer remains activated for 180 days (30 or 45 days with
|
||||||
consumer-only products). KMS activation however is not an evaluation
|
consumer-only products). KMS activation however is not an evaluation
|
||||||
license. You can repeat the activation anytime and as often as you like
|
license. You can repeat the activation anytime and as often as you like
|
||||||
to extend activation to another 180 days. This normally happens auto‐
|
to extend activation to another 180 days. This normally happens auto-
|
||||||
matically. For this to work, you have to ensure that a KMS server is
|
matically. For this to work, you have to ensure that a KMS server is
|
||||||
always reachable for the clients on your network.
|
always reachable for the clients on your network.
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ DESCRIPTION
|
|||||||
|
|
||||||
|
|
||||||
How to get a GVLK?
|
How to get a GVLK?
|
||||||
That is relatively simple. The GVLKs are published on Microsoft's Tech‐
|
That is relatively simple. The GVLKs are published on Microsoft's Tech-
|
||||||
net web site.
|
net web site.
|
||||||
|
|
||||||
Windows: http://technet.microsoft.com/en-us/library/jj612867.aspx
|
Windows: http://technet.microsoft.com/en-us/library/jj612867.aspx
|
||||||
@ -86,7 +86,7 @@ DESCRIPTION
|
|||||||
7B9N3-D94CG-YTVHR-QBPX3-RJP64 - Windows 8.1 Core N
|
7B9N3-D94CG-YTVHR-QBPX3-RJP64 - Windows 8.1 Core N
|
||||||
BB6NG-PQ82V-VRDPW-8XVD2-V8P66 - Windows 8.1 Core Single Language
|
BB6NG-PQ82V-VRDPW-8XVD2-V8P66 - Windows 8.1 Core Single Language
|
||||||
NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3 - Windows 8.1 Core Country Specific
|
NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3 - Windows 8.1 Core Country Specific
|
||||||
GNBB8-YVD74-QJHX6-27H4K-8QHDG - Windows 8 Professional with Media Cen‐
|
GNBB8-YVD74-QJHX6-27H4K-8QHDG - Windows 8 Professional with Media Cen-
|
||||||
ter
|
ter
|
||||||
BN3D2-R7TKB-3YPBD-8DRP2-27GG4 - Windows 8 Core
|
BN3D2-R7TKB-3YPBD-8DRP2-27GG4 - Windows 8 Core
|
||||||
8N2M2-HWPGY-7PGT9-HGDD8-GVGGY - Windows 8 Core N
|
8N2M2-HWPGY-7PGT9-HGDD8-GVGGY - Windows 8 Core N
|
||||||
@ -103,7 +103,7 @@ DESCRIPTION
|
|||||||
section.
|
section.
|
||||||
|
|
||||||
These are two Visual Basic script utilities that are used to control
|
These are two Visual Basic script utilities that are used to control
|
||||||
Microsoft's Software Protection system. To use them open a Windows Com‐
|
Microsoft's Software Protection system. To use them open a Windows Com-
|
||||||
mand Prompt. slmgr.vbs is for Windows. ospp.vbs is for Office 2010 and
|
mand Prompt. slmgr.vbs is for Windows. ospp.vbs is for Office 2010 and
|
||||||
2013. These utilities are installed with Windows and Office and you
|
2013. These utilities are installed with Windows and Office and you
|
||||||
don't need to download them.
|
don't need to download them.
|
||||||
@ -153,7 +153,7 @@ DESCRIPTION
|
|||||||
2) Type "cscript ospp.vbs /setprt:tcp-port". Example: cscript
|
2) Type "cscript ospp.vbs /setprt:tcp-port". Example: cscript
|
||||||
ospp.vbs /setprt:1688
|
ospp.vbs /setprt:1688
|
||||||
|
|
||||||
tcp-port is usually 1688 unless you instructed vlmcsd to use a differ‐
|
tcp-port is usually 1688 unless you instructed vlmcsd to use a differ-
|
||||||
ent port which is rarely necessary.
|
ent port which is rarely necessary.
|
||||||
|
|
||||||
|
|
||||||
|
78
man/vlmcsd.8
78
man/vlmcsd.8
@ -1,5 +1,5 @@
|
|||||||
.mso www.tmac
|
.mso www.tmac
|
||||||
.TH VLMCSD 8 "November 2016" "Hotbird64" "KMS Activation Manual"
|
.TH VLMCSD 8 "October 2018" "Hotbird64" "KMS Activation Manual"
|
||||||
.LO 8
|
.LO 8
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -27,7 +27,7 @@ The followong features that require that vlmcsd is permanently loaded will not w
|
|||||||
You cannot maintain a client list (option \fB-M1\fR)
|
You cannot maintain a client list (option \fB-M1\fR)
|
||||||
|
|
||||||
.IP
|
.IP
|
||||||
EPID Randomization Level 1 (option \fB-r1\fR) works like Level 2 (\fB-r2\fR). You may want to use Level 0 (\fB-r0\fR) or custom EPIDs (options \fB-w\fR, \fB-0\fR, \fB-3\fR and \fB-6\fR) instead.
|
EPID Randomization Level 1 (option \fB-r1\fR) works like Level 2 (\fB-r2\fR). You may want to use Level 0 (\fB-r0\fR) or custom EPIDs (options \fB-w\fR, \fB-G\fR, \fB-0\fR, \fB-3\fR and \fB-6\fR) instead.
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
Since vlmcsd can be configured at compile time, some options may not be available on your system.
|
Since vlmcsd can be configured at compile time, some options may not be available on your system.
|
||||||
@ -76,10 +76,45 @@ in the 32-bit ABI of the 64-bit kernel. If you have a 64-bit FreeBSD kernel, you
|
|||||||
If vlmcsd was started by an internet superserver or was compiled to use Microsoft RPC (Windows only) or simple sockets, \fB-o1\fR and \fB-o3\fR are not available by design.
|
If vlmcsd was started by an internet superserver or was compiled to use Microsoft RPC (Windows only) or simple sockets, \fB-o1\fR and \fB-o3\fR are not available by design.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.IP "\fB-P\fR \fIport"
|
.IP "\fB-P\fR \fIport\fR"
|
||||||
Use TCP \fIport\fR for all subsequent \fB-L\fR statements that do not include an optional port. If you use \fB-P\fR and \fB-L\fR, \fB-P\fR must be specified before \fB-L\fR.
|
Use TCP \fIport\fR for all subsequent \fB-L\fR statements that do not include an optional port. If you use \fB-P\fR and \fB-L\fR, \fB-P\fR must be specified before \fB-L\fR.
|
||||||
|
|
||||||
.IP "\fB-F0\fR and \fB-F1\fR
|
.IP "\fB-O\fR \fIvpn-adapter-name\fR[=\fIipv4-address\fR][/\fIcidr-mask\fR][:\fIdhcp-lease-duration\fR]"
|
||||||
|
Enables a compatible VPN adapter to create additional local IPv4 addresses (like 127.0.0.1) that appear as remote IPv4 addresses to the system. This allows product activation using a local instance of vlmcsd. This feature is only available in Windows and Cygwin builds of vlmcsd since it is not of any use on other operating systems. Compatible VPN adapters are Tap-windows version 8.2 or higher (from OpenVPN) and the TeamViewer VPN adapter. There are two special \fIvpn-adapter-name\fRs. A single period (.) instructs vlmcsd to use the first available compatible VPN adapter. A single dash (\-) disables the use of a VPN adapter if one has been configured in \fBvlmcsd.ini\fR(5). The \fIvpn-adapter-name\fR is \fBnot\fR case-sensitive. If the \fIvpn-adapter-name\fR contains spaces (e.g. Ethernet 3), you must enclose it in quotes.
|
||||||
|
|
||||||
|
The default \fIipv4-address\fR is 10.10.10.9 and the default \fIcidr-mask\fR is 30. If you are using the default values, your VPN adapter uses an IPv4 address of 10.10.10.9 and you can set your activation client to use the easy to remember address 10.10.10.10 (e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs /sethst:10.10.10.10).
|
||||||
|
|
||||||
|
The \fIdhcp-lease-duration\fR is a number optionally followed by s, m, h, d or w to indicate seconds, minutes, hours, days or weeks. The default \fIdhcp-lease-duration\fR is 1d (one day). It is normally not required to change this value.
|
||||||
|
|
||||||
|
It is advised not to manually configure your OpenVPN TAP or TeamViewer VPN adapter in "Network Connections". If you set the IPv4 configuration manually anyway, the IPv4 address and the subnet mask must match the \fB-O\fR parameter. It is safe leave the IPv4 configuration to automatic (DHCP). vlmcsd will wait up to four seconds for the DHCP configuration to complete before binding to and listenin on any interfaces.
|
||||||
|
|
||||||
|
You should be aware that only one program can use a VPN adapter at a time. If you use the TeamViewer VPN adapter for example, you will not be able to use the VPN feature of TeamViewer as long as vlmcsd is running. The same applies to OpenVPN TAP adapters that are in use by other programs (for example OpenVPN, QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid conflicts is to install Tap-Windows from OpenVPN, cd to C:\\Program Files\\TAP-Windows\\bin and run addtap.bat to install an additional TAP adapter. Go to "Network Connections" and rename the new adapter to "vlmcsd" and specify \fB-O vlmcsd\fR to use it.
|
||||||
|
|
||||||
|
Example: \fB-O "Ethernet 7"=192.168.123.1/24\fR (uses VPN adapter Ethernet 7 with IPv4 address 192.168.123.1 and have 192.168.123.2 to 192.168.123.254 as additional local (but apparently remote) IPv4 addresses.
|
||||||
|
|
||||||
|
.IP "\fB-x0\fR and \fB-x1\fR"
|
||||||
|
Controls under what circumstances vlmcsd will exit. Using the default of \fB-x0\fR vlmcsd stays active as long as it can perform some useful operations. If vlmcsd is run by any form of a watchdog, e.g. NT service manager (Windows), systemd (Linux) or launchd (Mac OS / iOS), it may be desirable to end vlmcsd and let the watchdog restart it. This is especially true if some pre-requisites are not yet met but will be some time later, e.g. network is not yet fully setup.
|
||||||
|
|
||||||
|
By using \fB-x0\fR vlmcsd will
|
||||||
|
|
||||||
|
.RS 12
|
||||||
|
exit if none of the listening sockets specified with \fB-L\fR can be used. It continues if at least one socket can be setup for listening.
|
||||||
|
|
||||||
|
exit any TAP mirror thread (Windows version only) if there is an error condition while reading or writing from or to the VPN adapter but continue to work without utilizing a VPN adapter.
|
||||||
|
.RE
|
||||||
|
.IP
|
||||||
|
By using \fB-x1\fR vlmcsd will
|
||||||
|
|
||||||
|
.RS 12
|
||||||
|
exit if not all listening sockets specified with \fB-L\fR can be used.
|
||||||
|
|
||||||
|
exit completely if there is a problem with a VPN adapter it is using. This can happen for instance if the VPN adapter has been disabled using "Control Panel - Network - Adapter Settings" while vlmcsd is using it.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.IP
|
||||||
|
Please note that \fB-x1\fR is kind of a workaround option. While it may help under some circumstances, it is better to solve the problem at its origin, e.g. properly implementing dependencies in your startup script to ensure all network interfaces and the VPN adapter you will use are completely setup before you start vlmcsd.
|
||||||
|
|
||||||
|
.IP "\fB-F0\fR and \fB-F1\fR"
|
||||||
Allow (\fB-F1\fR) or disallow (\fB-F0\fR) binding to IP addresses that are currently not configured on your system. The default is \fB-F0\fR. \fB-F1\fR allows you to bind to an IP address that may be configured after you started \fBvlmcsd\fR. \fBvlmcsd\fR will listen on that address as soon as it becomes available. This feature is only available under Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows this feature only for the root user (more correctly: processes that have the PRIV_NETINET_BINDANY privilege). Linux does not require a capability for this.
|
Allow (\fB-F1\fR) or disallow (\fB-F0\fR) binding to IP addresses that are currently not configured on your system. The default is \fB-F0\fR. \fB-F1\fR allows you to bind to an IP address that may be configured after you started \fBvlmcsd\fR. \fBvlmcsd\fR will listen on that address as soon as it becomes available. This feature is only available under Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows this feature only for the root user (more correctly: processes that have the PRIV_NETINET_BINDANY privilege). Linux does not require a capability for this.
|
||||||
|
|
||||||
.IP "\fB-t\fR \fIseconds\fR"
|
.IP "\fB-t\fR \fIseconds\fR"
|
||||||
@ -138,28 +173,10 @@ The actual security context switch is performed after the TCP sockets have been
|
|||||||
.IP
|
.IP
|
||||||
However if you use an ini, pid or log file, you must ensure that the unprivileged user has access to these files. You can always log to \fBsyslog\fR(3) from an unprivileged account on most platforms (see \fB-l\fR).
|
However if you use an ini, pid or log file, you must ensure that the unprivileged user has access to these files. You can always log to \fBsyslog\fR(3) from an unprivileged account on most platforms (see \fB-l\fR).
|
||||||
|
|
||||||
.IP "\fB-w\fR \fIePID\fR"
|
.IP "\fB-a\fR \fICSVLK\fR = \fIePID\fR [ / \fIHwId\fR ]"
|
||||||
Use \fIePID\fR as Windows ePID. If specified, \fB-r\fR is disregarded for Windows.
|
Use \fIePID\fR and \fIHwId\fR for a specific \fICSVLK\fR. When you use it, \fB-r\fR is disregarded for this \fICSVLK\fR. If vlmcsd uses the default vlmcsd.kmd database, you can use the following \fICSVLK\fRs: Windows, WinChinaGov, Office2010, Office2013, Office2016 and Office2019. The \fB-a\fR option requires that database version 1.6 or later is used.
|
||||||
|
|
||||||
.IP "\fB-0\fR \fIePID\fR"
|
\fIHwId\fR must be specified as 16 hex digits that are interpreted as a series of 8 bytes (big endian). Any character that is not a hex digit will be ignored. This is for better readability.
|
||||||
Use \fIePID\fR as Office 2010 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2010.
|
|
||||||
|
|
||||||
.IP "\fB-3\fR \fIePID\fR"
|
|
||||||
Use \fIePID\fR as Office 2013 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2013.
|
|
||||||
|
|
||||||
.IP "\fB-6\fR \fIePID\fR"
|
|
||||||
Use \fIePID\fR as Office 2016 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2016.
|
|
||||||
|
|
||||||
.IP "\fB-H\fR \fIHwId\fR"
|
|
||||||
Use \fIHwId\fR for all products. All HWIDs in the ini file (see \fB-i\fR) will not be used. In an ini file you can specify a seperate HWID for each \fIapplication-guid\fR. This is not possible when entering a HWID from the command line.
|
|
||||||
|
|
||||||
\fIHwId\fR must be specified as 16 hex digits that are interpreted as a series of 8 bytes (big endian). Any character that is not a hex digit will be ignored. This is for better readability. The following commands are identical:
|
|
||||||
|
|
||||||
vlmcsd -H 0123456789ABCDEF
|
|
||||||
.br
|
|
||||||
vlmcsd -H 01:23:45:67:89:ab:cd:ef
|
|
||||||
.br
|
|
||||||
vlmcsd -H "01 23 45 67 89 AB CD EF"
|
|
||||||
|
|
||||||
.IP "\fB-i\fR \fIfilename\fR"
|
.IP "\fB-i\fR \fIfilename\fR"
|
||||||
Use configuration file (aka ini file) \fIfilename\fR. Most configuration parameters can be set either via the command line or an ini file. The command line always has precedence over configuration items in the ini file. See \fBvlmcsd.ini\fR(5) for the format of the configuration file.
|
Use configuration file (aka ini file) \fIfilename\fR. Most configuration parameters can be set either via the command line or an ini file. The command line always has precedence over configuration items in the ini file. See \fBvlmcsd.ini\fR(5) for the format of the configuration file.
|
||||||
@ -186,7 +203,7 @@ These options determine how ePIDs are generated if
|
|||||||
|
|
||||||
\fB-r1\fR instructs vlmcsd to generate random ePIDs when the program starts or receives a SIGHUP signal and uses these ePIDs until it is stopped or receives another SIGHUP. Most other KMS emulators generate a new ePID on every KMS request. This is easily detectable. Microsoft could just modify sppsvc.exe in a way that it always sends two identical KMS requests in two RPC requests but over the same TCP connection. If both KMS responses contain the different ePIDs, the KMS server is not genuine. \fB-r1\fR is the default mode. \fB-r1\fR also ensures that all three ePIDs (Windows, Office 2010 and Office 2013) use the same OS build number and LCID (language id).
|
\fB-r1\fR instructs vlmcsd to generate random ePIDs when the program starts or receives a SIGHUP signal and uses these ePIDs until it is stopped or receives another SIGHUP. Most other KMS emulators generate a new ePID on every KMS request. This is easily detectable. Microsoft could just modify sppsvc.exe in a way that it always sends two identical KMS requests in two RPC requests but over the same TCP connection. If both KMS responses contain the different ePIDs, the KMS server is not genuine. \fB-r1\fR is the default mode. \fB-r1\fR also ensures that all three ePIDs (Windows, Office 2010 and Office 2013) use the same OS build number and LCID (language id).
|
||||||
|
|
||||||
If vlmcsd has been started by an internet superserver, \fB-r1\fR works almost identically to \fB-r2\fR. The only exception occurs if you send more than one activation request over the same TCP connection. This is simply due to the fact that vlmcsd is started upon a connection request and does not stay in memory after servicing a KMS request. Consider using \fB-r0\fR or \fB-w\fR, \fB-0\fR, \fB-3\fR and \fB-6\fB when starting vlmcsd by an internet superserver.
|
If vlmcsd has been started by an internet superserver, \fB-r1\fR works almost identically to \fB-r2\fR. The only exception occurs if you send more than one activation request over the same TCP connection. This is simply due to the fact that vlmcsd is started upon a connection request and does not stay in memory after servicing a KMS request. Consider using \fB-r0\fR or \fB-w\fR, \fB-G\fR, \fB-0\fR, \fB-3\fR and \fB-6\fR when starting vlmcsd by an internet superserver.
|
||||||
|
|
||||||
\fB-r2\fR behaves like most other KMS server emulators with random support and generates a new random ePID on every request. \fB-r2\fR should be treated as debugging option only because it allows very easy emulator detection.
|
\fB-r2\fR behaves like most other KMS server emulators with random support and generates a new random ePID on every request. \fB-r2\fR should be treated as debugging option only because it allows very easy emulator detection.
|
||||||
|
|
||||||
@ -199,6 +216,9 @@ for a list of valid \fILCID\fRs. Please note that some of them are not recognize
|
|||||||
|
|
||||||
Most other KMS emulators use a fixed \fILCID\fR of 1033 (English - US). To achive the same behavior in vlmcsd use \fB-C 1033\fR.
|
Most other KMS emulators use a fixed \fILCID\fR of 1033 (English - US). To achive the same behavior in vlmcsd use \fB-C 1033\fR.
|
||||||
|
|
||||||
|
.IP "\fB-H\fR \fIHostBuild\fR"
|
||||||
|
Do not randomize the host build number in the ePID and use \fIHostBuild\fR instead, for instance 17763 for Windows Server 2019 / Windows 10 1809.
|
||||||
|
|
||||||
.IP "\fB-K0\fR, \fB-K1\fR, \fB-K2\fR and \fB-K3\fR"
|
.IP "\fB-K0\fR, \fB-K1\fR, \fB-K2\fR and \fB-K3\fR"
|
||||||
Sets the whitelisting level to determine which products vlmcsd activates or refuses. The default is \fB-K0\fR.
|
Sets the whitelisting level to determine which products vlmcsd activates or refuses. The default is \fB-K0\fR.
|
||||||
|
|
||||||
@ -286,13 +306,13 @@ If you used a pid file, it is not deleted and recreated because the process id s
|
|||||||
If you used the 'user' and/or 'group' directive in an ini file these are ignored. This is because once you switched to lower privileged users and groups, there is no way back. Anything else would be a severe security flaw in the OS.
|
If you used the 'user' and/or 'group' directive in an ini file these are ignored. This is because once you switched to lower privileged users and groups, there is no way back. Anything else would be a severe security flaw in the OS.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
Signaling is not available in the native Windows version and in the Cygwin version when it runs as Windows service.
|
Signaling is not available in the native Windows version and in the Cygwin version when vlmcsd runs as a Windows service.
|
||||||
|
|
||||||
.SH SUPPORTED OPERATING SYSTEMS
|
.SH SUPPORTED OPERATING SYSTEMS
|
||||||
\fBvlmcsd\fR compiles and runs on Linux, Windows (no Cygwin required but explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or unixoid OSses may work with unmodified sources or may require minor porting efforts.
|
\fBvlmcsd\fR compiles and runs on Linux, Windows (no Cygwin required but explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or unixoid OSses may work with unmodified sources or may require minor porting efforts.
|
||||||
|
|
||||||
.SH SUPPORTED PRODUCTS
|
.SH SUPPORTED PRODUCTS
|
||||||
\fBvlmcsd\fR can answer activation requests for the following products: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1607), Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010, Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016. Newer version may work as long as the KMS protocol does not change. A complete list of fully supported products can be obtained using the \fB-x\fR option of \fBvlmcs\fR(1).
|
\fBvlmcsd\fR can answer activation requests for the following products: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1703), Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010, Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016. Newer products may work as long as the KMS protocol does not change. A complete list of fully supported products can be obtained using the \fB-x\fR option of \fBvlmcs\fR(1).
|
||||||
.PP
|
.PP
|
||||||
Office, Project and Visio must be volume license versions.
|
Office, Project and Visio must be volume license versions.
|
||||||
|
|
||||||
@ -320,7 +340,7 @@ Written by crony12, Hotbird64 and vityan666.
|
|||||||
With contributions from DougQaid.
|
With contributions from DougQaid.
|
||||||
|
|
||||||
.SH CREDITS
|
.SH CREDITS
|
||||||
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
|
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
\fBvlmcsd.ini\fR(5), \fBvlmcsd\fR(7), \fBvlmcs\fR(1), \fBvlmcsdmulti\fR(1)
|
\fBvlmcsd.ini\fR(5), \fBvlmcsd\fR(7), \fBvlmcs\fR(1), \fBvlmcsdmulti\fR(1)
|
||||||
|
@ -36,7 +36,7 @@ DESCRIPTION
|
|||||||
client on stdin that wants to be activated.
|
client on stdin that wants to be activated.
|
||||||
|
|
||||||
All options that control setting up listening sockets will be ignored
|
All options that control setting up listening sockets will be ignored
|
||||||
when in inetd mode. The sockets will be set up by your internet super‐
|
when in inetd mode. The sockets will be set up by your internet super-
|
||||||
server. You also cannot limit the number of simultanous clients (option
|
server. You also cannot limit the number of simultanous clients (option
|
||||||
-m). You need to configure the limit in your internet superserver.
|
-m). You need to configure the limit in your internet superserver.
|
||||||
|
|
||||||
@ -49,14 +49,14 @@ DESCRIPTION
|
|||||||
|
|
||||||
EPID Randomization Level 1 (option -r1) works like Level 2
|
EPID Randomization Level 1 (option -r1) works like Level 2
|
||||||
(-r2). You may want to use Level 0 (-r0) or custom EPIDs
|
(-r2). You may want to use Level 0 (-r0) or custom EPIDs
|
||||||
(options -w, -0, -3 and -6) instead.
|
(options -w, -G, -0, -3 and -6) instead.
|
||||||
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
Since vlmcsd can be configured at compile time, some options may not be
|
Since vlmcsd can be configured at compile time, some options may not be
|
||||||
available on your system.
|
available on your system.
|
||||||
|
|
||||||
All options that do no require an argument may be combined with a sin‐
|
All options that do no require an argument may be combined with a sin-
|
||||||
gle dash, for instance "vlmcsd -D -e" is identical to "vlmcsd -De". For
|
gle dash, for instance "vlmcsd -D -e" is identical to "vlmcsd -De". For
|
||||||
all options that require an argument a space between the option and the
|
all options that require an argument a space between the option and the
|
||||||
option argument is optional. Thus "vlmcsd -r 2" and "vlmcsd -r2" are
|
option argument is optional. Thus "vlmcsd -r 2" and "vlmcsd -r2" are
|
||||||
@ -67,7 +67,7 @@ OPTIONS
|
|||||||
Displays help.
|
Displays help.
|
||||||
|
|
||||||
|
|
||||||
-V Displays extended version information. This includes the com‐
|
-V Displays extended version information. This includes the com-
|
||||||
piler used to build vlmcsd, the intended platform and flags
|
piler used to build vlmcsd, the intended platform and flags
|
||||||
(compile time options) to build vlmcsd. If you have the source
|
(compile time options) to build vlmcsd. If you have the source
|
||||||
code of vlmcsd, you can type make help (or gmake help on systems
|
code of vlmcsd, you can type make help (or gmake help on systems
|
||||||
@ -103,7 +103,7 @@ OPTIONS
|
|||||||
Sets the level of protection against activations from public IP
|
Sets the level of protection against activations from public IP
|
||||||
addresses. The default is -o0 for no protection.
|
addresses. The default is -o0 for no protection.
|
||||||
|
|
||||||
-o1 causes vlmcsd not to listen on all IP addresses but on pri‐
|
-o1 causes vlmcsd not to listen on all IP addresses but on pri-
|
||||||
vate IP addresses only. IPv4 addresses in the 100.64.0.0/10
|
vate IP addresses only. IPv4 addresses in the 100.64.0.0/10
|
||||||
range (see RFC6598) are not treated as private since they can be
|
range (see RFC6598) are not treated as private since they can be
|
||||||
reached from other users of your ISP. Private IPv4 addresses are
|
reached from other users of your ISP. Private IPv4 addresses are
|
||||||
@ -129,7 +129,7 @@ OPTIONS
|
|||||||
a single byte sent over the connection. This protects against
|
a single byte sent over the connection. This protects against
|
||||||
clients with public IP addresses even if NAT port forwarding is
|
clients with public IP addresses even if NAT port forwarding is
|
||||||
used. While -o2 offers a higher level of protection than -o1,
|
used. While -o2 offers a higher level of protection than -o1,
|
||||||
the client sees that the KMS TCP port (1688 by default) is actu‐
|
the client sees that the KMS TCP port (1688 by default) is actu-
|
||||||
ally accepting connections.
|
ally accepting connections.
|
||||||
|
|
||||||
If vlmcsd is compiled to use MS RPC, -o2 can only offer very
|
If vlmcsd is compiled to use MS RPC, -o2 can only offer very
|
||||||
@ -153,12 +153,12 @@ OPTIONS
|
|||||||
|
|
||||||
-o1 (and thus -o3) is not (yet) available in some scenarios:
|
-o1 (and thus -o3) is not (yet) available in some scenarios:
|
||||||
|
|
||||||
FreeBSD: There is a longtime unfixed bug ⟨https://
|
FreeBSD: There is a longtime unfixed bug <https://
|
||||||
bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881⟩ in the
|
bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881> in the
|
||||||
32-bit ABI of the 64-bit kernel. If you have a 64-bit Free‐
|
32-bit ABI of the 64-bit kernel. If you have a 64-bit Free-
|
||||||
BSD kernel, you must run the 64-bit version of vlmcsd if
|
BSD kernel, you must run the 64-bit version of vlmcsd if
|
||||||
you use -o1 or -o3. The 32-bit version causes undefined
|
you use -o1 or -o3. The 32-bit version causes undefined
|
||||||
behavior up to crashing vlmcsd. Other BSDs (NetBSD, Open‐
|
behavior up to crashing vlmcsd. Other BSDs (NetBSD, Open-
|
||||||
BSD, Dragonfly and Mac OS X) work correctly.
|
BSD, Dragonfly and Mac OS X) work correctly.
|
||||||
|
|
||||||
If vlmcsd was started by an internet superserver or was
|
If vlmcsd was started by an internet superserver or was
|
||||||
@ -168,53 +168,145 @@ OPTIONS
|
|||||||
|
|
||||||
-P port
|
-P port
|
||||||
Use TCP port for all subsequent -L statements that do not
|
Use TCP port for all subsequent -L statements that do not
|
||||||
include an optional port. If you use -P and -L, -P must be spec‐
|
include an optional port. If you use -P and -L, -P must be spec-
|
||||||
ified before -L.
|
ified before -L.
|
||||||
|
|
||||||
|
|
||||||
|
-O vpn-adapter-name[=ipv4-address][/cidr-mask][:dhcp-lease-duration]
|
||||||
|
Enables a compatible VPN adapter to create additional local IPv4
|
||||||
|
addresses (like 127.0.0.1) that appear as remote IPv4 addresses
|
||||||
|
to the system. This allows product activation using a local
|
||||||
|
instance of vlmcsd. This feature is only available in Windows
|
||||||
|
and Cygwin builds of vlmcsd since it is not of any use on other
|
||||||
|
operating systems. Compatible VPN adapters are Tap-windows ver-
|
||||||
|
sion 8.2 or higher (from OpenVPN) and the TeamViewer VPN
|
||||||
|
adapter. There are two special vpn-adapter-names. A single
|
||||||
|
period (.) instructs vlmcsd to use the first available compati-
|
||||||
|
ble VPN adapter. A single dash (-) disables the use of a VPN
|
||||||
|
adapter if one has been configured in vlmcsd.ini(5). The vpn-
|
||||||
|
adapter-name is not case-sensitive. If the vpn-adapter-name con-
|
||||||
|
tains spaces (e.g. Ethernet 3), you must enclose it in quotes.
|
||||||
|
|
||||||
|
The default ipv4-address is 10.10.10.9 and the default cidr-mask
|
||||||
|
is 30. If you are using the default values, your VPN adapter
|
||||||
|
uses an IPv4 address of 10.10.10.9 and you can set your activa-
|
||||||
|
tion client to use the easy to remember address 10.10.10.10
|
||||||
|
(e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs
|
||||||
|
/sethst:10.10.10.10).
|
||||||
|
|
||||||
|
The dhcp-lease-duration is a number optionally followed by s, m,
|
||||||
|
h, d or w to indicate seconds, minutes, hours, days or weeks.
|
||||||
|
The default dhcp-lease-duration is 1d (one day). It is normally
|
||||||
|
not required to change this value.
|
||||||
|
|
||||||
|
It is advised not to manually configure your OpenVPN TAP or
|
||||||
|
TeamViewer VPN adapter in "Network Connections". If you set the
|
||||||
|
IPv4 configuration manually anyway, the IPv4 address and the
|
||||||
|
subnet mask must match the -O parameter. It is safe leave the
|
||||||
|
IPv4 configuration to automatic (DHCP). vlmcsd will wait up to
|
||||||
|
four seconds for the DHCP configuration to complete before bind-
|
||||||
|
ing to and listenin on any interfaces.
|
||||||
|
|
||||||
|
You should be aware that only one program can use a VPN adapter
|
||||||
|
at a time. If you use the TeamViewer VPN adapter for example,
|
||||||
|
you will not be able to use the VPN feature of TeamViewer as
|
||||||
|
long as vlmcsd is running. The same applies to OpenVPN TAP
|
||||||
|
adapters that are in use by other programs (for example OpenVPN,
|
||||||
|
QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid con-
|
||||||
|
flicts is to install Tap-Windows from OpenVPN, cd to C:\Program
|
||||||
|
Files\TAP-Windows\bin and run addtap.bat to install an addi-
|
||||||
|
tional TAP adapter. Go to "Network Connections" and rename the
|
||||||
|
new adapter to "vlmcsd" and specify -O vlmcsd to use it.
|
||||||
|
|
||||||
|
Example: -O "Ethernet 7"=192.168.123.1/24 (uses VPN adapter Eth-
|
||||||
|
ernet 7 with IPv4 address 192.168.123.1 and have 192.168.123.2
|
||||||
|
to 192.168.123.254 as additional local (but apparently remote)
|
||||||
|
IPv4 addresses.
|
||||||
|
|
||||||
|
|
||||||
|
-x0 and -x1
|
||||||
|
Controls under what circumstances vlmcsd will exit. Using the
|
||||||
|
default of -x0 vlmcsd stays active as long as it can perform
|
||||||
|
some useful operations. If vlmcsd is run by any form of a watch-
|
||||||
|
dog, e.g. NT service manager (Windows), systemd (Linux) or
|
||||||
|
launchd (Mac OS / iOS), it may be desirable to end vlmcsd and
|
||||||
|
let the watchdog restart it. This is especially true if some
|
||||||
|
pre-requisites are not yet met but will be some time later, e.g.
|
||||||
|
network is not yet fully setup.
|
||||||
|
|
||||||
|
By using -x0 vlmcsd will
|
||||||
|
|
||||||
|
exit if none of the listening sockets specified with -L can
|
||||||
|
be used. It continues if at least one socket can be setup
|
||||||
|
for listening.
|
||||||
|
|
||||||
|
exit any TAP mirror thread (Windows version only) if there
|
||||||
|
is an error condition while reading or writing from or to
|
||||||
|
the VPN adapter but continue to work without utilizing a
|
||||||
|
VPN adapter.
|
||||||
|
|
||||||
|
By using -x1 vlmcsd will
|
||||||
|
|
||||||
|
exit if not all listening sockets specified with -L can be
|
||||||
|
used.
|
||||||
|
|
||||||
|
exit completely if there is a problem with a VPN adapter it
|
||||||
|
is using. This can happen for instance if the VPN adapter
|
||||||
|
has been disabled using "Control Panel - Network - Adapter
|
||||||
|
Settings" while vlmcsd is using it.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that -x1 is kind of a workaround option. While it
|
||||||
|
may help under some circumstances, it is better to solve the
|
||||||
|
problem at its origin, e.g. properly implementing dependencies
|
||||||
|
in your startup script to ensure all network interfaces and the
|
||||||
|
VPN adapter you will use are completely setup before you start
|
||||||
|
vlmcsd.
|
||||||
|
|
||||||
|
|
||||||
-F0 and -F1
|
-F0 and -F1
|
||||||
Allow (-F1) or disallow (-F0) binding to IP addresses that are
|
Allow (-F1) or disallow (-F0) binding to IP addresses that are
|
||||||
currently not configured on your system. The default is -F0. -F1
|
currently not configured on your system. The default is -F0. -F1
|
||||||
allows you to bind to an IP address that may be configured after
|
allows you to bind to an IP address that may be configured after
|
||||||
you started vlmcsd. vlmcsd will listen on that address as soon
|
you started vlmcsd. vlmcsd will listen on that address as soon
|
||||||
as it becomes available. This feature is only available under
|
as it becomes available. This feature is only available under
|
||||||
Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
|
Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
|
||||||
this feature only for the root user (more correctly: processes
|
this feature only for the root user (more correctly: processes
|
||||||
that have the PRIV_NETINET_BINDANY privilege). Linux does not
|
that have the PRIV_NETINET_BINDANY privilege). Linux does not
|
||||||
require a capability for this.
|
require a capability for this.
|
||||||
|
|
||||||
|
|
||||||
-t seconds
|
-t seconds
|
||||||
Timeout the TCP connection with the client after seconds sec‐
|
Timeout the TCP connection with the client after seconds sec-
|
||||||
onds. After sending an activation request. RPC keeps the TCP
|
onds. After sending an activation request. RPC keeps the TCP
|
||||||
connection for a while. The default is 30 seconds. You may spec‐
|
connection for a while. The default is 30 seconds. You may spec-
|
||||||
ify a shorter period to free ressources on your device faster.
|
ify a shorter period to free ressources on your device faster.
|
||||||
This is useful for devices with limited main memory or if you
|
This is useful for devices with limited main memory or if you
|
||||||
used -m to limit the concurrent clients that may request activa‐
|
used -m to limit the concurrent clients that may request activa-
|
||||||
tion. Microsoft RPC clients disconnect after 30 seconds by
|
tion. Microsoft RPC clients disconnect after 30 seconds by
|
||||||
default. Setting seconds to a greater value does not make much
|
default. Setting seconds to a greater value does not make much
|
||||||
sense.
|
sense.
|
||||||
|
|
||||||
|
|
||||||
-m concurrent-clients
|
-m concurrent-clients
|
||||||
Limit the number of clients that will be handled concurrently.
|
Limit the number of clients that will be handled concurrently.
|
||||||
This is useful for devices with limited ressources or if you are
|
This is useful for devices with limited ressources or if you are
|
||||||
experiencing DoS attacks that spawn thousands of threads or
|
experiencing DoS attacks that spawn thousands of threads or
|
||||||
forked processes. If additional clients connect to vlmcsd, they
|
forked processes. If additional clients connect to vlmcsd, they
|
||||||
need to wait until another client disconnects. If you set con‐
|
need to wait until another client disconnects. If you set con-
|
||||||
current-clients to a small value ( <10 ), you should also select
|
current-clients to a small value ( <10 ), you should also select
|
||||||
a reasonable timeout of 2 or 3 seconds with -t. The default is
|
a reasonable timeout of 2 or 3 seconds with -t. The default is
|
||||||
no limit.
|
no limit.
|
||||||
|
|
||||||
|
|
||||||
-d Disconnect each client after processing one activation request.
|
-d Disconnect each client after processing one activation request.
|
||||||
This is a direct violation of DCE RPC but may help if you
|
This is a direct violation of DCE RPC but may help if you
|
||||||
receive malicous fake RPC requests that block your threads or
|
receive malicous fake RPC requests that block your threads or
|
||||||
forked processes. Some other KMS emulators (e.g. py-kms) behave
|
forked processes. Some other KMS emulators (e.g. py-kms) behave
|
||||||
this way.
|
this way.
|
||||||
|
|
||||||
|
|
||||||
-k Do not disconnect clients after processing an activation
|
-k Do not disconnect clients after processing an activation
|
||||||
request. This selects the default behavior. -k is useful only if
|
request. This selects the default behavior. -k is useful only if
|
||||||
you used an ini file (see vlmcsd.ini(5) and -i). If the ini file
|
you used an ini file (see vlmcsd.ini(5) and -i). If the ini file
|
||||||
contains the line "DisconnectClientsImmediately = true", you can
|
contains the line "DisconnectClientsImmediately = true", you can
|
||||||
@ -222,144 +314,121 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-N0 and -N1
|
-N0 and -N1
|
||||||
Disables (-N0) or enables (-N1) the use of the NDR64 transfer
|
Disables (-N0) or enables (-N1) the use of the NDR64 transfer
|
||||||
syntax in the RPC protocol. Unlike Microsoft vlmcsd supports
|
syntax in the RPC protocol. Unlike Microsoft vlmcsd supports
|
||||||
NDR64 on 32-bit operating systems. Microsoft introduced NDR64 in
|
NDR64 on 32-bit operating systems. Microsoft introduced NDR64 in
|
||||||
Windows Vista but their KMS servers started using it with Win‐
|
Windows Vista but their KMS servers started using it with Win-
|
||||||
dows 8. Thus if you choose random ePIDs, vlmcsd will select
|
dows 8. Thus if you choose random ePIDs, vlmcsd will select
|
||||||
ePIDs with build numbers 9200 and 9600 if you enable NDR64 and
|
ePIDs with build numbers 9200 and 9600 if you enable NDR64 and
|
||||||
build numbers 6002 and 7601 if you disable NDR64. The default is
|
build numbers 6002 and 7601 if you disable NDR64. The default is
|
||||||
to enable NDR64.
|
to enable NDR64.
|
||||||
|
|
||||||
|
|
||||||
-B0 and -B1
|
-B0 and -B1
|
||||||
Disables (-B0) or enables (-B1) bind time feature negotiation
|
Disables (-B0) or enables (-B1) bind time feature negotiation
|
||||||
(BTFN) in the RPC protocol. All Windows operating systems start‐
|
(BTFN) in the RPC protocol. All Windows operating systems start-
|
||||||
ing with Vista support BTFN and try to negotiate it when initi‐
|
ing with Vista support BTFN and try to negotiate it when initi-
|
||||||
ating an RPC connection. Thus consider turning it off as a debug
|
ating an RPC connection. Thus consider turning it off as a debug
|
||||||
/ troubleshooting feature only. Some older firewalls that selec‐
|
/ troubleshooting feature only. Some older firewalls that selec-
|
||||||
tively block or redirect RPC traffic may get confused when they
|
tively block or redirect RPC traffic may get confused when they
|
||||||
detect NDR64 or BTFN.
|
detect NDR64 or BTFN.
|
||||||
|
|
||||||
|
|
||||||
-l filename
|
-l filename
|
||||||
Use filename as a log file. The log file records all activations
|
Use filename as a log file. The log file records all activations
|
||||||
with IP address, Windows workstation name (no reverse DNS
|
with IP address, Windows workstation name (no reverse DNS
|
||||||
lookup), activated product, KMS protocol, time and date. If you
|
lookup), activated product, KMS protocol, time and date. If you
|
||||||
do not specify a log file, no log is created. For a live view of
|
do not specify a log file, no log is created. For a live view of
|
||||||
the log file type tail -f file.
|
the log file type tail -f file.
|
||||||
|
|
||||||
If you use the special filename "syslog", vlmcsd uses syslog(3)
|
If you use the special filename "syslog", vlmcsd uses syslog(3)
|
||||||
for logging. If your system has no syslog service (/dev/log)
|
for logging. If your system has no syslog service (/dev/log)
|
||||||
installed, logging output will go to /dev/console. Syslog log‐
|
installed, logging output will go to /dev/console. Syslog log-
|
||||||
ging is not available in the native Windows version. The Cygwin
|
ging is not available in the native Windows version. The Cygwin
|
||||||
version does support syslog logging.
|
version does support syslog logging.
|
||||||
|
|
||||||
|
|
||||||
-T0 and -T1
|
-T0 and -T1
|
||||||
Disable (-T0) or enable (-T1) the inclusion of date and time in
|
Disable (-T0) or enable (-T1) the inclusion of date and time in
|
||||||
each line of the log. The default is -T1. -T0 is useful if you
|
each line of the log. The default is -T1. -T0 is useful if you
|
||||||
log to stdout(3) which is redirected to another logging mecha‐
|
log to stdout(3) which is redirected to another logging mecha-
|
||||||
nism that already includes date and time in its output, for
|
nism that already includes date and time in its output, for
|
||||||
instance systemd-journald(8). If you log to syslog(3), -T1 is
|
instance systemd-journald(8). If you log to syslog(3), -T1 is
|
||||||
ignored and date and time will never be included in the output
|
ignored and date and time will never be included in the output
|
||||||
sent to syslog(3).
|
sent to syslog(3).
|
||||||
|
|
||||||
|
|
||||||
-D Normally vlmcsd daemonizes and runs in background (except the
|
-D Normally vlmcsd daemonizes and runs in background (except the
|
||||||
native Windows version). If -D is specified, vlmcsd does not
|
native Windows version). If -D is specified, vlmcsd does not
|
||||||
daemonize and runs in foreground. This is useful for testing and
|
daemonize and runs in foreground. This is useful for testing and
|
||||||
allows you to simply press <Ctrl-C> to exit vlmcsd.
|
allows you to simply press <Ctrl-C> to exit vlmcsd.
|
||||||
|
|
||||||
The native Windows version never daemonizes and always behaves
|
The native Windows version never daemonizes and always behaves
|
||||||
as if -D had been specified. You may want to install vlmcsd as a
|
as if -D had been specified. You may want to install vlmcsd as a
|
||||||
service instead. See -s.
|
service instead. See -s.
|
||||||
|
|
||||||
|
|
||||||
-e If specified, vlmcsd ignores -l and writes all logging output to
|
-e If specified, vlmcsd ignores -l and writes all logging output to
|
||||||
stdout(3). This is mainly useful for testing and debugging and
|
stdout(3). This is mainly useful for testing and debugging and
|
||||||
often combined with -D.
|
often combined with -D.
|
||||||
|
|
||||||
|
|
||||||
-v Use verbose logging. Logs every parameter of the base request
|
-v Use verbose logging. Logs every parameter of the base request
|
||||||
and the base response. It also logs the HWID of the KMS server
|
and the base response. It also logs the HWID of the KMS server
|
||||||
if KMS protocol version 6 is used. This option is mainly for
|
if KMS protocol version 6 is used. This option is mainly for
|
||||||
debugging purposes. It only has an effect if some form of log‐
|
debugging purposes. It only has an effect if some form of log-
|
||||||
ging is used. Thus -v does not make sense if not used with -l,
|
ging is used. Thus -v does not make sense if not used with -l,
|
||||||
-e or -f.
|
-e or -f.
|
||||||
|
|
||||||
|
|
||||||
-q Do not use verbose logging. This is actually the default behav‐
|
-q Do not use verbose logging. This is actually the default behav-
|
||||||
ior. It only makes sense if you use vlmcsd with an ini file (see
|
ior. It only makes sense if you use vlmcsd with an ini file (see
|
||||||
-i and vlmcsd.ini(5)). If the ini file contains the line
|
-i and vlmcsd.ini(5)). If the ini file contains the line
|
||||||
"LogVerbose = true" you can use -q to restore the default behav‐
|
"LogVerbose = true" you can use -q to restore the default behav-
|
||||||
ior.
|
ior.
|
||||||
|
|
||||||
|
|
||||||
-p filename
|
-p filename
|
||||||
Create pid file filename. This has nothing to do with KMS ePIDs.
|
Create pid file filename. This has nothing to do with KMS ePIDs.
|
||||||
A pid file is a file where vlmcsd writes its own process id.
|
A pid file is a file where vlmcsd writes its own process id.
|
||||||
This is used by standard init scripts (typically found in
|
This is used by standard init scripts (typically found in
|
||||||
/etc/init.d). The default is not to write a pid file.
|
/etc/init.d). The default is not to write a pid file.
|
||||||
|
|
||||||
|
|
||||||
-u user and -g group
|
-u user and -g group
|
||||||
Causes vlmcsd to run in the specified user and group security
|
Causes vlmcsd to run in the specified user and group security
|
||||||
context. The main purpose for this is to drop root privileges
|
context. The main purpose for this is to drop root privileges
|
||||||
after it has been started from the root account. To use this
|
after it has been started from the root account. To use this
|
||||||
feature from cygwin you must run cyglsa-config and the account
|
feature from cygwin you must run cyglsa-config and the account
|
||||||
from which vlmcsd is started must have the rights "Act as part
|
from which vlmcsd is started must have the rights "Act as part
|
||||||
of the operating system" and "Replace a process level token".
|
of the operating system" and "Replace a process level token".
|
||||||
The native Windows version does not support these options.
|
The native Windows version does not support these options.
|
||||||
|
|
||||||
The actual security context switch is performed after the TCP
|
The actual security context switch is performed after the TCP
|
||||||
sockets have been created. This allows you to use privileged
|
sockets have been created. This allows you to use privileged
|
||||||
ports (< 1024) when you start vlmcsd from the root account.
|
ports (< 1024) when you start vlmcsd from the root account.
|
||||||
|
|
||||||
However if you use an ini, pid or log file, you must ensure that
|
However if you use an ini, pid or log file, you must ensure that
|
||||||
the unprivileged user has access to these files. You can always
|
the unprivileged user has access to these files. You can always
|
||||||
log to syslog(3) from an unprivileged account on most platforms
|
log to syslog(3) from an unprivileged account on most platforms
|
||||||
(see -l).
|
(see -l).
|
||||||
|
|
||||||
|
|
||||||
-w ePID
|
-a CSVLK = ePID [ / HwId ]
|
||||||
Use ePID as Windows ePID. If specified, -r is disregarded for
|
Use ePID and HwId for a specific CSVLK. When you use it, -r is
|
||||||
Windows.
|
disregarded for this CSVLK. If vlmcsd uses the default vlm-
|
||||||
|
csd.kmd database, you can use the following CSVLKs: Windows,
|
||||||
|
WinChinaGov, Office2010, Office2013, Office2016 and Office2019.
|
||||||
|
The -a option requires that database version 1.6 or later is
|
||||||
|
used.
|
||||||
|
|
||||||
|
HwId must be specified as 16 hex digits that are interpreted as
|
||||||
-0 ePID
|
a series of 8 bytes (big endian). Any character that is not a
|
||||||
Use ePID as Office 2010 ePID (including Project and Visio). If
|
hex digit will be ignored. This is for better readability.
|
||||||
specified, -r is disregarded for Office 2010.
|
|
||||||
|
|
||||||
|
|
||||||
-3 ePID
|
|
||||||
Use ePID as Office 2013 ePID (including Project and Visio). If
|
|
||||||
specified, -r is disregarded for Office 2013.
|
|
||||||
|
|
||||||
|
|
||||||
-6 ePID
|
|
||||||
Use ePID as Office 2016 ePID (including Project and Visio). If
|
|
||||||
specified, -r is disregarded for Office 2016.
|
|
||||||
|
|
||||||
|
|
||||||
-H HwId
|
|
||||||
Use HwId for all products. All HWIDs in the ini file (see -i)
|
|
||||||
will not be used. In an ini file you can specify a seperate HWID
|
|
||||||
for each application-guid. This is not possible when entering a
|
|
||||||
HWID from the command line.
|
|
||||||
|
|
||||||
HwId must be specified as 16 hex digits that are interpreted as
|
|
||||||
a series of 8 bytes (big endian). Any character that is not a
|
|
||||||
hex digit will be ignored. This is for better readability. The
|
|
||||||
following commands are identical:
|
|
||||||
|
|
||||||
vlmcsd -H 0123456789ABCDEF
|
|
||||||
vlmcsd -H 01:23:45:67:89:ab:cd:ef
|
|
||||||
vlmcsd -H "01 23 45 67 89 AB CD EF"
|
|
||||||
|
|
||||||
|
|
||||||
-i filename
|
-i filename
|
||||||
Use configuration file (aka ini file) filename. Most configura‐
|
Use configuration file (aka ini file) filename. Most configura-
|
||||||
tion parameters can be set either via the command line or an ini
|
tion parameters can be set either via the command line or an ini
|
||||||
file. The command line always has precedence over configuration
|
file. The command line always has precedence over configuration
|
||||||
items in the ini file. See vlmcsd.ini(5) for the format of the
|
items in the ini file. See vlmcsd.ini(5) for the format of the
|
||||||
@ -373,7 +442,7 @@ OPTIONS
|
|||||||
-j filename
|
-j filename
|
||||||
Use KMS data file filename. By default vlmcsd only contains the
|
Use KMS data file filename. By default vlmcsd only contains the
|
||||||
minimum product data that is required to perform all operations
|
minimum product data that is required to perform all operations
|
||||||
correctly. You may use a more complete KMS data file that con‐
|
correctly. You may use a more complete KMS data file that con-
|
||||||
tains all detailed product names. This is especially useful if
|
tains all detailed product names. This is especially useful if
|
||||||
you are logging KMS requests. If you don't log, there is no need
|
you are logging KMS requests. If you don't log, there is no need
|
||||||
to load an external KMS data file.
|
to load an external KMS data file.
|
||||||
@ -414,8 +483,8 @@ OPTIONS
|
|||||||
more than one activation request over the same TCP connection.
|
more than one activation request over the same TCP connection.
|
||||||
This is simply due to the fact that vlmcsd is started upon a
|
This is simply due to the fact that vlmcsd is started upon a
|
||||||
connection request and does not stay in memory after servicing a
|
connection request and does not stay in memory after servicing a
|
||||||
KMS request. Consider using -r0 or -w, -0, -3 and -6 when start‐
|
KMS request. Consider using -r0 or -w, -G, -0, -3 and -6 when
|
||||||
ing vlmcsd by an internet superserver.
|
starting vlmcsd by an internet superserver.
|
||||||
|
|
||||||
-r2 behaves like most other KMS server emulators with random
|
-r2 behaves like most other KMS server emulators with random
|
||||||
support and generates a new random ePID on every request. -r2
|
support and generates a new random ePID on every request. -r2
|
||||||
@ -434,14 +503,20 @@ OPTIONS
|
|||||||
by .NET Framework 4.0. This may lead to a locale id which is
|
by .NET Framework 4.0. This may lead to a locale id which is
|
||||||
unlikely to occur in your country, for instance 2155 for "Quecha
|
unlikely to occur in your country, for instance 2155 for "Quecha
|
||||||
- Ecuador". You may want to select the locale id of your country
|
- Ecuador". You may want to select the locale id of your country
|
||||||
instead. See MSDN ⟨http://msdn.microsoft.com/en-us/goglobal/
|
instead. See MSDN <http://msdn.microsoft.com/en-us/goglobal/
|
||||||
bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
|
bb964664.aspx> for a list of valid LCIDs. Please note that some
|
||||||
of them are not recognized by .NET Framework 4.0.
|
of them are not recognized by .NET Framework 4.0.
|
||||||
|
|
||||||
Most other KMS emulators use a fixed LCID of 1033 (English -
|
Most other KMS emulators use a fixed LCID of 1033 (English -
|
||||||
US). To achive the same behavior in vlmcsd use -C 1033.
|
US). To achive the same behavior in vlmcsd use -C 1033.
|
||||||
|
|
||||||
|
|
||||||
|
-H HostBuild
|
||||||
|
Do not randomize the host build number in the ePID and use Host-
|
||||||
|
Build instead, for instance 17763 for Windows Server 2019 / Win-
|
||||||
|
dows 10 1809.
|
||||||
|
|
||||||
|
|
||||||
-K0, -K1, -K2 and -K3
|
-K0, -K1, -K2 and -K3
|
||||||
Sets the whitelisting level to determine which products vlmcsd
|
Sets the whitelisting level to determine which products vlmcsd
|
||||||
activates or refuses. The default is -K0.
|
activates or refuses. The default is -K0.
|
||||||
@ -478,29 +553,29 @@ OPTIONS
|
|||||||
|
|
||||||
-M0 and -M1
|
-M0 and -M1
|
||||||
Disables (-M0) or enables (-M1) maintaining a list of client
|
Disables (-M0) or enables (-M1) maintaining a list of client
|
||||||
machine IDs (CMIDs). The default is -M0. -M1 is useful to pre‐
|
machine IDs (CMIDs). The default is -M0. -M1 is useful to pre-
|
||||||
vent emulator detection. By maintaing a CMID list, vlmcsd
|
vent emulator detection. By maintaing a CMID list, vlmcsd
|
||||||
reports current active clients exactly like a genuine KMS emula‐
|
reports current active clients exactly like a genuine KMS emula-
|
||||||
tor. This includes bug compatibility to the extent that you can
|
tor. This includes bug compatibility to the extent that you can
|
||||||
permanently kill a genuine KMS emulator by sending an "over‐
|
permanently kill a genuine KMS emulator by sending an "over-
|
||||||
charge request" with a required client count of 376 or more and
|
charge request" with a required client count of 376 or more and
|
||||||
then request activation for 671 clients. vlmcsd can be reset
|
then request activation for 671 clients. vlmcsd can be reset
|
||||||
from this condition by restarting it. If -M0 is used, vlmcsd
|
from this condition by restarting it. If -M0 is used, vlmcsd
|
||||||
reports current active clients as good as possible. If no client
|
reports current active clients as good as possible. If no client
|
||||||
sends an "overcharge request", it is not possible to detect vlm‐
|
sends an "overcharge request", it is not possible to detect vlm-
|
||||||
csd as an emulator with -M0. -M1 requires the allocation of a
|
csd as an emulator with -M0. -M1 requires the allocation of a
|
||||||
buffer that is about 50 kB in size. On hardware with few memory
|
buffer that is about 50 kB in size. On hardware with few memory
|
||||||
resources use it only if you really need it.
|
resources use it only if you really need it.
|
||||||
|
|
||||||
If you start vlmcsd from an internet superserver, -M1 cannot be
|
If you start vlmcsd from an internet superserver, -M1 cannot be
|
||||||
used. Since vlmcsd exits after each activation, it cannot main‐
|
used. Since vlmcsd exits after each activation, it cannot main-
|
||||||
tain any state in memory.
|
tain any state in memory.
|
||||||
|
|
||||||
|
|
||||||
-E0 and -E1
|
-E0 and -E1
|
||||||
These options are ignored if you do not also specify -M1. If you
|
These options are ignored if you do not also specify -M1. If you
|
||||||
use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
|
use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
|
||||||
server. Clients activate immediately. -E1 lets you start up vlm‐
|
server. Clients activate immediately. -E1 lets you start up vlm-
|
||||||
csd with an empty CMID list. Activation will start when the
|
csd with an empty CMID list. Activation will start when the
|
||||||
required minimum clients (25 for Windows Client OSses, 5 for
|
required minimum clients (25 for Windows Client OSses, 5 for
|
||||||
Windows Server OSses and Office) have registered with the KMS
|
Windows Server OSses and Office) have registered with the KMS
|
||||||
@ -517,7 +592,7 @@ OPTIONS
|
|||||||
-R renewal-interval
|
-R renewal-interval
|
||||||
Instructs clients to renew activation every renewal-interval.
|
Instructs clients to renew activation every renewal-interval.
|
||||||
The renewal-interval is a number optionally immediately followed
|
The renewal-interval is a number optionally immediately followed
|
||||||
by a letter indicating the unit. Valid unit letters are s (sec‐
|
by a letter indicating the unit. Valid unit letters are s (sec-
|
||||||
onds), m (minutes), h (hours), d (days) and w (weeks). If you do
|
onds), m (minutes), h (hours), d (days) and w (weeks). If you do
|
||||||
not specify a letter, minutes is assumed.
|
not specify a letter, minutes is assumed.
|
||||||
|
|
||||||
@ -531,14 +606,14 @@ OPTIONS
|
|||||||
before your activation expires (usually 180 days).
|
before your activation expires (usually 180 days).
|
||||||
|
|
||||||
Even though you can specify seconds, the granularity of this
|
Even though you can specify seconds, the granularity of this
|
||||||
option is 1 minute. Seconds are rounded down to the next multi‐
|
option is 1 minute. Seconds are rounded down to the next multi-
|
||||||
ple of 60.
|
ple of 60.
|
||||||
|
|
||||||
|
|
||||||
-A activation-interval
|
-A activation-interval
|
||||||
Instructs clients to retry activation every activation-interval
|
Instructs clients to retry activation every activation-interval
|
||||||
if it was unsuccessful, e.g. because it could not reach the
|
if it was unsuccessful, e.g. because it could not reach the
|
||||||
server. The default is 120 (identical to 2h). activation-inter‐
|
server. The default is 120 (identical to 2h). activation-inter-
|
||||||
val follows the same syntax as renewal-interval in the -R
|
val follows the same syntax as renewal-interval in the -R
|
||||||
option.
|
option.
|
||||||
|
|
||||||
@ -547,7 +622,7 @@ OPTIONS
|
|||||||
with the native Windows version and Cygwin. Combine -s with
|
with the native Windows version and Cygwin. Combine -s with
|
||||||
other command line options. These will be in effect when you
|
other command line options. These will be in effect when you
|
||||||
start the service. The service automatically starts when you
|
start the service. The service automatically starts when you
|
||||||
reboot your machine. To start it manually, type "net start vlm‐
|
reboot your machine. To start it manually, type "net start vlm-
|
||||||
csd".
|
csd".
|
||||||
|
|
||||||
If you use Cygwin, you must include your Cygwin system DLL
|
If you use Cygwin, you must include your Cygwin system DLL
|
||||||
@ -564,35 +639,35 @@ OPTIONS
|
|||||||
on your system.
|
on your system.
|
||||||
|
|
||||||
|
|
||||||
-S Uninstalls the vlmcsd service. Works only with the native Win‐
|
-S Uninstalls the vlmcsd service. Works only with the native Win-
|
||||||
dows version and Cygwin. All other options will be ignored if
|
dows version and Cygwin. All other options will be ignored if
|
||||||
you include -S in the command line.
|
you include -S in the command line.
|
||||||
|
|
||||||
|
|
||||||
-U [domain\]username
|
-U [domain\]username
|
||||||
Can only be used together with -s. Starts the service as a dif‐
|
Can only be used together with -s. Starts the service as a dif-
|
||||||
ferent user than the local SYSTEM account. This is used to run
|
ferent user than the local SYSTEM account. This is used to run
|
||||||
the service under an account with low privileges. If you omit
|
the service under an account with low privileges. If you omit
|
||||||
the domain, an account from the local computer will be used.
|
the domain, an account from the local computer will be used.
|
||||||
|
|
||||||
You may use "NT AUTHORITY\NetworkService". This is a pseudo user
|
You may use "NT AUTHORITY\NetworkService". This is a pseudo user
|
||||||
with low privileges. You may also use "NT AUTHORITY\LocalSer‐
|
with low privileges. You may also use "NT AUTHORITY\LocalSer-
|
||||||
vice" which has more privileges but these are of no use for run‐
|
vice" which has more privileges but these are of no use for run-
|
||||||
ning vlmcsd.
|
ning vlmcsd.
|
||||||
|
|
||||||
Make sure that the user you specify has at least execute permis‐
|
Make sure that the user you specify has at least execute permis-
|
||||||
sion for your executable. "NT AUTHORITY\NetworkService" normally
|
sion for your executable. "NT AUTHORITY\NetworkService" normally
|
||||||
has no permission to run binaries from your home directory.
|
has no permission to run binaries from your home directory.
|
||||||
|
|
||||||
For your convenience you can use the special username "/l" as a
|
For your convenience you can use the special username "/l" as a
|
||||||
shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
|
shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
|
||||||
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser‐
|
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser-
|
||||||
vice to run as "NT AUTHORITY\NetworkService".
|
vice to run as "NT AUTHORITY\NetworkService".
|
||||||
|
|
||||||
|
|
||||||
-W password
|
-W password
|
||||||
Can only be used together with -s. Specifies a password for the
|
Can only be used together with -s. Specifies a password for the
|
||||||
corresponding username you use with -U. SYSTEM, "NT AUTHOR‐
|
corresponding username you use with -U. SYSTEM, "NT AUTHOR-
|
||||||
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
|
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
|
||||||
a password.
|
a password.
|
||||||
|
|
||||||
@ -606,7 +681,7 @@ SIGNALS
|
|||||||
|
|
||||||
|
|
||||||
SIGTERM, SIGINT
|
SIGTERM, SIGINT
|
||||||
These signals cause vlmcsd to exit gracefully. All global sema‐
|
These signals cause vlmcsd to exit gracefully. All global sema-
|
||||||
phores and shared memory pages will be released, the pid file
|
phores and shared memory pages will be released, the pid file
|
||||||
will be unlinked (deleted) and a shutdown message will be
|
will be unlinked (deleted) and a shutdown message will be
|
||||||
logged.
|
logged.
|
||||||
@ -615,7 +690,7 @@ SIGNALS
|
|||||||
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
|
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
|
||||||
started vlmcsd with an ini file. You can modify the ini file
|
started vlmcsd with an ini file. You can modify the ini file
|
||||||
while vlmcsd is running and then sending SIGHUP, e.g. by typing
|
while vlmcsd is running and then sending SIGHUP, e.g. by typing
|
||||||
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm‐
|
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm-
|
||||||
csd.pid`".
|
csd.pid`".
|
||||||
|
|
||||||
The SIGHUP handler has been implemented relatively simple. It is
|
The SIGHUP handler has been implemented relatively simple. It is
|
||||||
@ -623,18 +698,18 @@ SIGNALS
|
|||||||
immediately with the following exceptions:
|
immediately with the following exceptions:
|
||||||
|
|
||||||
|
|
||||||
— The new process does not get a new process id.
|
-- The new process does not get a new process id.
|
||||||
|
|
||||||
— If you used a pid file, it is not deleted and recreated
|
-- If you used a pid file, it is not deleted and recreated
|
||||||
because the process id stays the same.
|
because the process id stays the same.
|
||||||
|
|
||||||
— If you used the 'user' and/or 'group' directive in an ini
|
-- If you used the 'user' and/or 'group' directive in an ini
|
||||||
file these are ignored. This is because once you switched to
|
file these are ignored. This is because once you switched to
|
||||||
lower privileged users and groups, there is no way back. Any‐
|
lower privileged users and groups, there is no way back. Any-
|
||||||
thing else would be a severe security flaw in the OS.
|
thing else would be a severe security flaw in the OS.
|
||||||
|
|
||||||
Signaling is not available in the native Windows version and in the
|
Signaling is not available in the native Windows version and in the
|
||||||
Cygwin version when it runs as Windows service.
|
Cygwin version when vlmcsd runs as a Windows service.
|
||||||
|
|
||||||
|
|
||||||
SUPPORTED OPERATING SYSTEMS
|
SUPPORTED OPERATING SYSTEMS
|
||||||
@ -646,12 +721,12 @@ SUPPORTED OPERATING SYSTEMS
|
|||||||
|
|
||||||
|
|
||||||
SUPPORTED PRODUCTS
|
SUPPORTED PRODUCTS
|
||||||
vlmcsd can answer activation requests for the following products: Win‐
|
vlmcsd can answer activation requests for the following products: Win-
|
||||||
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1607),
|
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1703),
|
||||||
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win‐
|
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win-
|
||||||
dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
|
dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
|
||||||
Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
|
Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
|
||||||
2016, Visio 2016. Newer version may work as long as the KMS protocol
|
2016, Visio 2016. Newer products may work as long as the KMS protocol
|
||||||
does not change. A complete list of fully supported products can be
|
does not change. A complete list of fully supported products can be
|
||||||
obtained using the -x option of vlmcs(1).
|
obtained using the -x option of vlmcs(1).
|
||||||
|
|
||||||
@ -670,13 +745,13 @@ EXAMPLES
|
|||||||
|
|
||||||
|
|
||||||
vlmcsd -l /var/log/vlmcsd.log
|
vlmcsd -l /var/log/vlmcsd.log
|
||||||
Starts vlmcsd as a daemon and logs everything to /var/log/vlm‐
|
Starts vlmcsd as a daemon and logs everything to /var/log/vlm-
|
||||||
csd.log.
|
csd.log.
|
||||||
|
|
||||||
|
|
||||||
vlmcsd -L 192.168.1.17
|
vlmcsd -L 192.168.1.17
|
||||||
Starts vlmcsd as a daemon and listens on IP address 192.168.1.17
|
Starts vlmcsd as a daemon and listens on IP address 192.168.1.17
|
||||||
only. This is useful for routers that have a public and a pri‐
|
only. This is useful for routers that have a public and a pri-
|
||||||
vate IP address to prevent your KMS server from becoming public.
|
vate IP address to prevent your KMS server from becoming public.
|
||||||
|
|
||||||
|
|
||||||
@ -696,8 +771,8 @@ AUTHOR
|
|||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati‐
|
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
|
||||||
borus, ...
|
qad, Ratiborus, ...
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
@ -705,4 +780,4 @@ SEE ALSO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hotbird64 November 2016 VLMCSD(8)
|
Hotbird64 October 2018 VLMCSD(8)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!-- Creator : groff version 1.22.3 -->
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
<!-- CreationDate: Mon Nov 28 01:28:23 2016 -->
|
<!-- CreationDate: Sat Oct 20 09:49:39 2018 -->
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
@ -108,8 +108,8 @@ maintain a client list (option <b>-M1</b>)</p>
|
|||||||
<p style="margin-left:22%; margin-top: 1em">EPID
|
<p style="margin-left:22%; margin-top: 1em">EPID
|
||||||
Randomization Level 1 (option <b>-r1</b>) works like Level 2
|
Randomization Level 1 (option <b>-r1</b>) works like Level 2
|
||||||
(<b>-r2</b>). You may want to use Level 0 (<b>-r0</b>) or
|
(<b>-r2</b>). You may want to use Level 0 (<b>-r0</b>) or
|
||||||
custom EPIDs (options <b>-w</b>, <b>-0</b>, <b>-3</b> and
|
custom EPIDs (options <b>-w</b>, <b>-G</b>, <b>-0</b>,
|
||||||
<b>-6</b>) instead.</p>
|
<b>-3</b> and <b>-6</b>) instead.</p>
|
||||||
|
|
||||||
<h2>OPTIONS
|
<h2>OPTIONS
|
||||||
<a name="OPTIONS"></a>
|
<a name="OPTIONS"></a>
|
||||||
@ -273,6 +273,116 @@ subsequent <b>-L</b> statements that do not include an
|
|||||||
optional port. If you use <b>-P</b> and <b>-L</b>, <b>-P</b>
|
optional port. If you use <b>-P</b> and <b>-L</b>, <b>-P</b>
|
||||||
must be specified before <b>-L</b>.</p>
|
must be specified before <b>-L</b>.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>-O</b>
|
||||||
|
<i>vpn-adapter-name</i>[=<i>ipv4-address</i>][/<i>cidr-mask</i>][:<i>dhcp-lease-duration</i>]</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Enables a compatible VPN
|
||||||
|
adapter to create additional local IPv4 addresses (like
|
||||||
|
127.0.0.1) that appear as remote IPv4 addresses to the
|
||||||
|
system. This allows product activation using a local
|
||||||
|
instance of vlmcsd. This feature is only available in
|
||||||
|
Windows and Cygwin builds of vlmcsd since it is not of any
|
||||||
|
use on other operating systems. Compatible VPN adapters are
|
||||||
|
Tap-windows version 8.2 or higher (from OpenVPN) and the
|
||||||
|
TeamViewer VPN adapter. There are two special
|
||||||
|
<i>vpn-adapter-name</i>s. A single period (.) instructs
|
||||||
|
vlmcsd to use the first available compatible VPN adapter. A
|
||||||
|
single dash (-) disables the use of a VPN adapter if one has
|
||||||
|
been configured in <b>vlmcsd.ini</b>(5). The
|
||||||
|
<i>vpn-adapter-name</i> is <b>not</b> case-sensitive. If the
|
||||||
|
<i>vpn-adapter-name</i> contains spaces (e.g. Ethernet 3),
|
||||||
|
you must enclose it in quotes.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">The default
|
||||||
|
<i>ipv4-address</i> is 10.10.10.9 and the default
|
||||||
|
<i>cidr-mask</i> is 30. If you are using the default values,
|
||||||
|
your VPN adapter uses an IPv4 address of 10.10.10.9 and you
|
||||||
|
can set your activation client to use the easy to remember
|
||||||
|
address 10.10.10.10 (e.g. slmgr /skms 10.10.10.10 or cscript
|
||||||
|
ospp.vbs /sethst:10.10.10.10).</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">The
|
||||||
|
<i>dhcp-lease-duration</i> is a number optionally followed
|
||||||
|
by s, m, h, d or w to indicate seconds, minutes, hours, days
|
||||||
|
or weeks. The default <i>dhcp-lease-duration</i> is 1d (one
|
||||||
|
day). It is normally not required to change this value.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">It is advised
|
||||||
|
not to manually configure your OpenVPN TAP or TeamViewer VPN
|
||||||
|
adapter in "Network Connections". If you set the
|
||||||
|
IPv4 configuration manually anyway, the IPv4 address and the
|
||||||
|
subnet mask must match the <b>-O</b> parameter. It is safe
|
||||||
|
leave the IPv4 configuration to automatic (DHCP). vlmcsd
|
||||||
|
will wait up to four seconds for the DHCP configuration to
|
||||||
|
complete before binding to and listenin on any
|
||||||
|
interfaces.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">You should be
|
||||||
|
aware that only one program can use a VPN adapter at a time.
|
||||||
|
If you use the TeamViewer VPN adapter for example, you will
|
||||||
|
not be able to use the VPN feature of TeamViewer as long as
|
||||||
|
vlmcsd is running. The same applies to OpenVPN TAP adapters
|
||||||
|
that are in use by other programs (for example OpenVPN,
|
||||||
|
QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid
|
||||||
|
conflicts is to install Tap-Windows from OpenVPN, cd to
|
||||||
|
C:\Program Files\TAP-Windows\bin and run addtap.bat to
|
||||||
|
install an additional TAP adapter. Go to "Network
|
||||||
|
Connections" and rename the new adapter to
|
||||||
|
"vlmcsd" and specify <b>-O vlmcsd</b> to use
|
||||||
|
it.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">Example: <b>-O
|
||||||
|
"Ethernet 7"=192.168.123.1/24</b> (uses VPN
|
||||||
|
adapter Ethernet 7 with IPv4 address 192.168.123.1 and have
|
||||||
|
192.168.123.2 to 192.168.123.254 as additional local (but
|
||||||
|
apparently remote) IPv4 addresses.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>-x0</b> and <b>-x1</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Controls under what
|
||||||
|
circumstances vlmcsd will exit. Using the default of
|
||||||
|
<b>-x0</b> vlmcsd stays active as long as it can perform
|
||||||
|
some useful operations. If vlmcsd is run by any form of a
|
||||||
|
watchdog, e.g. NT service manager (Windows), systemd (Linux)
|
||||||
|
or launchd (Mac OS / iOS), it may be desirable to end vlmcsd
|
||||||
|
and let the watchdog restart it. This is especially true if
|
||||||
|
some pre-requisites are not yet met but will be some time
|
||||||
|
later, e.g. network is not yet fully setup.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">By using
|
||||||
|
<b>-x0</b> vlmcsd will</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit if none of
|
||||||
|
the listening sockets specified with <b>-L</b> can be used.
|
||||||
|
It continues if at least one socket can be setup for
|
||||||
|
listening.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit any TAP
|
||||||
|
mirror thread (Windows version only) if there is an error
|
||||||
|
condition while reading or writing from or to the VPN
|
||||||
|
adapter but continue to work without utilizing a VPN
|
||||||
|
adapter.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">By using
|
||||||
|
<b>-x1</b> vlmcsd will</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit if not all
|
||||||
|
listening sockets specified with <b>-L</b> can be used.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit completely
|
||||||
|
if there is a problem with a VPN adapter it is using. This
|
||||||
|
can happen for instance if the VPN adapter has been disabled
|
||||||
|
using "Control Panel - Network - Adapter Settings"
|
||||||
|
while vlmcsd is using it.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">Please note
|
||||||
|
that <b>-x1</b> is kind of a workaround option. While it may
|
||||||
|
help under some circumstances, it is better to solve the
|
||||||
|
problem at its origin, e.g. properly implementing
|
||||||
|
dependencies in your startup script to ensure all network
|
||||||
|
interfaces and the VPN adapter you will use are completely
|
||||||
|
setup before you start vlmcsd.</p>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-F0</b> and <b>-F1</b></p>
|
<p style="margin-left:11%;"><b>-F0</b> and <b>-F1</b></p>
|
||||||
|
|
||||||
<p style="margin-left:22%;">Allow (<b>-F1</b>) or disallow
|
<p style="margin-left:22%;">Allow (<b>-F1</b>) or disallow
|
||||||
@ -506,48 +616,22 @@ unprivileged user has access to these files. You can always
|
|||||||
log to <b>syslog</b>(3) from an unprivileged account on most
|
log to <b>syslog</b>(3) from an unprivileged account on most
|
||||||
platforms (see <b>-l</b>).</p>
|
platforms (see <b>-l</b>).</p>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-w</b> <i>ePID</i></p>
|
<p style="margin-left:11%;"><b>-a</b> <i>CSVLK</i> =
|
||||||
|
<i>ePID</i> [ / <i>HwId</i> ]</p>
|
||||||
|
|
||||||
<p style="margin-left:22%;">Use <i>ePID</i> as Windows
|
<p style="margin-left:22%;">Use <i>ePID</i> and <i>HwId</i>
|
||||||
ePID. If specified, <b>-r</b> is disregarded for
|
for a specific <i>CSVLK</i>. When you use it, <b>-r</b> is
|
||||||
Windows.</p>
|
disregarded for this <i>CSVLK</i>. If vlmcsd uses the
|
||||||
|
default vlmcsd.kmd database, you can use the following
|
||||||
<p style="margin-left:11%;"><b>-0</b> <i>ePID</i></p>
|
<i>CSVLK</i>s: Windows, WinChinaGov, Office2010, Office2013,
|
||||||
|
Office2016 and Office2019. The <b>-a</b> option requires
|
||||||
<p style="margin-left:22%;">Use <i>ePID</i> as Office 2010
|
that database version 1.6 or later is used.</p>
|
||||||
ePID (including Project and Visio). If specified, <b>-r</b>
|
|
||||||
is disregarded for Office 2010.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-3</b> <i>ePID</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Use <i>ePID</i> as Office 2013
|
|
||||||
ePID (including Project and Visio). If specified, <b>-r</b>
|
|
||||||
is disregarded for Office 2013.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-6</b> <i>ePID</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Use <i>ePID</i> as Office 2016
|
|
||||||
ePID (including Project and Visio). If specified, <b>-r</b>
|
|
||||||
is disregarded for Office 2016.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-H</b> <i>HwId</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Use <i>HwId</i> for all
|
|
||||||
products. All HWIDs in the ini file (see <b>-i</b>) will not
|
|
||||||
be used. In an ini file you can specify a seperate HWID for
|
|
||||||
each <i>application-guid</i>. This is not possible when
|
|
||||||
entering a HWID from the command line.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em"><i>HwId</i>
|
<p style="margin-left:22%; margin-top: 1em"><i>HwId</i>
|
||||||
must be specified as 16 hex digits that are interpreted as a
|
must be specified as 16 hex digits that are interpreted as a
|
||||||
series of 8 bytes (big endian). Any character that is not a
|
series of 8 bytes (big endian). Any character that is not a
|
||||||
hex digit will be ignored. This is for better readability.
|
hex digit will be ignored. This is for better
|
||||||
The following commands are identical:</p>
|
readability.</p>
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">vlmcsd -H
|
|
||||||
0123456789ABCDEF <br>
|
|
||||||
vlmcsd -H 01:23:45:67:89:ab:cd:ef <br>
|
|
||||||
vlmcsd -H "01 23 45 67 89 AB CD EF"</p>
|
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-i</b> <i>filename</i></p>
|
<p style="margin-left:11%;"><b>-i</b> <i>filename</i></p>
|
||||||
|
|
||||||
@ -619,8 +703,9 @@ if you send more than one activation request over the same
|
|||||||
TCP connection. This is simply due to the fact that vlmcsd
|
TCP connection. This is simply due to the fact that vlmcsd
|
||||||
is started upon a connection request and does not stay in
|
is started upon a connection request and does not stay in
|
||||||
memory after servicing a KMS request. Consider using
|
memory after servicing a KMS request. Consider using
|
||||||
<b>-r0</b> or <b>-w</b>, <b>-0</b>, <b>-3</b> and <b>-6 when
|
<b>-r0</b> or <b>-w</b>, <b>-G</b>, <b>-0</b>, <b>-3</b> and
|
||||||
starting vlmcsd by an internet superserver.</b></p>
|
<b>-6</b> when starting vlmcsd by an internet
|
||||||
|
superserver.</p>
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em"><b>-r2</b>
|
<p style="margin-left:22%; margin-top: 1em"><b>-r2</b>
|
||||||
behaves like most other KMS server emulators with random
|
behaves like most other KMS server emulators with random
|
||||||
@ -651,6 +736,13 @@ them are not recognized by .NET Framework 4.0.</p>
|
|||||||
emulators use a fixed <i>LCID</i> of 1033 (English - US). To
|
emulators use a fixed <i>LCID</i> of 1033 (English - US). To
|
||||||
achive the same behavior in vlmcsd use <b>-C 1033</b>.</p>
|
achive the same behavior in vlmcsd use <b>-C 1033</b>.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>-H</b> <i>HostBuild</i></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Do not randomize the host build
|
||||||
|
number in the ePID and use <i>HostBuild</i> instead, for
|
||||||
|
instance 17763 for Windows Server 2019 / Windows 10
|
||||||
|
1809.</p>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>-K0</b>, <b>-K1</b>,
|
<p style="margin-left:11%;"><b>-K0</b>, <b>-K1</b>,
|
||||||
<b>-K2</b> and <b>-K3</b></p>
|
<b>-K2</b> and <b>-K3</b></p>
|
||||||
|
|
||||||
@ -963,7 +1055,7 @@ else would be a severe security flaw in the OS.</p></td></tr>
|
|||||||
|
|
||||||
<p style="margin-left:11%; margin-top: 1em">Signaling is
|
<p style="margin-left:11%; margin-top: 1em">Signaling is
|
||||||
not available in the native Windows version and in the
|
not available in the native Windows version and in the
|
||||||
Cygwin version when it runs as Windows service.</p>
|
Cygwin version when vlmcsd runs as a Windows service.</p>
|
||||||
|
|
||||||
<h2>SUPPORTED OPERATING SYSTEMS
|
<h2>SUPPORTED OPERATING SYSTEMS
|
||||||
<a name="SUPPORTED OPERATING SYSTEMS"></a>
|
<a name="SUPPORTED OPERATING SYSTEMS"></a>
|
||||||
@ -985,11 +1077,11 @@ sources or may require minor porting efforts.</p>
|
|||||||
<p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
|
<p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
|
||||||
can answer activation requests for the following products:
|
can answer activation requests for the following products:
|
||||||
Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
||||||
(up to 1607), Windows Server 2008, Windows Server 2008 R2,
|
(up to 1703), Windows Server 2008, Windows Server 2008 R2,
|
||||||
Windows Server 2012, Windows Server 2012 R2, Windows Server
|
Windows Server 2012, Windows Server 2012 R2, Windows Server
|
||||||
2016, Office 2010, Project 2010, Visio 2010, Office 2013,
|
2016, Office 2010, Project 2010, Visio 2010, Office 2013,
|
||||||
Project 2013, Visio 2013, Office 2016, Project 2016, Visio
|
Project 2013, Visio 2013, Office 2016, Project 2016, Visio
|
||||||
2016. Newer version may work as long as the KMS protocol
|
2016. Newer products may work as long as the KMS protocol
|
||||||
does not change. A complete list of fully supported products
|
does not change. A complete list of fully supported products
|
||||||
can be obtained using the <b>-x</b> option of
|
can be obtained using the <b>-x</b> option of
|
||||||
<b>vlmcs</b>(1).</p>
|
<b>vlmcs</b>(1).</p>
|
||||||
@ -1063,8 +1155,8 @@ DougQaid.</p>
|
|||||||
|
|
||||||
|
|
||||||
<p style="margin-left:11%; margin-top: 1em">Thanks to
|
<p style="margin-left:11%; margin-top: 1em">Thanks to
|
||||||
CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad,
|
abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
|
||||||
Ratiborus, ...</p>
|
qad, Ratiborus, ...</p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
<a name="SEE ALSO"></a>
|
<a name="SEE ALSO"></a>
|
||||||
|
BIN
man/vlmcsd.8.pdf
BIN
man/vlmcsd.8.pdf
Binary file not shown.
@ -36,7 +36,7 @@ DESCRIPTION
|
|||||||
client on stdin that wants to be activated.
|
client on stdin that wants to be activated.
|
||||||
|
|
||||||
All options that control setting up listening sockets will be ignored
|
All options that control setting up listening sockets will be ignored
|
||||||
when in inetd mode. The sockets will be set up by your internet super‐
|
when in inetd mode. The sockets will be set up by your internet super-
|
||||||
server. You also cannot limit the number of simultanous clients (option
|
server. You also cannot limit the number of simultanous clients (option
|
||||||
-m). You need to configure the limit in your internet superserver.
|
-m). You need to configure the limit in your internet superserver.
|
||||||
|
|
||||||
@ -49,14 +49,14 @@ DESCRIPTION
|
|||||||
|
|
||||||
EPID Randomization Level 1 (option -r1) works like Level 2
|
EPID Randomization Level 1 (option -r1) works like Level 2
|
||||||
(-r2). You may want to use Level 0 (-r0) or custom EPIDs
|
(-r2). You may want to use Level 0 (-r0) or custom EPIDs
|
||||||
(options -w, -0, -3 and -6) instead.
|
(options -w, -G, -0, -3 and -6) instead.
|
||||||
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
Since vlmcsd can be configured at compile time, some options may not be
|
Since vlmcsd can be configured at compile time, some options may not be
|
||||||
available on your system.
|
available on your system.
|
||||||
|
|
||||||
All options that do no require an argument may be combined with a sin‐
|
All options that do no require an argument may be combined with a sin-
|
||||||
gle dash, for instance "vlmcsd -D -e" is identical to "vlmcsd -De". For
|
gle dash, for instance "vlmcsd -D -e" is identical to "vlmcsd -De". For
|
||||||
all options that require an argument a space between the option and the
|
all options that require an argument a space between the option and the
|
||||||
option argument is optional. Thus "vlmcsd -r 2" and "vlmcsd -r2" are
|
option argument is optional. Thus "vlmcsd -r 2" and "vlmcsd -r2" are
|
||||||
@ -67,7 +67,7 @@ OPTIONS
|
|||||||
Displays help.
|
Displays help.
|
||||||
|
|
||||||
|
|
||||||
-V Displays extended version information. This includes the com‐
|
-V Displays extended version information. This includes the com-
|
||||||
piler used to build vlmcsd, the intended platform and flags
|
piler used to build vlmcsd, the intended platform and flags
|
||||||
(compile time options) to build vlmcsd. If you have the source
|
(compile time options) to build vlmcsd. If you have the source
|
||||||
code of vlmcsd, you can type make help (or gmake help on systems
|
code of vlmcsd, you can type make help (or gmake help on systems
|
||||||
@ -103,7 +103,7 @@ OPTIONS
|
|||||||
Sets the level of protection against activations from public IP
|
Sets the level of protection against activations from public IP
|
||||||
addresses. The default is -o0 for no protection.
|
addresses. The default is -o0 for no protection.
|
||||||
|
|
||||||
-o1 causes vlmcsd not to listen on all IP addresses but on pri‐
|
-o1 causes vlmcsd not to listen on all IP addresses but on pri-
|
||||||
vate IP addresses only. IPv4 addresses in the 100.64.0.0/10
|
vate IP addresses only. IPv4 addresses in the 100.64.0.0/10
|
||||||
range (see RFC6598) are not treated as private since they can be
|
range (see RFC6598) are not treated as private since they can be
|
||||||
reached from other users of your ISP. Private IPv4 addresses are
|
reached from other users of your ISP. Private IPv4 addresses are
|
||||||
@ -129,7 +129,7 @@ OPTIONS
|
|||||||
a single byte sent over the connection. This protects against
|
a single byte sent over the connection. This protects against
|
||||||
clients with public IP addresses even if NAT port forwarding is
|
clients with public IP addresses even if NAT port forwarding is
|
||||||
used. While -o2 offers a higher level of protection than -o1,
|
used. While -o2 offers a higher level of protection than -o1,
|
||||||
the client sees that the KMS TCP port (1688 by default) is actu‐
|
the client sees that the KMS TCP port (1688 by default) is actu-
|
||||||
ally accepting connections.
|
ally accepting connections.
|
||||||
|
|
||||||
If vlmcsd is compiled to use MS RPC, -o2 can only offer very
|
If vlmcsd is compiled to use MS RPC, -o2 can only offer very
|
||||||
@ -153,12 +153,12 @@ OPTIONS
|
|||||||
|
|
||||||
-o1 (and thus -o3) is not (yet) available in some scenarios:
|
-o1 (and thus -o3) is not (yet) available in some scenarios:
|
||||||
|
|
||||||
FreeBSD: There is a longtime unfixed bug ⟨https://
|
FreeBSD: There is a longtime unfixed bug <https://
|
||||||
bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881⟩ in the
|
bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881> in the
|
||||||
32-bit ABI of the 64-bit kernel. If you have a 64-bit Free‐
|
32-bit ABI of the 64-bit kernel. If you have a 64-bit Free-
|
||||||
BSD kernel, you must run the 64-bit version of vlmcsd if
|
BSD kernel, you must run the 64-bit version of vlmcsd if
|
||||||
you use -o1 or -o3. The 32-bit version causes undefined
|
you use -o1 or -o3. The 32-bit version causes undefined
|
||||||
behavior up to crashing vlmcsd. Other BSDs (NetBSD, Open‐
|
behavior up to crashing vlmcsd. Other BSDs (NetBSD, Open-
|
||||||
BSD, Dragonfly and Mac OS X) work correctly.
|
BSD, Dragonfly and Mac OS X) work correctly.
|
||||||
|
|
||||||
If vlmcsd was started by an internet superserver or was
|
If vlmcsd was started by an internet superserver or was
|
||||||
@ -168,53 +168,145 @@ OPTIONS
|
|||||||
|
|
||||||
-P port
|
-P port
|
||||||
Use TCP port for all subsequent -L statements that do not
|
Use TCP port for all subsequent -L statements that do not
|
||||||
include an optional port. If you use -P and -L, -P must be spec‐
|
include an optional port. If you use -P and -L, -P must be spec-
|
||||||
ified before -L.
|
ified before -L.
|
||||||
|
|
||||||
|
|
||||||
|
-O vpn-adapter-name[=ipv4-address][/cidr-mask][:dhcp-lease-duration]
|
||||||
|
Enables a compatible VPN adapter to create additional local IPv4
|
||||||
|
addresses (like 127.0.0.1) that appear as remote IPv4 addresses
|
||||||
|
to the system. This allows product activation using a local
|
||||||
|
instance of vlmcsd. This feature is only available in Windows
|
||||||
|
and Cygwin builds of vlmcsd since it is not of any use on other
|
||||||
|
operating systems. Compatible VPN adapters are Tap-windows ver-
|
||||||
|
sion 8.2 or higher (from OpenVPN) and the TeamViewer VPN
|
||||||
|
adapter. There are two special vpn-adapter-names. A single
|
||||||
|
period (.) instructs vlmcsd to use the first available compati-
|
||||||
|
ble VPN adapter. A single dash (-) disables the use of a VPN
|
||||||
|
adapter if one has been configured in vlmcsd.ini(5). The vpn-
|
||||||
|
adapter-name is not case-sensitive. If the vpn-adapter-name con-
|
||||||
|
tains spaces (e.g. Ethernet 3), you must enclose it in quotes.
|
||||||
|
|
||||||
|
The default ipv4-address is 10.10.10.9 and the default cidr-mask
|
||||||
|
is 30. If you are using the default values, your VPN adapter
|
||||||
|
uses an IPv4 address of 10.10.10.9 and you can set your activa-
|
||||||
|
tion client to use the easy to remember address 10.10.10.10
|
||||||
|
(e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs
|
||||||
|
/sethst:10.10.10.10).
|
||||||
|
|
||||||
|
The dhcp-lease-duration is a number optionally followed by s, m,
|
||||||
|
h, d or w to indicate seconds, minutes, hours, days or weeks.
|
||||||
|
The default dhcp-lease-duration is 1d (one day). It is normally
|
||||||
|
not required to change this value.
|
||||||
|
|
||||||
|
It is advised not to manually configure your OpenVPN TAP or
|
||||||
|
TeamViewer VPN adapter in "Network Connections". If you set the
|
||||||
|
IPv4 configuration manually anyway, the IPv4 address and the
|
||||||
|
subnet mask must match the -O parameter. It is safe leave the
|
||||||
|
IPv4 configuration to automatic (DHCP). vlmcsd will wait up to
|
||||||
|
four seconds for the DHCP configuration to complete before bind-
|
||||||
|
ing to and listenin on any interfaces.
|
||||||
|
|
||||||
|
You should be aware that only one program can use a VPN adapter
|
||||||
|
at a time. If you use the TeamViewer VPN adapter for example,
|
||||||
|
you will not be able to use the VPN feature of TeamViewer as
|
||||||
|
long as vlmcsd is running. The same applies to OpenVPN TAP
|
||||||
|
adapters that are in use by other programs (for example OpenVPN,
|
||||||
|
QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid con-
|
||||||
|
flicts is to install Tap-Windows from OpenVPN, cd to C:\Program
|
||||||
|
Files\TAP-Windows\bin and run addtap.bat to install an addi-
|
||||||
|
tional TAP adapter. Go to "Network Connections" and rename the
|
||||||
|
new adapter to "vlmcsd" and specify -O vlmcsd to use it.
|
||||||
|
|
||||||
|
Example: -O "Ethernet 7"=192.168.123.1/24 (uses VPN adapter Eth-
|
||||||
|
ernet 7 with IPv4 address 192.168.123.1 and have 192.168.123.2
|
||||||
|
to 192.168.123.254 as additional local (but apparently remote)
|
||||||
|
IPv4 addresses.
|
||||||
|
|
||||||
|
|
||||||
|
-x0 and -x1
|
||||||
|
Controls under what circumstances vlmcsd will exit. Using the
|
||||||
|
default of -x0 vlmcsd stays active as long as it can perform
|
||||||
|
some useful operations. If vlmcsd is run by any form of a watch-
|
||||||
|
dog, e.g. NT service manager (Windows), systemd (Linux) or
|
||||||
|
launchd (Mac OS / iOS), it may be desirable to end vlmcsd and
|
||||||
|
let the watchdog restart it. This is especially true if some
|
||||||
|
pre-requisites are not yet met but will be some time later, e.g.
|
||||||
|
network is not yet fully setup.
|
||||||
|
|
||||||
|
By using -x0 vlmcsd will
|
||||||
|
|
||||||
|
exit if none of the listening sockets specified with -L can
|
||||||
|
be used. It continues if at least one socket can be setup
|
||||||
|
for listening.
|
||||||
|
|
||||||
|
exit any TAP mirror thread (Windows version only) if there
|
||||||
|
is an error condition while reading or writing from or to
|
||||||
|
the VPN adapter but continue to work without utilizing a
|
||||||
|
VPN adapter.
|
||||||
|
|
||||||
|
By using -x1 vlmcsd will
|
||||||
|
|
||||||
|
exit if not all listening sockets specified with -L can be
|
||||||
|
used.
|
||||||
|
|
||||||
|
exit completely if there is a problem with a VPN adapter it
|
||||||
|
is using. This can happen for instance if the VPN adapter
|
||||||
|
has been disabled using "Control Panel - Network - Adapter
|
||||||
|
Settings" while vlmcsd is using it.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that -x1 is kind of a workaround option. While it
|
||||||
|
may help under some circumstances, it is better to solve the
|
||||||
|
problem at its origin, e.g. properly implementing dependencies
|
||||||
|
in your startup script to ensure all network interfaces and the
|
||||||
|
VPN adapter you will use are completely setup before you start
|
||||||
|
vlmcsd.
|
||||||
|
|
||||||
|
|
||||||
-F0 and -F1
|
-F0 and -F1
|
||||||
Allow (-F1) or disallow (-F0) binding to IP addresses that are
|
Allow (-F1) or disallow (-F0) binding to IP addresses that are
|
||||||
currently not configured on your system. The default is -F0. -F1
|
currently not configured on your system. The default is -F0. -F1
|
||||||
allows you to bind to an IP address that may be configured after
|
allows you to bind to an IP address that may be configured after
|
||||||
you started vlmcsd. vlmcsd will listen on that address as soon
|
you started vlmcsd. vlmcsd will listen on that address as soon
|
||||||
as it becomes available. This feature is only available under
|
as it becomes available. This feature is only available under
|
||||||
Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
|
Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
|
||||||
this feature only for the root user (more correctly: processes
|
this feature only for the root user (more correctly: processes
|
||||||
that have the PRIV_NETINET_BINDANY privilege). Linux does not
|
that have the PRIV_NETINET_BINDANY privilege). Linux does not
|
||||||
require a capability for this.
|
require a capability for this.
|
||||||
|
|
||||||
|
|
||||||
-t seconds
|
-t seconds
|
||||||
Timeout the TCP connection with the client after seconds sec‐
|
Timeout the TCP connection with the client after seconds sec-
|
||||||
onds. After sending an activation request. RPC keeps the TCP
|
onds. After sending an activation request. RPC keeps the TCP
|
||||||
connection for a while. The default is 30 seconds. You may spec‐
|
connection for a while. The default is 30 seconds. You may spec-
|
||||||
ify a shorter period to free ressources on your device faster.
|
ify a shorter period to free ressources on your device faster.
|
||||||
This is useful for devices with limited main memory or if you
|
This is useful for devices with limited main memory or if you
|
||||||
used -m to limit the concurrent clients that may request activa‐
|
used -m to limit the concurrent clients that may request activa-
|
||||||
tion. Microsoft RPC clients disconnect after 30 seconds by
|
tion. Microsoft RPC clients disconnect after 30 seconds by
|
||||||
default. Setting seconds to a greater value does not make much
|
default. Setting seconds to a greater value does not make much
|
||||||
sense.
|
sense.
|
||||||
|
|
||||||
|
|
||||||
-m concurrent-clients
|
-m concurrent-clients
|
||||||
Limit the number of clients that will be handled concurrently.
|
Limit the number of clients that will be handled concurrently.
|
||||||
This is useful for devices with limited ressources or if you are
|
This is useful for devices with limited ressources or if you are
|
||||||
experiencing DoS attacks that spawn thousands of threads or
|
experiencing DoS attacks that spawn thousands of threads or
|
||||||
forked processes. If additional clients connect to vlmcsd, they
|
forked processes. If additional clients connect to vlmcsd, they
|
||||||
need to wait until another client disconnects. If you set con‐
|
need to wait until another client disconnects. If you set con-
|
||||||
current-clients to a small value ( <10 ), you should also select
|
current-clients to a small value ( <10 ), you should also select
|
||||||
a reasonable timeout of 2 or 3 seconds with -t. The default is
|
a reasonable timeout of 2 or 3 seconds with -t. The default is
|
||||||
no limit.
|
no limit.
|
||||||
|
|
||||||
|
|
||||||
-d Disconnect each client after processing one activation request.
|
-d Disconnect each client after processing one activation request.
|
||||||
This is a direct violation of DCE RPC but may help if you
|
This is a direct violation of DCE RPC but may help if you
|
||||||
receive malicous fake RPC requests that block your threads or
|
receive malicous fake RPC requests that block your threads or
|
||||||
forked processes. Some other KMS emulators (e.g. py-kms) behave
|
forked processes. Some other KMS emulators (e.g. py-kms) behave
|
||||||
this way.
|
this way.
|
||||||
|
|
||||||
|
|
||||||
-k Do not disconnect clients after processing an activation
|
-k Do not disconnect clients after processing an activation
|
||||||
request. This selects the default behavior. -k is useful only if
|
request. This selects the default behavior. -k is useful only if
|
||||||
you used an ini file (see vlmcsd.ini(5) and -i). If the ini file
|
you used an ini file (see vlmcsd.ini(5) and -i). If the ini file
|
||||||
contains the line "DisconnectClientsImmediately = true", you can
|
contains the line "DisconnectClientsImmediately = true", you can
|
||||||
@ -222,144 +314,121 @@ OPTIONS
|
|||||||
|
|
||||||
|
|
||||||
-N0 and -N1
|
-N0 and -N1
|
||||||
Disables (-N0) or enables (-N1) the use of the NDR64 transfer
|
Disables (-N0) or enables (-N1) the use of the NDR64 transfer
|
||||||
syntax in the RPC protocol. Unlike Microsoft vlmcsd supports
|
syntax in the RPC protocol. Unlike Microsoft vlmcsd supports
|
||||||
NDR64 on 32-bit operating systems. Microsoft introduced NDR64 in
|
NDR64 on 32-bit operating systems. Microsoft introduced NDR64 in
|
||||||
Windows Vista but their KMS servers started using it with Win‐
|
Windows Vista but their KMS servers started using it with Win-
|
||||||
dows 8. Thus if you choose random ePIDs, vlmcsd will select
|
dows 8. Thus if you choose random ePIDs, vlmcsd will select
|
||||||
ePIDs with build numbers 9200 and 9600 if you enable NDR64 and
|
ePIDs with build numbers 9200 and 9600 if you enable NDR64 and
|
||||||
build numbers 6002 and 7601 if you disable NDR64. The default is
|
build numbers 6002 and 7601 if you disable NDR64. The default is
|
||||||
to enable NDR64.
|
to enable NDR64.
|
||||||
|
|
||||||
|
|
||||||
-B0 and -B1
|
-B0 and -B1
|
||||||
Disables (-B0) or enables (-B1) bind time feature negotiation
|
Disables (-B0) or enables (-B1) bind time feature negotiation
|
||||||
(BTFN) in the RPC protocol. All Windows operating systems start‐
|
(BTFN) in the RPC protocol. All Windows operating systems start-
|
||||||
ing with Vista support BTFN and try to negotiate it when initi‐
|
ing with Vista support BTFN and try to negotiate it when initi-
|
||||||
ating an RPC connection. Thus consider turning it off as a debug
|
ating an RPC connection. Thus consider turning it off as a debug
|
||||||
/ troubleshooting feature only. Some older firewalls that selec‐
|
/ troubleshooting feature only. Some older firewalls that selec-
|
||||||
tively block or redirect RPC traffic may get confused when they
|
tively block or redirect RPC traffic may get confused when they
|
||||||
detect NDR64 or BTFN.
|
detect NDR64 or BTFN.
|
||||||
|
|
||||||
|
|
||||||
-l filename
|
-l filename
|
||||||
Use filename as a log file. The log file records all activations
|
Use filename as a log file. The log file records all activations
|
||||||
with IP address, Windows workstation name (no reverse DNS
|
with IP address, Windows workstation name (no reverse DNS
|
||||||
lookup), activated product, KMS protocol, time and date. If you
|
lookup), activated product, KMS protocol, time and date. If you
|
||||||
do not specify a log file, no log is created. For a live view of
|
do not specify a log file, no log is created. For a live view of
|
||||||
the log file type tail -f file.
|
the log file type tail -f file.
|
||||||
|
|
||||||
If you use the special filename "syslog", vlmcsd uses syslog(3)
|
If you use the special filename "syslog", vlmcsd uses syslog(3)
|
||||||
for logging. If your system has no syslog service (/dev/log)
|
for logging. If your system has no syslog service (/dev/log)
|
||||||
installed, logging output will go to /dev/console. Syslog log‐
|
installed, logging output will go to /dev/console. Syslog log-
|
||||||
ging is not available in the native Windows version. The Cygwin
|
ging is not available in the native Windows version. The Cygwin
|
||||||
version does support syslog logging.
|
version does support syslog logging.
|
||||||
|
|
||||||
|
|
||||||
-T0 and -T1
|
-T0 and -T1
|
||||||
Disable (-T0) or enable (-T1) the inclusion of date and time in
|
Disable (-T0) or enable (-T1) the inclusion of date and time in
|
||||||
each line of the log. The default is -T1. -T0 is useful if you
|
each line of the log. The default is -T1. -T0 is useful if you
|
||||||
log to stdout(3) which is redirected to another logging mecha‐
|
log to stdout(3) which is redirected to another logging mecha-
|
||||||
nism that already includes date and time in its output, for
|
nism that already includes date and time in its output, for
|
||||||
instance systemd-journald(8). If you log to syslog(3), -T1 is
|
instance systemd-journald(8). If you log to syslog(3), -T1 is
|
||||||
ignored and date and time will never be included in the output
|
ignored and date and time will never be included in the output
|
||||||
sent to syslog(3).
|
sent to syslog(3).
|
||||||
|
|
||||||
|
|
||||||
-D Normally vlmcsd daemonizes and runs in background (except the
|
-D Normally vlmcsd daemonizes and runs in background (except the
|
||||||
native Windows version). If -D is specified, vlmcsd does not
|
native Windows version). If -D is specified, vlmcsd does not
|
||||||
daemonize and runs in foreground. This is useful for testing and
|
daemonize and runs in foreground. This is useful for testing and
|
||||||
allows you to simply press <Ctrl-C> to exit vlmcsd.
|
allows you to simply press <Ctrl-C> to exit vlmcsd.
|
||||||
|
|
||||||
The native Windows version never daemonizes and always behaves
|
The native Windows version never daemonizes and always behaves
|
||||||
as if -D had been specified. You may want to install vlmcsd as a
|
as if -D had been specified. You may want to install vlmcsd as a
|
||||||
service instead. See -s.
|
service instead. See -s.
|
||||||
|
|
||||||
|
|
||||||
-e If specified, vlmcsd ignores -l and writes all logging output to
|
-e If specified, vlmcsd ignores -l and writes all logging output to
|
||||||
stdout(3). This is mainly useful for testing and debugging and
|
stdout(3). This is mainly useful for testing and debugging and
|
||||||
often combined with -D.
|
often combined with -D.
|
||||||
|
|
||||||
|
|
||||||
-v Use verbose logging. Logs every parameter of the base request
|
-v Use verbose logging. Logs every parameter of the base request
|
||||||
and the base response. It also logs the HWID of the KMS server
|
and the base response. It also logs the HWID of the KMS server
|
||||||
if KMS protocol version 6 is used. This option is mainly for
|
if KMS protocol version 6 is used. This option is mainly for
|
||||||
debugging purposes. It only has an effect if some form of log‐
|
debugging purposes. It only has an effect if some form of log-
|
||||||
ging is used. Thus -v does not make sense if not used with -l,
|
ging is used. Thus -v does not make sense if not used with -l,
|
||||||
-e or -f.
|
-e or -f.
|
||||||
|
|
||||||
|
|
||||||
-q Do not use verbose logging. This is actually the default behav‐
|
-q Do not use verbose logging. This is actually the default behav-
|
||||||
ior. It only makes sense if you use vlmcsd with an ini file (see
|
ior. It only makes sense if you use vlmcsd with an ini file (see
|
||||||
-i and vlmcsd.ini(5)). If the ini file contains the line
|
-i and vlmcsd.ini(5)). If the ini file contains the line
|
||||||
"LogVerbose = true" you can use -q to restore the default behav‐
|
"LogVerbose = true" you can use -q to restore the default behav-
|
||||||
ior.
|
ior.
|
||||||
|
|
||||||
|
|
||||||
-p filename
|
-p filename
|
||||||
Create pid file filename. This has nothing to do with KMS ePIDs.
|
Create pid file filename. This has nothing to do with KMS ePIDs.
|
||||||
A pid file is a file where vlmcsd writes its own process id.
|
A pid file is a file where vlmcsd writes its own process id.
|
||||||
This is used by standard init scripts (typically found in
|
This is used by standard init scripts (typically found in
|
||||||
/etc/init.d). The default is not to write a pid file.
|
/etc/init.d). The default is not to write a pid file.
|
||||||
|
|
||||||
|
|
||||||
-u user and -g group
|
-u user and -g group
|
||||||
Causes vlmcsd to run in the specified user and group security
|
Causes vlmcsd to run in the specified user and group security
|
||||||
context. The main purpose for this is to drop root privileges
|
context. The main purpose for this is to drop root privileges
|
||||||
after it has been started from the root account. To use this
|
after it has been started from the root account. To use this
|
||||||
feature from cygwin you must run cyglsa-config and the account
|
feature from cygwin you must run cyglsa-config and the account
|
||||||
from which vlmcsd is started must have the rights "Act as part
|
from which vlmcsd is started must have the rights "Act as part
|
||||||
of the operating system" and "Replace a process level token".
|
of the operating system" and "Replace a process level token".
|
||||||
The native Windows version does not support these options.
|
The native Windows version does not support these options.
|
||||||
|
|
||||||
The actual security context switch is performed after the TCP
|
The actual security context switch is performed after the TCP
|
||||||
sockets have been created. This allows you to use privileged
|
sockets have been created. This allows you to use privileged
|
||||||
ports (< 1024) when you start vlmcsd from the root account.
|
ports (< 1024) when you start vlmcsd from the root account.
|
||||||
|
|
||||||
However if you use an ini, pid or log file, you must ensure that
|
However if you use an ini, pid or log file, you must ensure that
|
||||||
the unprivileged user has access to these files. You can always
|
the unprivileged user has access to these files. You can always
|
||||||
log to syslog(3) from an unprivileged account on most platforms
|
log to syslog(3) from an unprivileged account on most platforms
|
||||||
(see -l).
|
(see -l).
|
||||||
|
|
||||||
|
|
||||||
-w ePID
|
-a CSVLK = ePID [ / HwId ]
|
||||||
Use ePID as Windows ePID. If specified, -r is disregarded for
|
Use ePID and HwId for a specific CSVLK. When you use it, -r is
|
||||||
Windows.
|
disregarded for this CSVLK. If vlmcsd uses the default vlm-
|
||||||
|
csd.kmd database, you can use the following CSVLKs: Windows,
|
||||||
|
WinChinaGov, Office2010, Office2013, Office2016 and Office2019.
|
||||||
|
The -a option requires that database version 1.6 or later is
|
||||||
|
used.
|
||||||
|
|
||||||
|
HwId must be specified as 16 hex digits that are interpreted as
|
||||||
-0 ePID
|
a series of 8 bytes (big endian). Any character that is not a
|
||||||
Use ePID as Office 2010 ePID (including Project and Visio). If
|
hex digit will be ignored. This is for better readability.
|
||||||
specified, -r is disregarded for Office 2010.
|
|
||||||
|
|
||||||
|
|
||||||
-3 ePID
|
|
||||||
Use ePID as Office 2013 ePID (including Project and Visio). If
|
|
||||||
specified, -r is disregarded for Office 2013.
|
|
||||||
|
|
||||||
|
|
||||||
-6 ePID
|
|
||||||
Use ePID as Office 2016 ePID (including Project and Visio). If
|
|
||||||
specified, -r is disregarded for Office 2016.
|
|
||||||
|
|
||||||
|
|
||||||
-H HwId
|
|
||||||
Use HwId for all products. All HWIDs in the ini file (see -i)
|
|
||||||
will not be used. In an ini file you can specify a seperate HWID
|
|
||||||
for each application-guid. This is not possible when entering a
|
|
||||||
HWID from the command line.
|
|
||||||
|
|
||||||
HwId must be specified as 16 hex digits that are interpreted as
|
|
||||||
a series of 8 bytes (big endian). Any character that is not a
|
|
||||||
hex digit will be ignored. This is for better readability. The
|
|
||||||
following commands are identical:
|
|
||||||
|
|
||||||
vlmcsd -H 0123456789ABCDEF
|
|
||||||
vlmcsd -H 01:23:45:67:89:ab:cd:ef
|
|
||||||
vlmcsd -H "01 23 45 67 89 AB CD EF"
|
|
||||||
|
|
||||||
|
|
||||||
-i filename
|
-i filename
|
||||||
Use configuration file (aka ini file) filename. Most configura‐
|
Use configuration file (aka ini file) filename. Most configura-
|
||||||
tion parameters can be set either via the command line or an ini
|
tion parameters can be set either via the command line or an ini
|
||||||
file. The command line always has precedence over configuration
|
file. The command line always has precedence over configuration
|
||||||
items in the ini file. See vlmcsd.ini(5) for the format of the
|
items in the ini file. See vlmcsd.ini(5) for the format of the
|
||||||
@ -373,7 +442,7 @@ OPTIONS
|
|||||||
-j filename
|
-j filename
|
||||||
Use KMS data file filename. By default vlmcsd only contains the
|
Use KMS data file filename. By default vlmcsd only contains the
|
||||||
minimum product data that is required to perform all operations
|
minimum product data that is required to perform all operations
|
||||||
correctly. You may use a more complete KMS data file that con‐
|
correctly. You may use a more complete KMS data file that con-
|
||||||
tains all detailed product names. This is especially useful if
|
tains all detailed product names. This is especially useful if
|
||||||
you are logging KMS requests. If you don't log, there is no need
|
you are logging KMS requests. If you don't log, there is no need
|
||||||
to load an external KMS data file.
|
to load an external KMS data file.
|
||||||
@ -414,8 +483,8 @@ OPTIONS
|
|||||||
more than one activation request over the same TCP connection.
|
more than one activation request over the same TCP connection.
|
||||||
This is simply due to the fact that vlmcsd is started upon a
|
This is simply due to the fact that vlmcsd is started upon a
|
||||||
connection request and does not stay in memory after servicing a
|
connection request and does not stay in memory after servicing a
|
||||||
KMS request. Consider using -r0 or -w, -0, -3 and -6 when start‐
|
KMS request. Consider using -r0 or -w, -G, -0, -3 and -6 when
|
||||||
ing vlmcsd by an internet superserver.
|
starting vlmcsd by an internet superserver.
|
||||||
|
|
||||||
-r2 behaves like most other KMS server emulators with random
|
-r2 behaves like most other KMS server emulators with random
|
||||||
support and generates a new random ePID on every request. -r2
|
support and generates a new random ePID on every request. -r2
|
||||||
@ -434,14 +503,20 @@ OPTIONS
|
|||||||
by .NET Framework 4.0. This may lead to a locale id which is
|
by .NET Framework 4.0. This may lead to a locale id which is
|
||||||
unlikely to occur in your country, for instance 2155 for "Quecha
|
unlikely to occur in your country, for instance 2155 for "Quecha
|
||||||
- Ecuador". You may want to select the locale id of your country
|
- Ecuador". You may want to select the locale id of your country
|
||||||
instead. See MSDN ⟨http://msdn.microsoft.com/en-us/goglobal/
|
instead. See MSDN <http://msdn.microsoft.com/en-us/goglobal/
|
||||||
bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
|
bb964664.aspx> for a list of valid LCIDs. Please note that some
|
||||||
of them are not recognized by .NET Framework 4.0.
|
of them are not recognized by .NET Framework 4.0.
|
||||||
|
|
||||||
Most other KMS emulators use a fixed LCID of 1033 (English -
|
Most other KMS emulators use a fixed LCID of 1033 (English -
|
||||||
US). To achive the same behavior in vlmcsd use -C 1033.
|
US). To achive the same behavior in vlmcsd use -C 1033.
|
||||||
|
|
||||||
|
|
||||||
|
-H HostBuild
|
||||||
|
Do not randomize the host build number in the ePID and use Host-
|
||||||
|
Build instead, for instance 17763 for Windows Server 2019 / Win-
|
||||||
|
dows 10 1809.
|
||||||
|
|
||||||
|
|
||||||
-K0, -K1, -K2 and -K3
|
-K0, -K1, -K2 and -K3
|
||||||
Sets the whitelisting level to determine which products vlmcsd
|
Sets the whitelisting level to determine which products vlmcsd
|
||||||
activates or refuses. The default is -K0.
|
activates or refuses. The default is -K0.
|
||||||
@ -478,29 +553,29 @@ OPTIONS
|
|||||||
|
|
||||||
-M0 and -M1
|
-M0 and -M1
|
||||||
Disables (-M0) or enables (-M1) maintaining a list of client
|
Disables (-M0) or enables (-M1) maintaining a list of client
|
||||||
machine IDs (CMIDs). The default is -M0. -M1 is useful to pre‐
|
machine IDs (CMIDs). The default is -M0. -M1 is useful to pre-
|
||||||
vent emulator detection. By maintaing a CMID list, vlmcsd
|
vent emulator detection. By maintaing a CMID list, vlmcsd
|
||||||
reports current active clients exactly like a genuine KMS emula‐
|
reports current active clients exactly like a genuine KMS emula-
|
||||||
tor. This includes bug compatibility to the extent that you can
|
tor. This includes bug compatibility to the extent that you can
|
||||||
permanently kill a genuine KMS emulator by sending an "over‐
|
permanently kill a genuine KMS emulator by sending an "over-
|
||||||
charge request" with a required client count of 376 or more and
|
charge request" with a required client count of 376 or more and
|
||||||
then request activation for 671 clients. vlmcsd can be reset
|
then request activation for 671 clients. vlmcsd can be reset
|
||||||
from this condition by restarting it. If -M0 is used, vlmcsd
|
from this condition by restarting it. If -M0 is used, vlmcsd
|
||||||
reports current active clients as good as possible. If no client
|
reports current active clients as good as possible. If no client
|
||||||
sends an "overcharge request", it is not possible to detect vlm‐
|
sends an "overcharge request", it is not possible to detect vlm-
|
||||||
csd as an emulator with -M0. -M1 requires the allocation of a
|
csd as an emulator with -M0. -M1 requires the allocation of a
|
||||||
buffer that is about 50 kB in size. On hardware with few memory
|
buffer that is about 50 kB in size. On hardware with few memory
|
||||||
resources use it only if you really need it.
|
resources use it only if you really need it.
|
||||||
|
|
||||||
If you start vlmcsd from an internet superserver, -M1 cannot be
|
If you start vlmcsd from an internet superserver, -M1 cannot be
|
||||||
used. Since vlmcsd exits after each activation, it cannot main‐
|
used. Since vlmcsd exits after each activation, it cannot main-
|
||||||
tain any state in memory.
|
tain any state in memory.
|
||||||
|
|
||||||
|
|
||||||
-E0 and -E1
|
-E0 and -E1
|
||||||
These options are ignored if you do not also specify -M1. If you
|
These options are ignored if you do not also specify -M1. If you
|
||||||
use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
|
use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
|
||||||
server. Clients activate immediately. -E1 lets you start up vlm‐
|
server. Clients activate immediately. -E1 lets you start up vlm-
|
||||||
csd with an empty CMID list. Activation will start when the
|
csd with an empty CMID list. Activation will start when the
|
||||||
required minimum clients (25 for Windows Client OSses, 5 for
|
required minimum clients (25 for Windows Client OSses, 5 for
|
||||||
Windows Server OSses and Office) have registered with the KMS
|
Windows Server OSses and Office) have registered with the KMS
|
||||||
@ -517,7 +592,7 @@ OPTIONS
|
|||||||
-R renewal-interval
|
-R renewal-interval
|
||||||
Instructs clients to renew activation every renewal-interval.
|
Instructs clients to renew activation every renewal-interval.
|
||||||
The renewal-interval is a number optionally immediately followed
|
The renewal-interval is a number optionally immediately followed
|
||||||
by a letter indicating the unit. Valid unit letters are s (sec‐
|
by a letter indicating the unit. Valid unit letters are s (sec-
|
||||||
onds), m (minutes), h (hours), d (days) and w (weeks). If you do
|
onds), m (minutes), h (hours), d (days) and w (weeks). If you do
|
||||||
not specify a letter, minutes is assumed.
|
not specify a letter, minutes is assumed.
|
||||||
|
|
||||||
@ -531,14 +606,14 @@ OPTIONS
|
|||||||
before your activation expires (usually 180 days).
|
before your activation expires (usually 180 days).
|
||||||
|
|
||||||
Even though you can specify seconds, the granularity of this
|
Even though you can specify seconds, the granularity of this
|
||||||
option is 1 minute. Seconds are rounded down to the next multi‐
|
option is 1 minute. Seconds are rounded down to the next multi-
|
||||||
ple of 60.
|
ple of 60.
|
||||||
|
|
||||||
|
|
||||||
-A activation-interval
|
-A activation-interval
|
||||||
Instructs clients to retry activation every activation-interval
|
Instructs clients to retry activation every activation-interval
|
||||||
if it was unsuccessful, e.g. because it could not reach the
|
if it was unsuccessful, e.g. because it could not reach the
|
||||||
server. The default is 120 (identical to 2h). activation-inter‐
|
server. The default is 120 (identical to 2h). activation-inter-
|
||||||
val follows the same syntax as renewal-interval in the -R
|
val follows the same syntax as renewal-interval in the -R
|
||||||
option.
|
option.
|
||||||
|
|
||||||
@ -547,7 +622,7 @@ OPTIONS
|
|||||||
with the native Windows version and Cygwin. Combine -s with
|
with the native Windows version and Cygwin. Combine -s with
|
||||||
other command line options. These will be in effect when you
|
other command line options. These will be in effect when you
|
||||||
start the service. The service automatically starts when you
|
start the service. The service automatically starts when you
|
||||||
reboot your machine. To start it manually, type "net start vlm‐
|
reboot your machine. To start it manually, type "net start vlm-
|
||||||
csd".
|
csd".
|
||||||
|
|
||||||
If you use Cygwin, you must include your Cygwin system DLL
|
If you use Cygwin, you must include your Cygwin system DLL
|
||||||
@ -564,35 +639,35 @@ OPTIONS
|
|||||||
on your system.
|
on your system.
|
||||||
|
|
||||||
|
|
||||||
-S Uninstalls the vlmcsd service. Works only with the native Win‐
|
-S Uninstalls the vlmcsd service. Works only with the native Win-
|
||||||
dows version and Cygwin. All other options will be ignored if
|
dows version and Cygwin. All other options will be ignored if
|
||||||
you include -S in the command line.
|
you include -S in the command line.
|
||||||
|
|
||||||
|
|
||||||
-U [domain\]username
|
-U [domain\]username
|
||||||
Can only be used together with -s. Starts the service as a dif‐
|
Can only be used together with -s. Starts the service as a dif-
|
||||||
ferent user than the local SYSTEM account. This is used to run
|
ferent user than the local SYSTEM account. This is used to run
|
||||||
the service under an account with low privileges. If you omit
|
the service under an account with low privileges. If you omit
|
||||||
the domain, an account from the local computer will be used.
|
the domain, an account from the local computer will be used.
|
||||||
|
|
||||||
You may use "NT AUTHORITY\NetworkService". This is a pseudo user
|
You may use "NT AUTHORITY\NetworkService". This is a pseudo user
|
||||||
with low privileges. You may also use "NT AUTHORITY\LocalSer‐
|
with low privileges. You may also use "NT AUTHORITY\LocalSer-
|
||||||
vice" which has more privileges but these are of no use for run‐
|
vice" which has more privileges but these are of no use for run-
|
||||||
ning vlmcsd.
|
ning vlmcsd.
|
||||||
|
|
||||||
Make sure that the user you specify has at least execute permis‐
|
Make sure that the user you specify has at least execute permis-
|
||||||
sion for your executable. "NT AUTHORITY\NetworkService" normally
|
sion for your executable. "NT AUTHORITY\NetworkService" normally
|
||||||
has no permission to run binaries from your home directory.
|
has no permission to run binaries from your home directory.
|
||||||
|
|
||||||
For your convenience you can use the special username "/l" as a
|
For your convenience you can use the special username "/l" as a
|
||||||
shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
|
shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
|
||||||
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser‐
|
AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser-
|
||||||
vice to run as "NT AUTHORITY\NetworkService".
|
vice to run as "NT AUTHORITY\NetworkService".
|
||||||
|
|
||||||
|
|
||||||
-W password
|
-W password
|
||||||
Can only be used together with -s. Specifies a password for the
|
Can only be used together with -s. Specifies a password for the
|
||||||
corresponding username you use with -U. SYSTEM, "NT AUTHOR‐
|
corresponding username you use with -U. SYSTEM, "NT AUTHOR-
|
||||||
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
|
ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
|
||||||
a password.
|
a password.
|
||||||
|
|
||||||
@ -606,7 +681,7 @@ SIGNALS
|
|||||||
|
|
||||||
|
|
||||||
SIGTERM, SIGINT
|
SIGTERM, SIGINT
|
||||||
These signals cause vlmcsd to exit gracefully. All global sema‐
|
These signals cause vlmcsd to exit gracefully. All global sema-
|
||||||
phores and shared memory pages will be released, the pid file
|
phores and shared memory pages will be released, the pid file
|
||||||
will be unlinked (deleted) and a shutdown message will be
|
will be unlinked (deleted) and a shutdown message will be
|
||||||
logged.
|
logged.
|
||||||
@ -615,7 +690,7 @@ SIGNALS
|
|||||||
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
|
SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
|
||||||
started vlmcsd with an ini file. You can modify the ini file
|
started vlmcsd with an ini file. You can modify the ini file
|
||||||
while vlmcsd is running and then sending SIGHUP, e.g. by typing
|
while vlmcsd is running and then sending SIGHUP, e.g. by typing
|
||||||
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm‐
|
"killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm-
|
||||||
csd.pid`".
|
csd.pid`".
|
||||||
|
|
||||||
The SIGHUP handler has been implemented relatively simple. It is
|
The SIGHUP handler has been implemented relatively simple. It is
|
||||||
@ -623,18 +698,18 @@ SIGNALS
|
|||||||
immediately with the following exceptions:
|
immediately with the following exceptions:
|
||||||
|
|
||||||
|
|
||||||
— The new process does not get a new process id.
|
-- The new process does not get a new process id.
|
||||||
|
|
||||||
— If you used a pid file, it is not deleted and recreated
|
-- If you used a pid file, it is not deleted and recreated
|
||||||
because the process id stays the same.
|
because the process id stays the same.
|
||||||
|
|
||||||
— If you used the 'user' and/or 'group' directive in an ini
|
-- If you used the 'user' and/or 'group' directive in an ini
|
||||||
file these are ignored. This is because once you switched to
|
file these are ignored. This is because once you switched to
|
||||||
lower privileged users and groups, there is no way back. Any‐
|
lower privileged users and groups, there is no way back. Any-
|
||||||
thing else would be a severe security flaw in the OS.
|
thing else would be a severe security flaw in the OS.
|
||||||
|
|
||||||
Signaling is not available in the native Windows version and in the
|
Signaling is not available in the native Windows version and in the
|
||||||
Cygwin version when it runs as Windows service.
|
Cygwin version when vlmcsd runs as a Windows service.
|
||||||
|
|
||||||
|
|
||||||
SUPPORTED OPERATING SYSTEMS
|
SUPPORTED OPERATING SYSTEMS
|
||||||
@ -646,12 +721,12 @@ SUPPORTED OPERATING SYSTEMS
|
|||||||
|
|
||||||
|
|
||||||
SUPPORTED PRODUCTS
|
SUPPORTED PRODUCTS
|
||||||
vlmcsd can answer activation requests for the following products: Win‐
|
vlmcsd can answer activation requests for the following products: Win-
|
||||||
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1607),
|
dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1703),
|
||||||
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win‐
|
Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win-
|
||||||
dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
|
dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
|
||||||
Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
|
Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
|
||||||
2016, Visio 2016. Newer version may work as long as the KMS protocol
|
2016, Visio 2016. Newer products may work as long as the KMS protocol
|
||||||
does not change. A complete list of fully supported products can be
|
does not change. A complete list of fully supported products can be
|
||||||
obtained using the -x option of vlmcs(1).
|
obtained using the -x option of vlmcs(1).
|
||||||
|
|
||||||
@ -670,13 +745,13 @@ EXAMPLES
|
|||||||
|
|
||||||
|
|
||||||
vlmcsd -l /var/log/vlmcsd.log
|
vlmcsd -l /var/log/vlmcsd.log
|
||||||
Starts vlmcsd as a daemon and logs everything to /var/log/vlm‐
|
Starts vlmcsd as a daemon and logs everything to /var/log/vlm-
|
||||||
csd.log.
|
csd.log.
|
||||||
|
|
||||||
|
|
||||||
vlmcsd -L 192.168.1.17
|
vlmcsd -L 192.168.1.17
|
||||||
Starts vlmcsd as a daemon and listens on IP address 192.168.1.17
|
Starts vlmcsd as a daemon and listens on IP address 192.168.1.17
|
||||||
only. This is useful for routers that have a public and a pri‐
|
only. This is useful for routers that have a public and a pri-
|
||||||
vate IP address to prevent your KMS server from becoming public.
|
vate IP address to prevent your KMS server from becoming public.
|
||||||
|
|
||||||
|
|
||||||
@ -696,8 +771,8 @@ AUTHOR
|
|||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati‐
|
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
|
||||||
borus, ...
|
qad, Ratiborus, ...
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
@ -705,4 +780,4 @@ SEE ALSO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hotbird64 November 2016 VLMCSD(8)
|
Hotbird64 October 2018 VLMCSD(8)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH VLMCSD.INI 5 "November 2016" "Hotbird64" "KMS Activation Manual"
|
.TH VLMCSD.INI 5 "October 2018" "Hotbird64" "KMS Activation Manual"
|
||||||
.LO 8
|
.LO 8
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -66,6 +66,41 @@ Set the level of protection against KMS activations from public IP addresses.
|
|||||||
|
|
||||||
For details on public IP protection levels see \fBvlmcsd\fR(8) command line option \fB-o\fR.
|
For details on public IP protection levels see \fBvlmcsd\fR(8) command line option \fB-o\fR.
|
||||||
|
|
||||||
|
.IP "\fBVPN\fR"
|
||||||
|
Has to be in the form \fIvpn-adapter-name\fR[=\fIipv4-address\fR][/\fIcidr-mask\fR][:\fIdhcp-lease-duration\fR].
|
||||||
|
|
||||||
|
Enables a compatible VPN adapter to create additional local IPv4 addresses (like 127.0.0.1) that appear as remote IPv4 addresses to the system. This allows product activation using a local instance of vlmcsd. This feature is only available in Windows and Cygwin builds of vlmcsd since it is not of any use on other operating systems. Compatible VPN adapters are Tap-windows version 8.2 or higher (from OpenVPN) and the TeamViewer VPN adapter. There is a special \fIvpn-adapter-name\fR. A single period (.) instructs vlmcsd to use the first available compatible VPN adapter. The \fIvpn-adapter-name\fR is \fBnot\fR case-sensitive. If the \fIvpn-adapter-name\fR contains spaces (e.g. Ethernet 3), do \fBnot\fR enclose it in quotes.
|
||||||
|
|
||||||
|
The default \fIipv4-address\fR is 10.10.10.9 and the default \fIcidr-mask\fR is 30. If you are using the default values, your VPN adapter uses an IPv4 address of 10.10.10.9 and you can set your activation client to use the easy to remember address 10.10.10.10 (e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs /sethst:10.10.10.10).
|
||||||
|
|
||||||
|
The \fIdhcp-lease-duration\fR is a number optionally followed by s, m, h, d or w to indicate seconds, minutes, hours, days or weeks. The default \fIdhcp-lease-duration\fR is 1d (one day). It is normally not required to change this value.
|
||||||
|
|
||||||
|
It is advised not to manually configure your OpenVPN TAP or TeamViewer VPN adapter in "Network Connections". If you set the IPv4 configuration manually anyway, the IPv4 address and the subnet mask must match the \fBVPN=\fR directive. It is safe leave the IPv4 configuration to automatic (DHCP). vlmcsd will wait up to four seconds for the DHCP configuration to complete before binding to and listenin on any interfaces.
|
||||||
|
|
||||||
|
You should be aware that only one program can use a VPN adapter at a time. If you use the TeamViewer VPN adapter for example, you will not be able to use the VPN feature of TeamViewer as long as vlmcsd is running. The same applies to OpenVPN TAP adapters that are in use by other programs (for example OpenVPN, QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid conflicts is to install Tap-Windows from OpenVPN, cd to C:\\Program Files\\TAP-Windows\\bin and run addtap.bat to install an additional TAP adapter. Go to "Network Connections" and rename the new adapter to "vlmcsd" and specify \fBVPN=vlmcsd\fR to use it.
|
||||||
|
|
||||||
|
.IP "\fBExitLevel"
|
||||||
|
Can be either 0 (the default) or 1. Controls under what circumstances vlmcsd will exit. Using the default of \fB0\fR vlmcsd stays active as long as it can perform some useful operations. If vlmcsd is run by any form of a watchdog, e.g. NT service manager (Windows), systemd (Linux) or launchd (Mac OS / iOS), it may be desirable to end vlmcsd and let the watchdog restart it. This is especially true if some pre-requisites are not yet met but will be some time later, e.g. network is not yet fully setup.
|
||||||
|
|
||||||
|
By using \fBExitLevel = 0\fR vlmcsd will
|
||||||
|
|
||||||
|
.RS 12
|
||||||
|
exit if none of the listening sockets specified with \fB-L\fR can be used. It continues if at least one socket can be setup for listening.
|
||||||
|
|
||||||
|
exit any TAP mirror thread (Windows version only) if there is an error condition while reading or writing from or to the VPN adapter but continue to work without utilizing a VPN adapter.
|
||||||
|
.RE
|
||||||
|
.IP
|
||||||
|
By using \fBExitLevel = 1\fR vlmcsd will
|
||||||
|
|
||||||
|
.RS 12
|
||||||
|
exit if not all listening sockets specified with \fB-L\fR can be used.
|
||||||
|
|
||||||
|
exit completely if there is a problem with a VPN adapter it is using. This may happen for instance if the VPN adapter has been disabled using "Control Panel - Network - Adapter Settings" while vlmcsd is using it.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.IP
|
||||||
|
Please note that \fBExitLevel = 1\fR is kind of a workaround option. While it may help under some circumstances, it is better to solve the problem at its origin, e.g. properly implementing dependencies in your startup script to ensure all network interfaces and the VPN adapter you will use are completely setup before you start vlmcsd.
|
||||||
|
|
||||||
.IP "\fBUseNDR64\fR"
|
.IP "\fBUseNDR64\fR"
|
||||||
Can be TRUE or FALSE. Specifies whether you want to use the NDR64 transfer syntax. See options \fB-n0\fR and \fB-n1\fR in \fBvlmcsd\fR(8). The default is TRUE.
|
Can be TRUE or FALSE. Specifies whether you want to use the NDR64 transfer syntax. See options \fB-n0\fR and \fB-n1\fR in \fBvlmcsd\fR(8). The default is TRUE.
|
||||||
|
|
||||||
@ -76,7 +111,10 @@ Can be TRUE or FALSE. Specifies whether you want to use bind time feature negoti
|
|||||||
The \fIargument\fR must 0, 1 or 2. This specifies the ePID randomization level. See options \fB-r0\fR, \fB-r1\fR and \fB-r2\fR in \fBvlmcsd\fR(8). The default randomization level is 1. A \fBRandomizationLevel\fR of 2 is not recommended and should be treated as a debugging level.
|
The \fIargument\fR must 0, 1 or 2. This specifies the ePID randomization level. See options \fB-r0\fR, \fB-r1\fR and \fB-r2\fR in \fBvlmcsd\fR(8). The default randomization level is 1. A \fBRandomizationLevel\fR of 2 is not recommended and should be treated as a debugging level.
|
||||||
|
|
||||||
.IP "\fBLCID\fR"
|
.IP "\fBLCID\fR"
|
||||||
Use a specific culture id (LCID) even if the ePID is randomized. The \fIargument\fR must be a number between 1 and 32767. While any number in that range is valid, you should use an offcial LCID. A list of assigned LCIDs can be found at http://msdn.microsoft.com/en\-us/goglobal/bb964664.aspx. On the command line you control this setting with option \fB-C\fR.
|
Use a specific culture id (LCID) even if the ePID is randomized. The \fIargument\fR must be a number between 1 and 32767. While any number in that range is valid, you should use an offcial LCID. A list of assigned LCIDs can be found at http://msdn.microsoft.com/en\-us/goglobal/bb964664.aspx. On the command line you control this setting with option \fB-C\fR.
|
||||||
|
|
||||||
|
.IP "\fBHostBuild\fR"
|
||||||
|
Use a specific host build number in the ePID even if it is randomized. The \fIargument\fR must be a number between 1 and 65535. While you can use any number you should only use build numbers that a released build numbers of Windows Servers, e.g. 17763 for Windows Server 2019.
|
||||||
|
|
||||||
.IP "\fBMaxWorkers\fR"
|
.IP "\fBMaxWorkers\fR"
|
||||||
The \fIargument\fR specifies the maximum number of worker processes or threads that will be used to serve activation requests concurrently. This is the same as specifying \fB-m\fR on the command line. Minimum is 1. The maximum is platform specific and is at least 32767 but is likely to be greater on most systems. The default is no limit.
|
The \fIargument\fR specifies the maximum number of worker processes or threads that will be used to serve activation requests concurrently. This is the same as specifying \fB-m\fR on the command line. Minimum is 1. The maximum is platform specific and is at least 32767 but is likely to be greater on most systems. The default is no limit.
|
||||||
@ -143,17 +181,8 @@ Run vlmcsd as another, preferrably less privileged, user. The \fIargument\fR can
|
|||||||
.IP "\fBGroup\fR"
|
.IP "\fBGroup\fR"
|
||||||
Run vlmcsd as another, preferrably less privileged, group. The \fIargument\fR can be a group name or a numeric group id. You must have the required privileges (capabilities on Linux) to change the security context of a process without providing any credentials (a password in most cases). On most unixoid OSses 'root' is the only user who has these privileges in the default configuration. This setting is not available in the native Windows version of vlmcsd. See \fB-g\fR in \fBvlmcsd\fR(8). This setting cannot be changed on the fly by sending SIGHUP to vlmcsd.
|
Run vlmcsd as another, preferrably less privileged, group. The \fIargument\fR can be a group name or a numeric group id. You must have the required privileges (capabilities on Linux) to change the security context of a process without providing any credentials (a password in most cases). On most unixoid OSses 'root' is the only user who has these privileges in the default configuration. This setting is not available in the native Windows version of vlmcsd. See \fB-g\fR in \fBvlmcsd\fR(8). This setting cannot be changed on the fly by sending SIGHUP to vlmcsd.
|
||||||
|
|
||||||
.IP "\fBWindows\fR"
|
.IP "\fB<csvlk-name>\fR"
|
||||||
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Windows activations. If specified, \fBRandomizationLevel\fR for Windows activitations will be ignored.
|
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for activations with \fB<csvlk-name>\fR. If specified, \fBRandomizationLevel\fR for the \fB<csvlk-name>\fR will be ignored. With the default vlmcsd.kmd database you can use the following \fB<csvlk-name>\fRs: Windows, Office2010, Office2013, Office2016, Office2019 and WinChinaGov. While vlmcsd is compatible with older databases, you must use at least database version 1.6 for this feature to work.
|
||||||
|
|
||||||
.IP "\fBOffice2010\fR"
|
|
||||||
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Office 2010 activations. If specified, \fBRandomizationLevel\fR for Office 2010 activitations will be ignored.
|
|
||||||
|
|
||||||
.IP "\fBOffice2013\fR"
|
|
||||||
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Office 2013 activations. If specified, \fBRandomizationLevel\fR for Office 2013 activitations will be ignored.
|
|
||||||
|
|
||||||
.IP "\fBOffice2016\fR"
|
|
||||||
The \fIargument\fR has the form \fIePID\fR [ / \fIHwId\fR ]. Always use \fIePID\fR and \fIHwId\fR for Office 2016 activations. If specified, \fBRandomizationLevel\fR for Office 2016 activitations will be ignored.
|
|
||||||
|
|
||||||
.SH "VALID EPIDS"
|
.SH "VALID EPIDS"
|
||||||
The ePID is currently a comment only. You can specify any string up to 63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs that were used in KMSv5 versions of the "Ratiborus Virtual Machine". Microsoft has given up on blacklisting when KMS emulators appeared in the wild.
|
The ePID is currently a comment only. You can specify any string up to 63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs that were used in KMSv5 versions of the "Ratiborus Virtual Machine". Microsoft has given up on blacklisting when KMS emulators appeared in the wild.
|
||||||
@ -171,7 +200,7 @@ If you are specifying an optional HWID it follows the same syntax as in the \fB\
|
|||||||
\fBvlmcsd\fR(8) was written by crony12, Hotbird64 and vityan666. With contributions from DougQaid.
|
\fBvlmcsd\fR(8) was written by crony12, Hotbird64 and vityan666. With contributions from DougQaid.
|
||||||
|
|
||||||
.SH CREDITS
|
.SH CREDITS
|
||||||
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
|
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
|
||||||
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
\fBvlmcsd\fR(8), \fBvlmcsd\fR(7), \fBvlmcs\fR(1), \fBvlmcsdmulti\fR(1)
|
\fBvlmcsd\fR(8), \fBvlmcsd\fR(7), \fBvlmcs\fR(1), \fBvlmcsdmulti\fR(1)
|
||||||
|
@ -17,7 +17,7 @@ DESCRIPTION
|
|||||||
option on the vlmcsd command line to use an ini file. There is no
|
option on the vlmcsd command line to use an ini file. There is no
|
||||||
default name or default location for the ini file.
|
default name or default location for the ini file.
|
||||||
|
|
||||||
Everything, that can be configured in the ini file, may also be speci‐
|
Everything, that can be configured in the ini file, may also be speci-
|
||||||
fied on the command line. Any configuration option specified on the
|
fied on the command line. Any configuration option specified on the
|
||||||
command line takes precedence over the respective configuration line in
|
command line takes precedence over the respective configuration line in
|
||||||
the ini file.
|
the ini file.
|
||||||
@ -33,16 +33,16 @@ DESCRIPTION
|
|||||||
Differences between command line and configuration file
|
Differences between command line and configuration file
|
||||||
|
|
||||||
If you specify an illegal option or option argument on the command
|
If you specify an illegal option or option argument on the command
|
||||||
line, vlmcsd displays help and exits. If you specify an incorrect key‐
|
line, vlmcsd displays help and exits. If you specify an incorrect key-
|
||||||
word or argument in the ini file, vlmcsd displays a warning with some
|
word or argument in the ini file, vlmcsd displays a warning with some
|
||||||
information, ignores the respective line and continues. This is inten‐
|
information, ignores the respective line and continues. This is inten-
|
||||||
tional and prevents vlmcsd from aborting after a SIGHUP if the configu‐
|
tional and prevents vlmcsd from aborting after a SIGHUP if the configu-
|
||||||
ration was modified incorrectly.
|
ration was modified incorrectly.
|
||||||
|
|
||||||
|
|
||||||
SYNTAX
|
SYNTAX
|
||||||
vlmcsd.ini is a UTF-8 encoded text file with each line being in the
|
vlmcsd.ini is a UTF-8 encoded text file with each line being in the
|
||||||
format keyword = argument. The keyword is not case-sensitive. The argu‐
|
format keyword = argument. The keyword is not case-sensitive. The argu-
|
||||||
ment is treated literally. It is neither required nor allowed to
|
ment is treated literally. It is neither required nor allowed to
|
||||||
enclose the argument in any form of quote characters except when quote
|
enclose the argument in any form of quote characters except when quote
|
||||||
characters are part of the argument itself. Whitespace characters are
|
characters are part of the argument itself. Whitespace characters are
|
||||||
@ -54,14 +54,14 @@ SYNTAX
|
|||||||
|
|
||||||
Lines, that start with '#' or ';' are treated as comments. Empty lines
|
Lines, that start with '#' or ';' are treated as comments. Empty lines
|
||||||
are ignored as well. If a keyword is repeated in another line, vlmcsd
|
are ignored as well. If a keyword is repeated in another line, vlmcsd
|
||||||
will use the argument of the last occurence of the keyword. An excep‐
|
will use the argument of the last occurence of the keyword. An excep-
|
||||||
tion to this is the Listen keyword which can be specified multiple
|
tion to this is the Listen keyword which can be specified multiple
|
||||||
times and causes vlmcsd to listen on more than one IP address and/or
|
times and causes vlmcsd to listen on more than one IP address and/or
|
||||||
port.
|
port.
|
||||||
|
|
||||||
Some arguments are binary arguments that need to be either TRUE or
|
Some arguments are binary arguments that need to be either TRUE or
|
||||||
FALSE. You can use "Yes", "On" or "1" as an alias for TRUE and "No",
|
FALSE. You can use "Yes", "On" or "1" as an alias for TRUE and "No",
|
||||||
"Off" or "0" as an alias for FALSE. Binary arguments are case-insensi‐
|
"Off" or "0" as an alias for FALSE. Binary arguments are case-insensi-
|
||||||
tive.
|
tive.
|
||||||
|
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ KEYWORDS
|
|||||||
was compiled):
|
was compiled):
|
||||||
|
|
||||||
|
|
||||||
Listen This defines on what combinations of IP addresses and ports vlm‐
|
Listen This defines on what combinations of IP addresses and ports vlm-
|
||||||
csd should listen. Listen can be specified more than once. The
|
csd should listen. Listen can be specified more than once. The
|
||||||
argument has the form ipaddress[:port]. If you omit the port,
|
argument has the form ipaddress[:port]. If you omit the port,
|
||||||
the default port of 1688 is used. If the ipaddress contains
|
the default port of 1688 is used. If the ipaddress contains
|
||||||
@ -80,7 +80,7 @@ KEYWORDS
|
|||||||
which means listen to all IPv4 and all IPv6 addresses. See the
|
which means listen to all IPv4 and all IPv6 addresses. See the
|
||||||
-L option in vlmcsd(8) for more info about the syntax. If you
|
-L option in vlmcsd(8) for more info about the syntax. If you
|
||||||
use -L or -P on the command line, all Listen keywords in the ini
|
use -L or -P on the command line, all Listen keywords in the ini
|
||||||
file will be ignored. The Listen keyword cannot be used if vlm‐
|
file will be ignored. The Listen keyword cannot be used if vlm-
|
||||||
csd has been compiled to use Microsoft RPC (Windows and Cygwin
|
csd has been compiled to use Microsoft RPC (Windows and Cygwin
|
||||||
only) or simple sockets.
|
only) or simple sockets.
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ KEYWORDS
|
|||||||
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
||||||
|
|
||||||
|
|
||||||
Port Can only be used if vlmcsd has been compiled to use simple sock‐
|
Port Can only be used if vlmcsd has been compiled to use simple sock-
|
||||||
ets or on Windows and Cygwin if vlmcsd(8) has been compiled to
|
ets or on Windows and Cygwin if vlmcsd(8) has been compiled to
|
||||||
use Microsoft RPC. Otherwise you must use Listen instead. Causes
|
use Microsoft RPC. Otherwise you must use Listen instead. Causes
|
||||||
vlmcsd to listen on that port instead of 1688.
|
vlmcsd to listen on that port instead of 1688.
|
||||||
@ -115,7 +115,7 @@ KEYWORDS
|
|||||||
0 = No protection (default)
|
0 = No protection (default)
|
||||||
1 = Listen on private IP addresses only (plus those specified by
|
1 = Listen on private IP addresses only (plus those specified by
|
||||||
one or more Listen statements)
|
one or more Listen statements)
|
||||||
2 = Disconnect clients with public IP addresses without activat‐
|
2 = Disconnect clients with public IP addresses without activat-
|
||||||
ing
|
ing
|
||||||
3 = Combines 1 and 2
|
3 = Combines 1 and 2
|
||||||
|
|
||||||
@ -123,6 +123,94 @@ KEYWORDS
|
|||||||
line option -o.
|
line option -o.
|
||||||
|
|
||||||
|
|
||||||
|
VPN Has to be in the form vpn-adapter-name[=ipv4-address][/cidr-
|
||||||
|
mask][:dhcp-lease-duration].
|
||||||
|
|
||||||
|
Enables a compatible VPN adapter to create additional local IPv4
|
||||||
|
addresses (like 127.0.0.1) that appear as remote IPv4 addresses
|
||||||
|
to the system. This allows product activation using a local
|
||||||
|
instance of vlmcsd. This feature is only available in Windows
|
||||||
|
and Cygwin builds of vlmcsd since it is not of any use on other
|
||||||
|
operating systems. Compatible VPN adapters are Tap-windows ver-
|
||||||
|
sion 8.2 or higher (from OpenVPN) and the TeamViewer VPN
|
||||||
|
adapter. There is a special vpn-adapter-name. A single period
|
||||||
|
(.) instructs vlmcsd to use the first available compatible VPN
|
||||||
|
adapter. The vpn-adapter-name is not case-sensitive. If the vpn-
|
||||||
|
adapter-name contains spaces (e.g. Ethernet 3), do not enclose
|
||||||
|
it in quotes.
|
||||||
|
|
||||||
|
The default ipv4-address is 10.10.10.9 and the default cidr-mask
|
||||||
|
is 30. If you are using the default values, your VPN adapter
|
||||||
|
uses an IPv4 address of 10.10.10.9 and you can set your activa-
|
||||||
|
tion client to use the easy to remember address 10.10.10.10
|
||||||
|
(e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs
|
||||||
|
/sethst:10.10.10.10).
|
||||||
|
|
||||||
|
The dhcp-lease-duration is a number optionally followed by s, m,
|
||||||
|
h, d or w to indicate seconds, minutes, hours, days or weeks.
|
||||||
|
The default dhcp-lease-duration is 1d (one day). It is normally
|
||||||
|
not required to change this value.
|
||||||
|
|
||||||
|
It is advised not to manually configure your OpenVPN TAP or
|
||||||
|
TeamViewer VPN adapter in "Network Connections". If you set the
|
||||||
|
IPv4 configuration manually anyway, the IPv4 address and the
|
||||||
|
subnet mask must match the VPN= directive. It is safe leave the
|
||||||
|
IPv4 configuration to automatic (DHCP). vlmcsd will wait up to
|
||||||
|
four seconds for the DHCP configuration to complete before bind-
|
||||||
|
ing to and listenin on any interfaces.
|
||||||
|
|
||||||
|
You should be aware that only one program can use a VPN adapter
|
||||||
|
at a time. If you use the TeamViewer VPN adapter for example,
|
||||||
|
you will not be able to use the VPN feature of TeamViewer as
|
||||||
|
long as vlmcsd is running. The same applies to OpenVPN TAP
|
||||||
|
adapters that are in use by other programs (for example OpenVPN,
|
||||||
|
QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid con-
|
||||||
|
flicts is to install Tap-Windows from OpenVPN, cd to C:\Program
|
||||||
|
Files\TAP-Windows\bin and run addtap.bat to install an addi-
|
||||||
|
tional TAP adapter. Go to "Network Connections" and rename the
|
||||||
|
new adapter to "vlmcsd" and specify VPN=vlmcsd to use it.
|
||||||
|
|
||||||
|
|
||||||
|
ExitLevel
|
||||||
|
Can be either 0 (the default) or 1. Controls under what circum-
|
||||||
|
stances vlmcsd will exit. Using the default of 0 vlmcsd stays
|
||||||
|
active as long as it can perform some useful operations. If vlm-
|
||||||
|
csd is run by any form of a watchdog, e.g. NT service manager
|
||||||
|
(Windows), systemd (Linux) or launchd (Mac OS / iOS), it may be
|
||||||
|
desirable to end vlmcsd and let the watchdog restart it. This is
|
||||||
|
especially true if some pre-requisites are not yet met but will
|
||||||
|
be some time later, e.g. network is not yet fully setup.
|
||||||
|
|
||||||
|
By using ExitLevel = 0 vlmcsd will
|
||||||
|
|
||||||
|
exit if none of the listening sockets specified with -L can
|
||||||
|
be used. It continues if at least one socket can be setup
|
||||||
|
for listening.
|
||||||
|
|
||||||
|
exit any TAP mirror thread (Windows version only) if there
|
||||||
|
is an error condition while reading or writing from or to
|
||||||
|
the VPN adapter but continue to work without utilizing a
|
||||||
|
VPN adapter.
|
||||||
|
|
||||||
|
By using ExitLevel = 1 vlmcsd will
|
||||||
|
|
||||||
|
exit if not all listening sockets specified with -L can be
|
||||||
|
used.
|
||||||
|
|
||||||
|
exit completely if there is a problem with a VPN adapter it
|
||||||
|
is using. This may happen for instance if the VPN adapter
|
||||||
|
has been disabled using "Control Panel - Network - Adapter
|
||||||
|
Settings" while vlmcsd is using it.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that ExitLevel = 1 is kind of a workaround option.
|
||||||
|
While it may help under some circumstances, it is better to
|
||||||
|
solve the problem at its origin, e.g. properly implementing
|
||||||
|
dependencies in your startup script to ensure all network inter-
|
||||||
|
faces and the VPN adapter you will use are completely setup
|
||||||
|
before you start vlmcsd.
|
||||||
|
|
||||||
|
|
||||||
UseNDR64
|
UseNDR64
|
||||||
Can be TRUE or FALSE. Specifies whether you want to use the
|
Can be TRUE or FALSE. Specifies whether you want to use the
|
||||||
NDR64 transfer syntax. See options -n0 and -n1 in vlmcsd(8). The
|
NDR64 transfer syntax. See options -n0 and -n1 in vlmcsd(8). The
|
||||||
@ -131,12 +219,12 @@ KEYWORDS
|
|||||||
|
|
||||||
UseBTFN
|
UseBTFN
|
||||||
Can be TRUE or FALSE. Specifies whether you want to use bind
|
Can be TRUE or FALSE. Specifies whether you want to use bind
|
||||||
time feature negotiation in RPC. See options -b0 and -b1 in vlm‐
|
time feature negotiation in RPC. See options -b0 and -b1 in vlm-
|
||||||
csd(8). The default is TRUE.
|
csd(8). The default is TRUE.
|
||||||
|
|
||||||
|
|
||||||
RandomizationLevel
|
RandomizationLevel
|
||||||
The argument must 0, 1 or 2. This specifies the ePID randomiza‐
|
The argument must 0, 1 or 2. This specifies the ePID randomiza-
|
||||||
tion level. See options -r0, -r1 and -r2 in vlmcsd(8). The
|
tion level. See options -r0, -r1 and -r2 in vlmcsd(8). The
|
||||||
default randomization level is 1. A RandomizationLevel of 2 is
|
default randomization level is 1. A RandomizationLevel of 2 is
|
||||||
not recommended and should be treated as a debugging level.
|
not recommended and should be treated as a debugging level.
|
||||||
@ -145,14 +233,22 @@ KEYWORDS
|
|||||||
LCID Use a specific culture id (LCID) even if the ePID is randomized.
|
LCID Use a specific culture id (LCID) even if the ePID is randomized.
|
||||||
The argument must be a number between 1 and 32767. While any
|
The argument must be a number between 1 and 32767. While any
|
||||||
number in that range is valid, you should use an offcial LCID. A
|
number in that range is valid, you should use an offcial LCID. A
|
||||||
list of assigned LCIDs can be found at http://msdn.micro‐
|
list of assigned LCIDs can be found at http://msdn.micro-
|
||||||
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
|
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
|
||||||
control this setting with option -C.
|
control this setting with option -C.
|
||||||
|
|
||||||
|
|
||||||
|
HostBuild
|
||||||
|
Use a specific host build number in the ePID even if it is ran-
|
||||||
|
domized. The argument must be a number between 1 and 65535.
|
||||||
|
While you can use any number you should only use build numbers
|
||||||
|
that a released build numbers of Windows Servers, e.g. 17763 for
|
||||||
|
Windows Server 2019.
|
||||||
|
|
||||||
|
|
||||||
MaxWorkers
|
MaxWorkers
|
||||||
The argument specifies the maximum number of worker processes or
|
The argument specifies the maximum number of worker processes or
|
||||||
threads that will be used to serve activation requests concur‐
|
threads that will be used to serve activation requests concur-
|
||||||
rently. This is the same as specifying -m on the command line.
|
rently. This is the same as specifying -m on the command line.
|
||||||
Minimum is 1. The maximum is platform specific and is at least
|
Minimum is 1. The maximum is platform specific and is at least
|
||||||
32767 but is likely to be greater on most systems. The default
|
32767 but is likely to be greater on most systems. The default
|
||||||
@ -160,13 +256,13 @@ KEYWORDS
|
|||||||
|
|
||||||
|
|
||||||
ConnectionTimeout
|
ConnectionTimeout
|
||||||
Used to control when the vlmcsd disconnects idle TPC connec‐
|
Used to control when the vlmcsd disconnects idle TPC connec-
|
||||||
tions. The default is 30 seconds. This is the same setting as -t
|
tions. The default is 30 seconds. This is the same setting as -t
|
||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
|
|
||||||
DisconnectClientsImmediately
|
DisconnectClientsImmediately
|
||||||
Set this to TRUE to disconnect a client after it got an activa‐
|
Set this to TRUE to disconnect a client after it got an activa-
|
||||||
tion response regardless whether a timeout has occured or not.
|
tion response regardless whether a timeout has occured or not.
|
||||||
The default is FALSE. Setting this to TRUE is non-standard
|
The default is FALSE. Setting this to TRUE is non-standard
|
||||||
behavior. Use only if you are experiencing DoS or DDoS attacks.
|
behavior. Use only if you are experiencing DoS or DDoS attacks.
|
||||||
@ -203,11 +299,11 @@ KEYWORDS
|
|||||||
|
|
||||||
|
|
||||||
LogDateAndTime
|
LogDateAndTime
|
||||||
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, log‐
|
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, log-
|
||||||
ging output does not include date and time. This is useful if
|
ging output does not include date and time. This is useful if
|
||||||
you log to stdout(3) which is redirected to another logging
|
you log to stdout(3) which is redirected to another logging
|
||||||
mechanism that already includes date and time in its output, for
|
mechanism that already includes date and time in its output, for
|
||||||
instance systemd-journald(8). If you log to syslog(3), LogDate‐
|
instance systemd-journald(8). If you log to syslog(3), LogDate-
|
||||||
AndTime is ignored and date and time will never be included in
|
AndTime is ignored and date and time will never be included in
|
||||||
the output sent to syslog(3). Using the command line you control
|
the output sent to syslog(3). Using the command line you control
|
||||||
this setting with options -T0 and -T1.
|
this setting with options -T0 and -T1.
|
||||||
@ -216,7 +312,7 @@ KEYWORDS
|
|||||||
LogVerbose
|
LogVerbose
|
||||||
Set this to either TRUE or FALSE. The default is FALSE. If set
|
Set this to either TRUE or FALSE. The default is FALSE. If set
|
||||||
to TRUE, more details of each activation will be logged. You use
|
to TRUE, more details of each activation will be logged. You use
|
||||||
-v and -q in the command line to control this setting. LogVer‐
|
-v and -q in the command line to control this setting. LogVer-
|
||||||
bose has an effect only if you specify a log file or redirect
|
bose has an effect only if you specify a log file or redirect
|
||||||
logging to stdout(3).
|
logging to stdout(3).
|
||||||
|
|
||||||
@ -237,22 +333,22 @@ KEYWORDS
|
|||||||
|
|
||||||
The SKU ID is not checked. Like a genuine KMS server vlmcsd
|
The SKU ID is not checked. Like a genuine KMS server vlmcsd
|
||||||
activates a product that has a random or unknown SKU ID. If you
|
activates a product that has a random or unknown SKU ID. If you
|
||||||
select 1 or 3, vlmcsd also checks the Application ID for cor‐
|
select 1 or 3, vlmcsd also checks the Application ID for cor-
|
||||||
rectness. If Microsoft introduces a new KMS ID for a new prod‐
|
rectness. If Microsoft introduces a new KMS ID for a new prod-
|
||||||
uct, you cannot activate it if you used 1 or 3 until a new ver‐
|
uct, you cannot activate it if you used 1 or 3 until a new ver-
|
||||||
sion of vlmcsd is available.
|
sion of vlmcsd is available.
|
||||||
|
|
||||||
|
|
||||||
CheckClientTime
|
CheckClientTime
|
||||||
Can be TRUE or FALSE. The default is FALSE. If you set this to
|
Can be TRUE or FALSE. The default is FALSE. If you set this to
|
||||||
TRUE vlmcsd(8) checks if the client time differs no more than
|
TRUE vlmcsd(8) checks if the client time differs no more than
|
||||||
four hours from the system time. This is useful to prevent emu‐
|
four hours from the system time. This is useful to prevent emu-
|
||||||
lator detection. A client that tries to detect an emulator could
|
lator detection. A client that tries to detect an emulator could
|
||||||
simply send two subsequent request with two time stamps that
|
simply send two subsequent request with two time stamps that
|
||||||
differ more than four hours from each other. If both requests
|
differ more than four hours from each other. If both requests
|
||||||
succeed, the server is an emulator. If you set this to TRUE on a
|
succeed, the server is an emulator. If you set this to TRUE on a
|
||||||
system with no reliable time source, activations will fail. It
|
system with no reliable time source, activations will fail. It
|
||||||
is ok to set the correct system time after you started vlm‐
|
is ok to set the correct system time after you started vlm-
|
||||||
csd(8).
|
csd(8).
|
||||||
|
|
||||||
|
|
||||||
@ -273,22 +369,22 @@ KEYWORDS
|
|||||||
about 50 kB in size. On hardware with few memory resources use
|
about 50 kB in size. On hardware with few memory resources use
|
||||||
it only if you really need it.
|
it only if you really need it.
|
||||||
|
|
||||||
If you start vlmcsd(8) from an internet superserver, this set‐
|
If you start vlmcsd(8) from an internet superserver, this set-
|
||||||
ting cannot be used. Since vlmcsd(8) exits after each activa‐
|
ting cannot be used. Since vlmcsd(8) exits after each activa-
|
||||||
tion, it cannot maintain any state in memory.
|
tion, it cannot maintain any state in memory.
|
||||||
|
|
||||||
|
|
||||||
StartEmpty
|
StartEmpty
|
||||||
This setting is ignored if you do not also specify Maintain‐
|
This setting is ignored if you do not also specify Maintain-
|
||||||
Clients = TRUE. If you specify FALSE (the default), vlmcsd(8)
|
Clients = TRUE. If you specify FALSE (the default), vlmcsd(8)
|
||||||
starts up as a fully "charged" KMS server. Clients activate
|
starts up as a fully "charged" KMS server. Clients activate
|
||||||
immediately. StartEmpty = TRUE lets you start up vlmcsd(8) with
|
immediately. StartEmpty = TRUE lets you start up vlmcsd(8) with
|
||||||
an empty CMID list. Activation will start when the required min‐
|
an empty CMID list. Activation will start when the required min-
|
||||||
imum clients (25 for Windows Client OSses, 5 for Windows Server
|
imum clients (25 for Windows Client OSses, 5 for Windows Server
|
||||||
OSses and Office) have registered with the KMS server. As long
|
OSses and Office) have registered with the KMS server. As long
|
||||||
as the minimum client count has not been reached, clients end up
|
as the minimum client count has not been reached, clients end up
|
||||||
in HRESULT 0xC004F038 "The count reported by your Key Management
|
in HRESULT 0xC004F038 "The count reported by your Key Management
|
||||||
Service (KMS) is insufficient. Please contact your system admin‐
|
Service (KMS) is insufficient. Please contact your system admin-
|
||||||
istrator". You may use vlmcs(1) or another KMS client emulator
|
istrator". You may use vlmcs(1) or another KMS client emulator
|
||||||
to "charge" vlmcsd(8). Setting this parameter to TRUE does not
|
to "charge" vlmcsd(8). Setting this parameter to TRUE does not
|
||||||
improve emulator detection prevention. It's primary purpose is
|
improve emulator detection prevention. It's primary purpose is
|
||||||
@ -297,16 +393,16 @@ KEYWORDS
|
|||||||
|
|
||||||
|
|
||||||
ActivationInterval
|
ActivationInterval
|
||||||
This is the same as specifying -A on the command line. See vlm‐
|
This is the same as specifying -A on the command line. See vlm-
|
||||||
csd(8) for details. The default is 2 hours. Example: Activation‐
|
csd(8) for details. The default is 2 hours. Example: Activation-
|
||||||
Interval = 1h
|
Interval = 1h
|
||||||
|
|
||||||
|
|
||||||
RenewalInterval
|
RenewalInterval
|
||||||
This is the same as specifying -R on the command line. See vlm‐
|
This is the same as specifying -R on the command line. See vlm-
|
||||||
csd(8) for details. The default is 7 days. Example: RenewalIn‐
|
csd(8) for details. The default is 7 days. Example: RenewalIn-
|
||||||
terval = 3d. Please note that the KMS client decides itself when
|
terval = 3d. Please note that the KMS client decides itself when
|
||||||
to renew activation. Even though vlmcsd sends the renewal inter‐
|
to renew activation. Even though vlmcsd sends the renewal inter-
|
||||||
val you specify, it is no more than some kind of recommendation
|
val you specify, it is no more than some kind of recommendation
|
||||||
to the client. Older KMS clients did follow the recommendation
|
to the client. Older KMS clients did follow the recommendation
|
||||||
from a KMS server or emulator. Newer clients do not.
|
from a KMS server or emulator. Newer clients do not.
|
||||||
@ -326,58 +422,45 @@ KEYWORDS
|
|||||||
Group Run vlmcsd as another, preferrably less privileged, group. The
|
Group Run vlmcsd as another, preferrably less privileged, group. The
|
||||||
argument can be a group name or a numeric group id. You must
|
argument can be a group name or a numeric group id. You must
|
||||||
have the required privileges (capabilities on Linux) to change
|
have the required privileges (capabilities on Linux) to change
|
||||||
the security context of a process without providing any creden‐
|
the security context of a process without providing any creden-
|
||||||
tials (a password in most cases). On most unixoid OSses 'root'
|
tials (a password in most cases). On most unixoid OSses 'root'
|
||||||
is the only user who has these privileges in the default config‐
|
is the only user who has these privileges in the default config-
|
||||||
uration. This setting is not available in the native Windows
|
uration. This setting is not available in the native Windows
|
||||||
version of vlmcsd. See -g in vlmcsd(8). This setting cannot be
|
version of vlmcsd. See -g in vlmcsd(8). This setting cannot be
|
||||||
changed on the fly by sending SIGHUP to vlmcsd.
|
changed on the fly by sending SIGHUP to vlmcsd.
|
||||||
|
|
||||||
|
|
||||||
Windows
|
<csvlk-name>
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
The argument has the form ePID [ / HwId ]. Always use ePID and
|
||||||
HwId for Windows activations. If specified, RandomizationLevel
|
HwId for activations with <csvlk-name>. If specified, Randomiza-
|
||||||
for Windows activitations will be ignored.
|
tionLevel for the <csvlk-name> will be ignored. With the default
|
||||||
|
vlmcsd.kmd database you can use the following <csvlk-name>s:
|
||||||
|
Windows, Office2010, Office2013, Office2016, Office2019 and
|
||||||
Office2010
|
WinChinaGov. While vlmcsd is compatible with older databases,
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
you must use at least database version 1.6 for this feature to
|
||||||
HwId for Office 2010 activations. If specified, Randomization‐
|
work.
|
||||||
Level for Office 2010 activitations will be ignored.
|
|
||||||
|
|
||||||
|
|
||||||
Office2013
|
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
|
||||||
HwId for Office 2013 activations. If specified, Randomization‐
|
|
||||||
Level for Office 2013 activitations will be ignored.
|
|
||||||
|
|
||||||
|
|
||||||
Office2016
|
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
|
||||||
HwId for Office 2016 activations. If specified, Randomization‐
|
|
||||||
Level for Office 2016 activitations will be ignored.
|
|
||||||
|
|
||||||
|
|
||||||
VALID EPIDS
|
VALID EPIDS
|
||||||
The ePID is currently a comment only. You can specify any string up to
|
The ePID is currently a comment only. You can specify any string up to
|
||||||
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
|
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
|
||||||
that were used in KMSv5 versions of the "Ratiborus Virtual Machine".
|
that were used in KMSv5 versions of the "Ratiborus Virtual Machine".
|
||||||
Microsoft has given up on blacklisting when KMS emulators appeared in
|
Microsoft has given up on blacklisting when KMS emulators appeared in
|
||||||
the wild.
|
the wild.
|
||||||
|
|
||||||
Even if you can use "Activated by cool hacker guys" as an ePID, you may
|
Even if you can use "Activated by cool hacker guys" as an ePID, you may
|
||||||
wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't
|
wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't
|
||||||
know how these "valid" ePIDs look like exactly, do not use GUIDS in
|
know how these "valid" ePIDs look like exactly, do not use GUIDS in
|
||||||
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
|
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
|
||||||
ePIDs.
|
ePIDs.
|
||||||
|
|
||||||
If you use non-ASCII characters in your ePID (you shouldn't do anyway),
|
If you use non-ASCII characters in your ePID (you shouldn't do anyway),
|
||||||
these must be in UTF-8 format. This is especially important when you
|
these must be in UTF-8 format. This is especially important when you
|
||||||
run vlmcsd on Windows or cygwin because UTF-8 is not the default encod‐
|
run vlmcsd on Windows or cygwin because UTF-8 is not the default encod-
|
||||||
ing for most editors.
|
ing for most editors.
|
||||||
|
|
||||||
If you are specifying an optional HWID it follows the same syntax as in
|
If you are specifying an optional HWID it follows the same syntax as in
|
||||||
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
|
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
|
||||||
quotes even if it contains spaces.
|
quotes even if it contains spaces.
|
||||||
|
|
||||||
|
|
||||||
@ -386,13 +469,13 @@ FILES
|
|||||||
|
|
||||||
|
|
||||||
AUTHOR
|
AUTHOR
|
||||||
vlmcsd(8) was written by crony12, Hotbird64 and vityan666. With contri‐
|
vlmcsd(8) was written by crony12, Hotbird64 and vityan666. With contri-
|
||||||
butions from DougQaid.
|
butions from DougQaid.
|
||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati‐
|
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
|
||||||
borus, ...
|
qad, Ratiborus, ...
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
@ -400,4 +483,4 @@ SEE ALSO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hotbird64 November 2016 VLMCSD.INI(5)
|
Hotbird64 October 2018 VLMCSD.INI(5)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!-- Creator : groff version 1.22.3 -->
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
<!-- CreationDate: Mon Nov 28 01:28:23 2016 -->
|
<!-- CreationDate: Sat Oct 20 09:49:39 2018 -->
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
@ -227,6 +227,122 @@ without activating <br>
|
|||||||
public IP protection levels see <b>vlmcsd</b>(8) command
|
public IP protection levels see <b>vlmcsd</b>(8) command
|
||||||
line option <b>-o</b>.</p>
|
line option <b>-o</b>.</p>
|
||||||
|
|
||||||
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
|
cellspacing="0" cellpadding="0">
|
||||||
|
<tr valign="top" align="left">
|
||||||
|
<td width="11%"></td>
|
||||||
|
<td width="4%">
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>VPN</b></p></td>
|
||||||
|
<td width="7%"></td>
|
||||||
|
<td width="78%">
|
||||||
|
|
||||||
|
|
||||||
|
<p>Has to be in the form
|
||||||
|
<i>vpn-adapter-name</i>[=<i>ipv4-address</i>][/<i>cidr-mask</i>][:<i>dhcp-lease-duration</i>].</p> </td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">Enables a
|
||||||
|
compatible VPN adapter to create additional local IPv4
|
||||||
|
addresses (like 127.0.0.1) that appear as remote IPv4
|
||||||
|
addresses to the system. This allows product activation
|
||||||
|
using a local instance of vlmcsd. This feature is only
|
||||||
|
available in Windows and Cygwin builds of vlmcsd since it is
|
||||||
|
not of any use on other operating systems. Compatible VPN
|
||||||
|
adapters are Tap-windows version 8.2 or higher (from
|
||||||
|
OpenVPN) and the TeamViewer VPN adapter. There is a special
|
||||||
|
<i>vpn-adapter-name</i>. A single period (.) instructs
|
||||||
|
vlmcsd to use the first available compatible VPN adapter.
|
||||||
|
The <i>vpn-adapter-name</i> is <b>not</b> case-sensitive. If
|
||||||
|
the <i>vpn-adapter-name</i> contains spaces (e.g. Ethernet
|
||||||
|
3), do <b>not</b> enclose it in quotes.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">The default
|
||||||
|
<i>ipv4-address</i> is 10.10.10.9 and the default
|
||||||
|
<i>cidr-mask</i> is 30. If you are using the default values,
|
||||||
|
your VPN adapter uses an IPv4 address of 10.10.10.9 and you
|
||||||
|
can set your activation client to use the easy to remember
|
||||||
|
address 10.10.10.10 (e.g. slmgr /skms 10.10.10.10 or cscript
|
||||||
|
ospp.vbs /sethst:10.10.10.10).</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">The
|
||||||
|
<i>dhcp-lease-duration</i> is a number optionally followed
|
||||||
|
by s, m, h, d or w to indicate seconds, minutes, hours, days
|
||||||
|
or weeks. The default <i>dhcp-lease-duration</i> is 1d (one
|
||||||
|
day). It is normally not required to change this value.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">It is advised
|
||||||
|
not to manually configure your OpenVPN TAP or TeamViewer VPN
|
||||||
|
adapter in "Network Connections". If you set the
|
||||||
|
IPv4 configuration manually anyway, the IPv4 address and the
|
||||||
|
subnet mask must match the <b>VPN=</b> directive. It is safe
|
||||||
|
leave the IPv4 configuration to automatic (DHCP). vlmcsd
|
||||||
|
will wait up to four seconds for the DHCP configuration to
|
||||||
|
complete before binding to and listenin on any
|
||||||
|
interfaces.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">You should be
|
||||||
|
aware that only one program can use a VPN adapter at a time.
|
||||||
|
If you use the TeamViewer VPN adapter for example, you will
|
||||||
|
not be able to use the VPN feature of TeamViewer as long as
|
||||||
|
vlmcsd is running. The same applies to OpenVPN TAP adapters
|
||||||
|
that are in use by other programs (for example OpenVPN,
|
||||||
|
QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid
|
||||||
|
conflicts is to install Tap-Windows from OpenVPN, cd to
|
||||||
|
C:\Program Files\TAP-Windows\bin and run addtap.bat to
|
||||||
|
install an additional TAP adapter. Go to "Network
|
||||||
|
Connections" and rename the new adapter to
|
||||||
|
"vlmcsd" and specify <b>VPN=vlmcsd</b> to use
|
||||||
|
it.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>ExitLevel</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Can be either 0 (the default)
|
||||||
|
or 1. Controls under what circumstances vlmcsd will exit.
|
||||||
|
Using the default of <b>0</b> vlmcsd stays active as long as
|
||||||
|
it can perform some useful operations. If vlmcsd is run by
|
||||||
|
any form of a watchdog, e.g. NT service manager (Windows),
|
||||||
|
systemd (Linux) or launchd (Mac OS / iOS), it may be
|
||||||
|
desirable to end vlmcsd and let the watchdog restart it.
|
||||||
|
This is especially true if some pre-requisites are not yet
|
||||||
|
met but will be some time later, e.g. network is not yet
|
||||||
|
fully setup.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">By using
|
||||||
|
<b>ExitLevel = 0</b> vlmcsd will</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit if none of
|
||||||
|
the listening sockets specified with <b>-L</b> can be used.
|
||||||
|
It continues if at least one socket can be setup for
|
||||||
|
listening.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit any TAP
|
||||||
|
mirror thread (Windows version only) if there is an error
|
||||||
|
condition while reading or writing from or to the VPN
|
||||||
|
adapter but continue to work without utilizing a VPN
|
||||||
|
adapter.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">By using
|
||||||
|
<b>ExitLevel = 1</b> vlmcsd will</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit if not all
|
||||||
|
listening sockets specified with <b>-L</b> can be used.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:29%; margin-top: 1em">exit completely
|
||||||
|
if there is a problem with a VPN adapter it is using. This
|
||||||
|
may happen for instance if the VPN adapter has been disabled
|
||||||
|
using "Control Panel - Network - Adapter Settings"
|
||||||
|
while vlmcsd is using it.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em">Please note
|
||||||
|
that <b>ExitLevel = 1</b> is kind of a workaround option.
|
||||||
|
While it may help under some circumstances, it is better to
|
||||||
|
solve the problem at its origin, e.g. properly implementing
|
||||||
|
dependencies in your startup script to ensure all network
|
||||||
|
interfaces and the VPN adapter you will use are completely
|
||||||
|
setup before you start vlmcsd.</p>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>UseNDR64</b></p>
|
<p style="margin-left:11%;"><b>UseNDR64</b></p>
|
||||||
|
|
||||||
<p style="margin-left:22%;">Can be TRUE or FALSE. Specifies
|
<p style="margin-left:22%;">Can be TRUE or FALSE. Specifies
|
||||||
@ -272,6 +388,15 @@ the command line you control this setting with option
|
|||||||
<b>-C</b>.</p> </td></tr>
|
<b>-C</b>.</p> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>HostBuild</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">Use a specific host build
|
||||||
|
number in the ePID even if it is randomized. The
|
||||||
|
<i>argument</i> must be a number between 1 and 65535. While
|
||||||
|
you can use any number you should only use build numbers
|
||||||
|
that a released build numbers of Windows Servers, e.g. 17763
|
||||||
|
for Windows Server 2019.</p>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>MaxWorkers</b></p>
|
<p style="margin-left:11%;"><b>MaxWorkers</b></p>
|
||||||
|
|
||||||
<p style="margin-left:22%;">The <i>argument</i> specifies
|
<p style="margin-left:22%;">The <i>argument</i> specifies
|
||||||
@ -514,37 +639,19 @@ Windows version of vlmcsd. See <b>-g</b> in
|
|||||||
by sending SIGHUP to vlmcsd.</p></td></tr>
|
by sending SIGHUP to vlmcsd.</p></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>Windows</b></p>
|
<p style="margin-left:11%;"><b><csvlk-name></b></p>
|
||||||
|
|
||||||
<p style="margin-left:22%;">The <i>argument</i> has the
|
<p style="margin-left:22%;">The <i>argument</i> has the
|
||||||
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
|
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
|
||||||
and <i>HwId</i> for Windows activations. If specified,
|
and <i>HwId</i> for activations with
|
||||||
<b>RandomizationLevel</b> for Windows activitations will be
|
<b><csvlk-name></b>. If specified,
|
||||||
ignored.</p>
|
<b>RandomizationLevel</b> for the <b><csvlk-name></b>
|
||||||
|
will be ignored. With the default vlmcsd.kmd database you
|
||||||
<p style="margin-left:11%;"><b>Office2010</b></p>
|
can use the following <b><csvlk-name></b>s: Windows,
|
||||||
|
Office2010, Office2013, Office2016, Office2019 and
|
||||||
<p style="margin-left:22%;">The <i>argument</i> has the
|
WinChinaGov. While vlmcsd is compatible with older
|
||||||
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
|
databases, you must use at least database version 1.6 for
|
||||||
and <i>HwId</i> for Office 2010 activations. If specified,
|
this feature to work.</p>
|
||||||
<b>RandomizationLevel</b> for Office 2010 activitations will
|
|
||||||
be ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>Office2013</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">The <i>argument</i> has the
|
|
||||||
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
|
|
||||||
and <i>HwId</i> for Office 2013 activations. If specified,
|
|
||||||
<b>RandomizationLevel</b> for Office 2013 activitations will
|
|
||||||
be ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:11%;"><b>Office2016</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">The <i>argument</i> has the
|
|
||||||
form <i>ePID</i> [ / <i>HwId</i> ]. Always use <i>ePID</i>
|
|
||||||
and <i>HwId</i> for Office 2016 activations. If specified,
|
|
||||||
<b>RandomizationLevel</b> for Office 2016 activitations will
|
|
||||||
be ignored.</p>
|
|
||||||
|
|
||||||
<h2>VALID EPIDS
|
<h2>VALID EPIDS
|
||||||
<a name="VALID EPIDS"></a>
|
<a name="VALID EPIDS"></a>
|
||||||
@ -603,8 +710,8 @@ contributions from DougQaid.</p>
|
|||||||
|
|
||||||
|
|
||||||
<p style="margin-left:11%; margin-top: 1em">Thanks to
|
<p style="margin-left:11%; margin-top: 1em">Thanks to
|
||||||
CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad,
|
abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
|
||||||
Ratiborus, ...</p>
|
qad, Ratiborus, ...</p>
|
||||||
|
|
||||||
<h2>SEE ALSO
|
<h2>SEE ALSO
|
||||||
<a name="SEE ALSO"></a>
|
<a name="SEE ALSO"></a>
|
||||||
|
Binary file not shown.
@ -17,7 +17,7 @@ DESCRIPTION
|
|||||||
option on the vlmcsd command line to use an ini file. There is no
|
option on the vlmcsd command line to use an ini file. There is no
|
||||||
default name or default location for the ini file.
|
default name or default location for the ini file.
|
||||||
|
|
||||||
Everything, that can be configured in the ini file, may also be speci‐
|
Everything, that can be configured in the ini file, may also be speci-
|
||||||
fied on the command line. Any configuration option specified on the
|
fied on the command line. Any configuration option specified on the
|
||||||
command line takes precedence over the respective configuration line in
|
command line takes precedence over the respective configuration line in
|
||||||
the ini file.
|
the ini file.
|
||||||
@ -33,16 +33,16 @@ DESCRIPTION
|
|||||||
Differences between command line and configuration file
|
Differences between command line and configuration file
|
||||||
|
|
||||||
If you specify an illegal option or option argument on the command
|
If you specify an illegal option or option argument on the command
|
||||||
line, vlmcsd displays help and exits. If you specify an incorrect key‐
|
line, vlmcsd displays help and exits. If you specify an incorrect key-
|
||||||
word or argument in the ini file, vlmcsd displays a warning with some
|
word or argument in the ini file, vlmcsd displays a warning with some
|
||||||
information, ignores the respective line and continues. This is inten‐
|
information, ignores the respective line and continues. This is inten-
|
||||||
tional and prevents vlmcsd from aborting after a SIGHUP if the configu‐
|
tional and prevents vlmcsd from aborting after a SIGHUP if the configu-
|
||||||
ration was modified incorrectly.
|
ration was modified incorrectly.
|
||||||
|
|
||||||
|
|
||||||
SYNTAX
|
SYNTAX
|
||||||
vlmcsd.ini is a UTF-8 encoded text file with each line being in the
|
vlmcsd.ini is a UTF-8 encoded text file with each line being in the
|
||||||
format keyword = argument. The keyword is not case-sensitive. The argu‐
|
format keyword = argument. The keyword is not case-sensitive. The argu-
|
||||||
ment is treated literally. It is neither required nor allowed to
|
ment is treated literally. It is neither required nor allowed to
|
||||||
enclose the argument in any form of quote characters except when quote
|
enclose the argument in any form of quote characters except when quote
|
||||||
characters are part of the argument itself. Whitespace characters are
|
characters are part of the argument itself. Whitespace characters are
|
||||||
@ -54,14 +54,14 @@ SYNTAX
|
|||||||
|
|
||||||
Lines, that start with '#' or ';' are treated as comments. Empty lines
|
Lines, that start with '#' or ';' are treated as comments. Empty lines
|
||||||
are ignored as well. If a keyword is repeated in another line, vlmcsd
|
are ignored as well. If a keyword is repeated in another line, vlmcsd
|
||||||
will use the argument of the last occurence of the keyword. An excep‐
|
will use the argument of the last occurence of the keyword. An excep-
|
||||||
tion to this is the Listen keyword which can be specified multiple
|
tion to this is the Listen keyword which can be specified multiple
|
||||||
times and causes vlmcsd to listen on more than one IP address and/or
|
times and causes vlmcsd to listen on more than one IP address and/or
|
||||||
port.
|
port.
|
||||||
|
|
||||||
Some arguments are binary arguments that need to be either TRUE or
|
Some arguments are binary arguments that need to be either TRUE or
|
||||||
FALSE. You can use "Yes", "On" or "1" as an alias for TRUE and "No",
|
FALSE. You can use "Yes", "On" or "1" as an alias for TRUE and "No",
|
||||||
"Off" or "0" as an alias for FALSE. Binary arguments are case-insensi‐
|
"Off" or "0" as an alias for FALSE. Binary arguments are case-insensi-
|
||||||
tive.
|
tive.
|
||||||
|
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ KEYWORDS
|
|||||||
was compiled):
|
was compiled):
|
||||||
|
|
||||||
|
|
||||||
Listen This defines on what combinations of IP addresses and ports vlm‐
|
Listen This defines on what combinations of IP addresses and ports vlm-
|
||||||
csd should listen. Listen can be specified more than once. The
|
csd should listen. Listen can be specified more than once. The
|
||||||
argument has the form ipaddress[:port]. If you omit the port,
|
argument has the form ipaddress[:port]. If you omit the port,
|
||||||
the default port of 1688 is used. If the ipaddress contains
|
the default port of 1688 is used. If the ipaddress contains
|
||||||
@ -80,7 +80,7 @@ KEYWORDS
|
|||||||
which means listen to all IPv4 and all IPv6 addresses. See the
|
which means listen to all IPv4 and all IPv6 addresses. See the
|
||||||
-L option in vlmcsd(8) for more info about the syntax. If you
|
-L option in vlmcsd(8) for more info about the syntax. If you
|
||||||
use -L or -P on the command line, all Listen keywords in the ini
|
use -L or -P on the command line, all Listen keywords in the ini
|
||||||
file will be ignored. The Listen keyword cannot be used if vlm‐
|
file will be ignored. The Listen keyword cannot be used if vlm-
|
||||||
csd has been compiled to use Microsoft RPC (Windows and Cygwin
|
csd has been compiled to use Microsoft RPC (Windows and Cygwin
|
||||||
only) or simple sockets.
|
only) or simple sockets.
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ KEYWORDS
|
|||||||
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
|
||||||
|
|
||||||
|
|
||||||
Port Can only be used if vlmcsd has been compiled to use simple sock‐
|
Port Can only be used if vlmcsd has been compiled to use simple sock-
|
||||||
ets or on Windows and Cygwin if vlmcsd(8) has been compiled to
|
ets or on Windows and Cygwin if vlmcsd(8) has been compiled to
|
||||||
use Microsoft RPC. Otherwise you must use Listen instead. Causes
|
use Microsoft RPC. Otherwise you must use Listen instead. Causes
|
||||||
vlmcsd to listen on that port instead of 1688.
|
vlmcsd to listen on that port instead of 1688.
|
||||||
@ -115,7 +115,7 @@ KEYWORDS
|
|||||||
0 = No protection (default)
|
0 = No protection (default)
|
||||||
1 = Listen on private IP addresses only (plus those specified by
|
1 = Listen on private IP addresses only (plus those specified by
|
||||||
one or more Listen statements)
|
one or more Listen statements)
|
||||||
2 = Disconnect clients with public IP addresses without activat‐
|
2 = Disconnect clients with public IP addresses without activat-
|
||||||
ing
|
ing
|
||||||
3 = Combines 1 and 2
|
3 = Combines 1 and 2
|
||||||
|
|
||||||
@ -123,6 +123,94 @@ KEYWORDS
|
|||||||
line option -o.
|
line option -o.
|
||||||
|
|
||||||
|
|
||||||
|
VPN Has to be in the form vpn-adapter-name[=ipv4-address][/cidr-
|
||||||
|
mask][:dhcp-lease-duration].
|
||||||
|
|
||||||
|
Enables a compatible VPN adapter to create additional local IPv4
|
||||||
|
addresses (like 127.0.0.1) that appear as remote IPv4 addresses
|
||||||
|
to the system. This allows product activation using a local
|
||||||
|
instance of vlmcsd. This feature is only available in Windows
|
||||||
|
and Cygwin builds of vlmcsd since it is not of any use on other
|
||||||
|
operating systems. Compatible VPN adapters are Tap-windows ver-
|
||||||
|
sion 8.2 or higher (from OpenVPN) and the TeamViewer VPN
|
||||||
|
adapter. There is a special vpn-adapter-name. A single period
|
||||||
|
(.) instructs vlmcsd to use the first available compatible VPN
|
||||||
|
adapter. The vpn-adapter-name is not case-sensitive. If the vpn-
|
||||||
|
adapter-name contains spaces (e.g. Ethernet 3), do not enclose
|
||||||
|
it in quotes.
|
||||||
|
|
||||||
|
The default ipv4-address is 10.10.10.9 and the default cidr-mask
|
||||||
|
is 30. If you are using the default values, your VPN adapter
|
||||||
|
uses an IPv4 address of 10.10.10.9 and you can set your activa-
|
||||||
|
tion client to use the easy to remember address 10.10.10.10
|
||||||
|
(e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs
|
||||||
|
/sethst:10.10.10.10).
|
||||||
|
|
||||||
|
The dhcp-lease-duration is a number optionally followed by s, m,
|
||||||
|
h, d or w to indicate seconds, minutes, hours, days or weeks.
|
||||||
|
The default dhcp-lease-duration is 1d (one day). It is normally
|
||||||
|
not required to change this value.
|
||||||
|
|
||||||
|
It is advised not to manually configure your OpenVPN TAP or
|
||||||
|
TeamViewer VPN adapter in "Network Connections". If you set the
|
||||||
|
IPv4 configuration manually anyway, the IPv4 address and the
|
||||||
|
subnet mask must match the VPN= directive. It is safe leave the
|
||||||
|
IPv4 configuration to automatic (DHCP). vlmcsd will wait up to
|
||||||
|
four seconds for the DHCP configuration to complete before bind-
|
||||||
|
ing to and listenin on any interfaces.
|
||||||
|
|
||||||
|
You should be aware that only one program can use a VPN adapter
|
||||||
|
at a time. If you use the TeamViewer VPN adapter for example,
|
||||||
|
you will not be able to use the VPN feature of TeamViewer as
|
||||||
|
long as vlmcsd is running. The same applies to OpenVPN TAP
|
||||||
|
adapters that are in use by other programs (for example OpenVPN,
|
||||||
|
QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid con-
|
||||||
|
flicts is to install Tap-Windows from OpenVPN, cd to C:\Program
|
||||||
|
Files\TAP-Windows\bin and run addtap.bat to install an addi-
|
||||||
|
tional TAP adapter. Go to "Network Connections" and rename the
|
||||||
|
new adapter to "vlmcsd" and specify VPN=vlmcsd to use it.
|
||||||
|
|
||||||
|
|
||||||
|
ExitLevel
|
||||||
|
Can be either 0 (the default) or 1. Controls under what circum-
|
||||||
|
stances vlmcsd will exit. Using the default of 0 vlmcsd stays
|
||||||
|
active as long as it can perform some useful operations. If vlm-
|
||||||
|
csd is run by any form of a watchdog, e.g. NT service manager
|
||||||
|
(Windows), systemd (Linux) or launchd (Mac OS / iOS), it may be
|
||||||
|
desirable to end vlmcsd and let the watchdog restart it. This is
|
||||||
|
especially true if some pre-requisites are not yet met but will
|
||||||
|
be some time later, e.g. network is not yet fully setup.
|
||||||
|
|
||||||
|
By using ExitLevel = 0 vlmcsd will
|
||||||
|
|
||||||
|
exit if none of the listening sockets specified with -L can
|
||||||
|
be used. It continues if at least one socket can be setup
|
||||||
|
for listening.
|
||||||
|
|
||||||
|
exit any TAP mirror thread (Windows version only) if there
|
||||||
|
is an error condition while reading or writing from or to
|
||||||
|
the VPN adapter but continue to work without utilizing a
|
||||||
|
VPN adapter.
|
||||||
|
|
||||||
|
By using ExitLevel = 1 vlmcsd will
|
||||||
|
|
||||||
|
exit if not all listening sockets specified with -L can be
|
||||||
|
used.
|
||||||
|
|
||||||
|
exit completely if there is a problem with a VPN adapter it
|
||||||
|
is using. This may happen for instance if the VPN adapter
|
||||||
|
has been disabled using "Control Panel - Network - Adapter
|
||||||
|
Settings" while vlmcsd is using it.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that ExitLevel = 1 is kind of a workaround option.
|
||||||
|
While it may help under some circumstances, it is better to
|
||||||
|
solve the problem at its origin, e.g. properly implementing
|
||||||
|
dependencies in your startup script to ensure all network inter-
|
||||||
|
faces and the VPN adapter you will use are completely setup
|
||||||
|
before you start vlmcsd.
|
||||||
|
|
||||||
|
|
||||||
UseNDR64
|
UseNDR64
|
||||||
Can be TRUE or FALSE. Specifies whether you want to use the
|
Can be TRUE or FALSE. Specifies whether you want to use the
|
||||||
NDR64 transfer syntax. See options -n0 and -n1 in vlmcsd(8). The
|
NDR64 transfer syntax. See options -n0 and -n1 in vlmcsd(8). The
|
||||||
@ -131,12 +219,12 @@ KEYWORDS
|
|||||||
|
|
||||||
UseBTFN
|
UseBTFN
|
||||||
Can be TRUE or FALSE. Specifies whether you want to use bind
|
Can be TRUE or FALSE. Specifies whether you want to use bind
|
||||||
time feature negotiation in RPC. See options -b0 and -b1 in vlm‐
|
time feature negotiation in RPC. See options -b0 and -b1 in vlm-
|
||||||
csd(8). The default is TRUE.
|
csd(8). The default is TRUE.
|
||||||
|
|
||||||
|
|
||||||
RandomizationLevel
|
RandomizationLevel
|
||||||
The argument must 0, 1 or 2. This specifies the ePID randomiza‐
|
The argument must 0, 1 or 2. This specifies the ePID randomiza-
|
||||||
tion level. See options -r0, -r1 and -r2 in vlmcsd(8). The
|
tion level. See options -r0, -r1 and -r2 in vlmcsd(8). The
|
||||||
default randomization level is 1. A RandomizationLevel of 2 is
|
default randomization level is 1. A RandomizationLevel of 2 is
|
||||||
not recommended and should be treated as a debugging level.
|
not recommended and should be treated as a debugging level.
|
||||||
@ -145,14 +233,22 @@ KEYWORDS
|
|||||||
LCID Use a specific culture id (LCID) even if the ePID is randomized.
|
LCID Use a specific culture id (LCID) even if the ePID is randomized.
|
||||||
The argument must be a number between 1 and 32767. While any
|
The argument must be a number between 1 and 32767. While any
|
||||||
number in that range is valid, you should use an offcial LCID. A
|
number in that range is valid, you should use an offcial LCID. A
|
||||||
list of assigned LCIDs can be found at http://msdn.micro‐
|
list of assigned LCIDs can be found at http://msdn.micro-
|
||||||
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
|
soft.com/en-us/goglobal/bb964664.aspx. On the command line you
|
||||||
control this setting with option -C.
|
control this setting with option -C.
|
||||||
|
|
||||||
|
|
||||||
|
HostBuild
|
||||||
|
Use a specific host build number in the ePID even if it is ran-
|
||||||
|
domized. The argument must be a number between 1 and 65535.
|
||||||
|
While you can use any number you should only use build numbers
|
||||||
|
that a released build numbers of Windows Servers, e.g. 17763 for
|
||||||
|
Windows Server 2019.
|
||||||
|
|
||||||
|
|
||||||
MaxWorkers
|
MaxWorkers
|
||||||
The argument specifies the maximum number of worker processes or
|
The argument specifies the maximum number of worker processes or
|
||||||
threads that will be used to serve activation requests concur‐
|
threads that will be used to serve activation requests concur-
|
||||||
rently. This is the same as specifying -m on the command line.
|
rently. This is the same as specifying -m on the command line.
|
||||||
Minimum is 1. The maximum is platform specific and is at least
|
Minimum is 1. The maximum is platform specific and is at least
|
||||||
32767 but is likely to be greater on most systems. The default
|
32767 but is likely to be greater on most systems. The default
|
||||||
@ -160,13 +256,13 @@ KEYWORDS
|
|||||||
|
|
||||||
|
|
||||||
ConnectionTimeout
|
ConnectionTimeout
|
||||||
Used to control when the vlmcsd disconnects idle TPC connec‐
|
Used to control when the vlmcsd disconnects idle TPC connec-
|
||||||
tions. The default is 30 seconds. This is the same setting as -t
|
tions. The default is 30 seconds. This is the same setting as -t
|
||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
|
|
||||||
DisconnectClientsImmediately
|
DisconnectClientsImmediately
|
||||||
Set this to TRUE to disconnect a client after it got an activa‐
|
Set this to TRUE to disconnect a client after it got an activa-
|
||||||
tion response regardless whether a timeout has occured or not.
|
tion response regardless whether a timeout has occured or not.
|
||||||
The default is FALSE. Setting this to TRUE is non-standard
|
The default is FALSE. Setting this to TRUE is non-standard
|
||||||
behavior. Use only if you are experiencing DoS or DDoS attacks.
|
behavior. Use only if you are experiencing DoS or DDoS attacks.
|
||||||
@ -203,11 +299,11 @@ KEYWORDS
|
|||||||
|
|
||||||
|
|
||||||
LogDateAndTime
|
LogDateAndTime
|
||||||
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, log‐
|
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, log-
|
||||||
ging output does not include date and time. This is useful if
|
ging output does not include date and time. This is useful if
|
||||||
you log to stdout(3) which is redirected to another logging
|
you log to stdout(3) which is redirected to another logging
|
||||||
mechanism that already includes date and time in its output, for
|
mechanism that already includes date and time in its output, for
|
||||||
instance systemd-journald(8). If you log to syslog(3), LogDate‐
|
instance systemd-journald(8). If you log to syslog(3), LogDate-
|
||||||
AndTime is ignored and date and time will never be included in
|
AndTime is ignored and date and time will never be included in
|
||||||
the output sent to syslog(3). Using the command line you control
|
the output sent to syslog(3). Using the command line you control
|
||||||
this setting with options -T0 and -T1.
|
this setting with options -T0 and -T1.
|
||||||
@ -216,7 +312,7 @@ KEYWORDS
|
|||||||
LogVerbose
|
LogVerbose
|
||||||
Set this to either TRUE or FALSE. The default is FALSE. If set
|
Set this to either TRUE or FALSE. The default is FALSE. If set
|
||||||
to TRUE, more details of each activation will be logged. You use
|
to TRUE, more details of each activation will be logged. You use
|
||||||
-v and -q in the command line to control this setting. LogVer‐
|
-v and -q in the command line to control this setting. LogVer-
|
||||||
bose has an effect only if you specify a log file or redirect
|
bose has an effect only if you specify a log file or redirect
|
||||||
logging to stdout(3).
|
logging to stdout(3).
|
||||||
|
|
||||||
@ -237,22 +333,22 @@ KEYWORDS
|
|||||||
|
|
||||||
The SKU ID is not checked. Like a genuine KMS server vlmcsd
|
The SKU ID is not checked. Like a genuine KMS server vlmcsd
|
||||||
activates a product that has a random or unknown SKU ID. If you
|
activates a product that has a random or unknown SKU ID. If you
|
||||||
select 1 or 3, vlmcsd also checks the Application ID for cor‐
|
select 1 or 3, vlmcsd also checks the Application ID for cor-
|
||||||
rectness. If Microsoft introduces a new KMS ID for a new prod‐
|
rectness. If Microsoft introduces a new KMS ID for a new prod-
|
||||||
uct, you cannot activate it if you used 1 or 3 until a new ver‐
|
uct, you cannot activate it if you used 1 or 3 until a new ver-
|
||||||
sion of vlmcsd is available.
|
sion of vlmcsd is available.
|
||||||
|
|
||||||
|
|
||||||
CheckClientTime
|
CheckClientTime
|
||||||
Can be TRUE or FALSE. The default is FALSE. If you set this to
|
Can be TRUE or FALSE. The default is FALSE. If you set this to
|
||||||
TRUE vlmcsd(8) checks if the client time differs no more than
|
TRUE vlmcsd(8) checks if the client time differs no more than
|
||||||
four hours from the system time. This is useful to prevent emu‐
|
four hours from the system time. This is useful to prevent emu-
|
||||||
lator detection. A client that tries to detect an emulator could
|
lator detection. A client that tries to detect an emulator could
|
||||||
simply send two subsequent request with two time stamps that
|
simply send two subsequent request with two time stamps that
|
||||||
differ more than four hours from each other. If both requests
|
differ more than four hours from each other. If both requests
|
||||||
succeed, the server is an emulator. If you set this to TRUE on a
|
succeed, the server is an emulator. If you set this to TRUE on a
|
||||||
system with no reliable time source, activations will fail. It
|
system with no reliable time source, activations will fail. It
|
||||||
is ok to set the correct system time after you started vlm‐
|
is ok to set the correct system time after you started vlm-
|
||||||
csd(8).
|
csd(8).
|
||||||
|
|
||||||
|
|
||||||
@ -273,22 +369,22 @@ KEYWORDS
|
|||||||
about 50 kB in size. On hardware with few memory resources use
|
about 50 kB in size. On hardware with few memory resources use
|
||||||
it only if you really need it.
|
it only if you really need it.
|
||||||
|
|
||||||
If you start vlmcsd(8) from an internet superserver, this set‐
|
If you start vlmcsd(8) from an internet superserver, this set-
|
||||||
ting cannot be used. Since vlmcsd(8) exits after each activa‐
|
ting cannot be used. Since vlmcsd(8) exits after each activa-
|
||||||
tion, it cannot maintain any state in memory.
|
tion, it cannot maintain any state in memory.
|
||||||
|
|
||||||
|
|
||||||
StartEmpty
|
StartEmpty
|
||||||
This setting is ignored if you do not also specify Maintain‐
|
This setting is ignored if you do not also specify Maintain-
|
||||||
Clients = TRUE. If you specify FALSE (the default), vlmcsd(8)
|
Clients = TRUE. If you specify FALSE (the default), vlmcsd(8)
|
||||||
starts up as a fully "charged" KMS server. Clients activate
|
starts up as a fully "charged" KMS server. Clients activate
|
||||||
immediately. StartEmpty = TRUE lets you start up vlmcsd(8) with
|
immediately. StartEmpty = TRUE lets you start up vlmcsd(8) with
|
||||||
an empty CMID list. Activation will start when the required min‐
|
an empty CMID list. Activation will start when the required min-
|
||||||
imum clients (25 for Windows Client OSses, 5 for Windows Server
|
imum clients (25 for Windows Client OSses, 5 for Windows Server
|
||||||
OSses and Office) have registered with the KMS server. As long
|
OSses and Office) have registered with the KMS server. As long
|
||||||
as the minimum client count has not been reached, clients end up
|
as the minimum client count has not been reached, clients end up
|
||||||
in HRESULT 0xC004F038 "The count reported by your Key Management
|
in HRESULT 0xC004F038 "The count reported by your Key Management
|
||||||
Service (KMS) is insufficient. Please contact your system admin‐
|
Service (KMS) is insufficient. Please contact your system admin-
|
||||||
istrator". You may use vlmcs(1) or another KMS client emulator
|
istrator". You may use vlmcs(1) or another KMS client emulator
|
||||||
to "charge" vlmcsd(8). Setting this parameter to TRUE does not
|
to "charge" vlmcsd(8). Setting this parameter to TRUE does not
|
||||||
improve emulator detection prevention. It's primary purpose is
|
improve emulator detection prevention. It's primary purpose is
|
||||||
@ -297,16 +393,16 @@ KEYWORDS
|
|||||||
|
|
||||||
|
|
||||||
ActivationInterval
|
ActivationInterval
|
||||||
This is the same as specifying -A on the command line. See vlm‐
|
This is the same as specifying -A on the command line. See vlm-
|
||||||
csd(8) for details. The default is 2 hours. Example: Activation‐
|
csd(8) for details. The default is 2 hours. Example: Activation-
|
||||||
Interval = 1h
|
Interval = 1h
|
||||||
|
|
||||||
|
|
||||||
RenewalInterval
|
RenewalInterval
|
||||||
This is the same as specifying -R on the command line. See vlm‐
|
This is the same as specifying -R on the command line. See vlm-
|
||||||
csd(8) for details. The default is 7 days. Example: RenewalIn‐
|
csd(8) for details. The default is 7 days. Example: RenewalIn-
|
||||||
terval = 3d. Please note that the KMS client decides itself when
|
terval = 3d. Please note that the KMS client decides itself when
|
||||||
to renew activation. Even though vlmcsd sends the renewal inter‐
|
to renew activation. Even though vlmcsd sends the renewal inter-
|
||||||
val you specify, it is no more than some kind of recommendation
|
val you specify, it is no more than some kind of recommendation
|
||||||
to the client. Older KMS clients did follow the recommendation
|
to the client. Older KMS clients did follow the recommendation
|
||||||
from a KMS server or emulator. Newer clients do not.
|
from a KMS server or emulator. Newer clients do not.
|
||||||
@ -326,58 +422,45 @@ KEYWORDS
|
|||||||
Group Run vlmcsd as another, preferrably less privileged, group. The
|
Group Run vlmcsd as another, preferrably less privileged, group. The
|
||||||
argument can be a group name or a numeric group id. You must
|
argument can be a group name or a numeric group id. You must
|
||||||
have the required privileges (capabilities on Linux) to change
|
have the required privileges (capabilities on Linux) to change
|
||||||
the security context of a process without providing any creden‐
|
the security context of a process without providing any creden-
|
||||||
tials (a password in most cases). On most unixoid OSses 'root'
|
tials (a password in most cases). On most unixoid OSses 'root'
|
||||||
is the only user who has these privileges in the default config‐
|
is the only user who has these privileges in the default config-
|
||||||
uration. This setting is not available in the native Windows
|
uration. This setting is not available in the native Windows
|
||||||
version of vlmcsd. See -g in vlmcsd(8). This setting cannot be
|
version of vlmcsd. See -g in vlmcsd(8). This setting cannot be
|
||||||
changed on the fly by sending SIGHUP to vlmcsd.
|
changed on the fly by sending SIGHUP to vlmcsd.
|
||||||
|
|
||||||
|
|
||||||
Windows
|
<csvlk-name>
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
The argument has the form ePID [ / HwId ]. Always use ePID and
|
||||||
HwId for Windows activations. If specified, RandomizationLevel
|
HwId for activations with <csvlk-name>. If specified, Randomiza-
|
||||||
for Windows activitations will be ignored.
|
tionLevel for the <csvlk-name> will be ignored. With the default
|
||||||
|
vlmcsd.kmd database you can use the following <csvlk-name>s:
|
||||||
|
Windows, Office2010, Office2013, Office2016, Office2019 and
|
||||||
Office2010
|
WinChinaGov. While vlmcsd is compatible with older databases,
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
you must use at least database version 1.6 for this feature to
|
||||||
HwId for Office 2010 activations. If specified, Randomization‐
|
work.
|
||||||
Level for Office 2010 activitations will be ignored.
|
|
||||||
|
|
||||||
|
|
||||||
Office2013
|
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
|
||||||
HwId for Office 2013 activations. If specified, Randomization‐
|
|
||||||
Level for Office 2013 activitations will be ignored.
|
|
||||||
|
|
||||||
|
|
||||||
Office2016
|
|
||||||
The argument has the form ePID [ / HwId ]. Always use ePID and
|
|
||||||
HwId for Office 2016 activations. If specified, Randomization‐
|
|
||||||
Level for Office 2016 activitations will be ignored.
|
|
||||||
|
|
||||||
|
|
||||||
VALID EPIDS
|
VALID EPIDS
|
||||||
The ePID is currently a comment only. You can specify any string up to
|
The ePID is currently a comment only. You can specify any string up to
|
||||||
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
|
63 bytes. In Windows 7 Microsoft has blacklisted few ( < 10 ) ePIDs
|
||||||
that were used in KMSv5 versions of the "Ratiborus Virtual Machine".
|
that were used in KMSv5 versions of the "Ratiborus Virtual Machine".
|
||||||
Microsoft has given up on blacklisting when KMS emulators appeared in
|
Microsoft has given up on blacklisting when KMS emulators appeared in
|
||||||
the wild.
|
the wild.
|
||||||
|
|
||||||
Even if you can use "Activated by cool hacker guys" as an ePID, you may
|
Even if you can use "Activated by cool hacker guys" as an ePID, you may
|
||||||
wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't
|
wish to use ePIDs that cannot be detected as non-MS ePIDs. If you don't
|
||||||
know how these "valid" ePIDs look like exactly, do not use GUIDS in
|
know how these "valid" ePIDs look like exactly, do not use GUIDS in
|
||||||
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
|
vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid
|
||||||
ePIDs.
|
ePIDs.
|
||||||
|
|
||||||
If you use non-ASCII characters in your ePID (you shouldn't do anyway),
|
If you use non-ASCII characters in your ePID (you shouldn't do anyway),
|
||||||
these must be in UTF-8 format. This is especially important when you
|
these must be in UTF-8 format. This is especially important when you
|
||||||
run vlmcsd on Windows or cygwin because UTF-8 is not the default encod‐
|
run vlmcsd on Windows or cygwin because UTF-8 is not the default encod-
|
||||||
ing for most editors.
|
ing for most editors.
|
||||||
|
|
||||||
If you are specifying an optional HWID it follows the same syntax as in
|
If you are specifying an optional HWID it follows the same syntax as in
|
||||||
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
|
the -H option in vlmcsd(8) ecxept that you must not enclose a HWID in
|
||||||
quotes even if it contains spaces.
|
quotes even if it contains spaces.
|
||||||
|
|
||||||
|
|
||||||
@ -386,13 +469,13 @@ FILES
|
|||||||
|
|
||||||
|
|
||||||
AUTHOR
|
AUTHOR
|
||||||
vlmcsd(8) was written by crony12, Hotbird64 and vityan666. With contri‐
|
vlmcsd(8) was written by crony12, Hotbird64 and vityan666. With contri-
|
||||||
butions from DougQaid.
|
butions from DougQaid.
|
||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati‐
|
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
|
||||||
borus, ...
|
qad, Ratiborus, ...
|
||||||
|
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
@ -400,4 +483,4 @@ SEE ALSO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Hotbird64 November 2016 VLMCSD.INI(5)
|
Hotbird64 October 2018 VLMCSD.INI(5)
|
||||||
|
@ -17,9 +17,9 @@ DESCRIPTION
|
|||||||
the combined binary is significantly smaller than the sum of both
|
the combined binary is significantly smaller than the sum of both
|
||||||
files.
|
files.
|
||||||
|
|
||||||
vlmcsdmulti should not be called directly. Instead you may want to cre‐
|
vlmcsdmulti should not be called directly. Instead you may want to cre-
|
||||||
ate symbolic links named vlmcs and vlmcsd which point to vlmcsdmulti.
|
ate symbolic links named vlmcs and vlmcsd which point to vlmcsdmulti.
|
||||||
You then use these links to call the respective program. You may how‐
|
You then use these links to call the respective program. You may how-
|
||||||
ever call vlmcsdmulti followed by a complete command line of either
|
ever call vlmcsdmulti followed by a complete command line of either
|
||||||
vlmcs(1) or vlmcsd(8).
|
vlmcs(1) or vlmcsd(8).
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ DESCRIPTION
|
|||||||
Memory considerations
|
Memory considerations
|
||||||
While you definitely save disk space by using vlmcsdmulti you will need
|
While you definitely save disk space by using vlmcsdmulti you will need
|
||||||
more RAM when you run vlmcsdmulti as a daemon (KMS server) instead of
|
more RAM when you run vlmcsdmulti as a daemon (KMS server) instead of
|
||||||
vlmcsd. You should consider running vlmcsdmulti via an internet super‐
|
vlmcsd. You should consider running vlmcsdmulti via an internet super-
|
||||||
server like inetd(8) or xinetd(8).
|
server like inetd(8) or xinetd(8).
|
||||||
|
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ AUTHOR
|
|||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos‐
|
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos-
|
||||||
ferati87, qad, vityan666, ...
|
ferati87, qad, vityan666, ...
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!-- Creator : groff version 1.22.3 -->
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
<!-- CreationDate: Mon Nov 28 01:28:23 2016 -->
|
<!-- CreationDate: Sat Oct 20 09:49:39 2018 -->
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
Binary file not shown.
@ -17,9 +17,9 @@ DESCRIPTION
|
|||||||
the combined binary is significantly smaller than the sum of both
|
the combined binary is significantly smaller than the sum of both
|
||||||
files.
|
files.
|
||||||
|
|
||||||
vlmcsdmulti should not be called directly. Instead you may want to cre‐
|
vlmcsdmulti should not be called directly. Instead you may want to cre-
|
||||||
ate symbolic links named vlmcs and vlmcsd which point to vlmcsdmulti.
|
ate symbolic links named vlmcs and vlmcsd which point to vlmcsdmulti.
|
||||||
You then use these links to call the respective program. You may how‐
|
You then use these links to call the respective program. You may how-
|
||||||
ever call vlmcsdmulti followed by a complete command line of either
|
ever call vlmcsdmulti followed by a complete command line of either
|
||||||
vlmcs(1) or vlmcsd(8).
|
vlmcs(1) or vlmcsd(8).
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ DESCRIPTION
|
|||||||
Memory considerations
|
Memory considerations
|
||||||
While you definitely save disk space by using vlmcsdmulti you will need
|
While you definitely save disk space by using vlmcsdmulti you will need
|
||||||
more RAM when you run vlmcsdmulti as a daemon (KMS server) instead of
|
more RAM when you run vlmcsdmulti as a daemon (KMS server) instead of
|
||||||
vlmcsd. You should consider running vlmcsdmulti via an internet super‐
|
vlmcsd. You should consider running vlmcsdmulti via an internet super-
|
||||||
server like inetd(8) or xinetd(8).
|
server like inetd(8) or xinetd(8).
|
||||||
|
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ AUTHOR
|
|||||||
|
|
||||||
|
|
||||||
CREDITS
|
CREDITS
|
||||||
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos‐
|
Thanks to CODYQX4, crony12, deagles, DougQaid, eIcn, mikmik38, nos-
|
||||||
ferati87, qad, vityan666, ...
|
ferati87, qad, vityan666, ...
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,6 +192,12 @@ ifneq ($(NOLIBS),1)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(NOLIBS),1)
|
||||||
|
ifeq ($(CYGWIN),1)
|
||||||
|
BASELDFLAGS += -liphlpapi
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(NO_DNS),1)
|
ifneq ($(NO_DNS),1)
|
||||||
ifneq ($(ANDROID),1)
|
ifneq ($(ANDROID),1)
|
||||||
ifneq ($(NOLRESOLV),1)
|
ifneq ($(NOLRESOLV),1)
|
||||||
@ -251,14 +257,14 @@ else
|
|||||||
STRIPFLAGS += -s
|
STRIPFLAGS += -s
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DNO_STRICT_MODES -DNO_CLIENT_LIST -UNO_SOCKETS -USIMPLE_RPC
|
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DNO_STRICT_MODES -DNO_CLIENT_LIST -DNO_TAP -UNO_SOCKETS -USIMPLE_RPC
|
||||||
|
|
||||||
ifeq ($(FEATURES), embedded)
|
ifeq ($(FEATURES), embedded)
|
||||||
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
|
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
|
||||||
else ifeq ($(FEATURES), autostart)
|
else ifeq ($(FEATURES), autostart)
|
||||||
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
|
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
|
||||||
else ifeq ($(FEATURES), minimum)
|
else ifeq ($(FEATURES), minimum)
|
||||||
BASECFLAGS += -DSIMPLE_RPC -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DSMALL_AES -DNO_STRICT_MODES -DNO_CLIENT_LIST -DUNSAFE_DATA_LOAD -DNO_EXTERNAL_DATA -UFULL_INTERNAL_DATA -U_PEDANTIC
|
BASECFLAGS += -DSIMPLE_RPC -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DSMALL_AES -DNO_STRICT_MODES -DNO_TAP -DNO_CLIENT_LIST -DUNSAFE_DATA_LOAD -DNO_EXTERNAL_DATA -UFULL_INTERNAL_DATA -U_PEDANTIC
|
||||||
else ifeq ($(FEATURES), most)
|
else ifeq ($(FEATURES), most)
|
||||||
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
|
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
|
||||||
else ifeq ($(FEATURES), inetd)
|
else ifeq ($(FEATURES), inetd)
|
||||||
@ -441,9 +447,9 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(WIN)" "1"
|
ifeq "$(WIN)" "1"
|
||||||
VLMCSD_SRCS += ntservice.c
|
VLMCSD_SRCS += ntservice.c wintap.c
|
||||||
MULTI_SRCS += ntservice.c
|
MULTI_SRCS += ntservice.c wintap.c
|
||||||
../build/MULTI_OBJS += ntservice.o
|
MULTI_OBJS += ../build/ntservice.o ../build/wintap.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CRYPTO), openssl_with_aes)
|
ifeq ($(CRYPTO), openssl_with_aes)
|
||||||
|
66
src/config.h
66
src/config.h
@ -31,26 +31,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Define default ePIDs and HWID here. Preferrably grab ePIDs and HWID
|
|
||||||
* from a real KMS server.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#ifndef EPID_WINDOWS
|
|
||||||
//#define EPID_WINDOWS "03612-00206-471-452343-03-1033-14393.0000-2932016"
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
//#ifndef EPID_OFFICE2010
|
|
||||||
//#define EPID_OFFICE2010 "03612-00096-199-303490-03-1033-14393.0000-2932016"
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
//#ifndef EPID_OFFICE2013
|
|
||||||
//#define EPID_OFFICE2013 "03612-00206-234-394838-03-1033-14393.0000-2932016"
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
//#ifndef EPID_OFFICE2016
|
|
||||||
//#define EPID_OFFICE2016 "03612-00206-437-938923-03-1033-14393.0000-2932016"
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
#ifndef HWID // HwId from the Ratiborus VM
|
#ifndef HWID // HwId from the Ratiborus VM
|
||||||
#define HWID 0x3A, 0x1C, 0x04, 0x96, 0x00, 0xB6, 0x00, 0x76
|
#define HWID 0x3A, 0x1C, 0x04, 0x96, 0x00, 0xB6, 0x00, 0x76
|
||||||
@ -67,21 +47,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* -------------------------------
|
* -------------------------------
|
||||||
* Defaults
|
* Defaults
|
||||||
* -------------------------------
|
* -------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef INI_FILE
|
#ifndef INI_FILE
|
||||||
/*
|
/*
|
||||||
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
|
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
|
||||||
* at a default location.
|
* at a default location.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define INI_FILE "/etc/vlmcsd.ini"
|
//#define INI_FILE "/etc/vlmcsd.ini"
|
||||||
|
|
||||||
#endif // INI_FILE
|
#endif // INI_FILE
|
||||||
|
|
||||||
@ -95,7 +75,7 @@
|
|||||||
* at a custom default location.
|
* at a custom default location.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define DATA_FILE "/etc/vlmcsd.kmd"
|
//#define DATA_FILE "/etc/vlmcsd.kmd"
|
||||||
|
|
||||||
#endif // DATA_FILE
|
#endif // DATA_FILE
|
||||||
|
|
||||||
@ -353,7 +333,7 @@
|
|||||||
* Includes the full database in vlmcsd.
|
* Includes the full database in vlmcsd.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define FULL_INTERNAL_DATA
|
//#define FULL_INTERNAL_DATA
|
||||||
#endif // FULL_INTERNAL_DATA
|
#endif // FULL_INTERNAL_DATA
|
||||||
|
|
||||||
|
|
||||||
@ -374,13 +354,25 @@
|
|||||||
* your system.
|
* your system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define NO_FREEBIND
|
//#define NO_FREEBIND
|
||||||
|
|
||||||
#endif // NO_FREEBIND
|
#endif // NO_FREEBIND
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_TAP
|
||||||
|
/*
|
||||||
|
* Do not compile support for using a VPN adapter under Windows. Disables -O command line option.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//#define NO_TAP
|
||||||
|
|
||||||
|
#endif // NO_TAP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_VERSION_INFORMATION
|
#ifndef NO_VERSION_INFORMATION
|
||||||
/*
|
/*
|
||||||
* Removes the -V option from vlmcsd and vlmcs that displays the version information
|
* Removes the -V option from vlmcsd and vlmcs that displays the version information
|
||||||
@ -493,7 +485,7 @@
|
|||||||
* and ini file parameter KmsData. Implies UNSAFE_DATA_LOAD.
|
* and ini file parameter KmsData. Implies UNSAFE_DATA_LOAD.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define NO_EXTERNAL_DATA
|
//#define NO_EXTERNAL_DATA
|
||||||
|
|
||||||
#endif // NO_EXTERNAL_DATA
|
#endif // NO_EXTERNAL_DATA
|
||||||
|
|
||||||
@ -507,7 +499,7 @@
|
|||||||
* the program exits with an error message.
|
* the program exits with an error message.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define NO_INTERNAL_DATA
|
//#define NO_INTERNAL_DATA
|
||||||
|
|
||||||
#endif // NO_INTERNAL_DATA
|
#endif // NO_INTERNAL_DATA
|
||||||
|
|
||||||
@ -658,7 +650,7 @@
|
|||||||
* smaller binaries but makes emulator detection easier.
|
* smaller binaries but makes emulator detection easier.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define SIMPLE_RPC
|
//#define SIMPLE_RPC
|
||||||
#endif // !SIMPLE_RPC
|
#endif // !SIMPLE_RPC
|
||||||
|
|
||||||
|
|
||||||
@ -670,7 +662,7 @@
|
|||||||
* It still supports IPv4 and IPv6.
|
* It still supports IPv4 and IPv6.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define SIMPLE_SOCKETS
|
//#define SIMPLE_SOCKETS
|
||||||
|
|
||||||
#endif // SIMPLE_SOCKETS
|
#endif // SIMPLE_SOCKETS
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ WCHAR utf8_to_ucs2_char(const unsigned char *input, const unsigned char **end_pt
|
|||||||
{
|
{
|
||||||
*end_ptr = input;
|
*end_ptr = input;
|
||||||
if (input[0] == 0)
|
if (input[0] == 0)
|
||||||
return ~0;
|
return (WCHAR)~0;
|
||||||
|
|
||||||
if (input[0] < 0x80) {
|
if (input[0] < 0x80) {
|
||||||
*end_ptr = input + 1;
|
*end_ptr = input + 1;
|
||||||
@ -73,7 +73,7 @@ WCHAR utf8_to_ucs2_char(const unsigned char *input, const unsigned char **end_pt
|
|||||||
if ((input[0] & 0xE0) == 0xE0) {
|
if ((input[0] & 0xE0) == 0xE0) {
|
||||||
|
|
||||||
if (input[1] == 0 || input[2] == 0)
|
if (input[1] == 0 || input[2] == 0)
|
||||||
return ~0;
|
return (WCHAR)~0;
|
||||||
|
|
||||||
*end_ptr = input + 3;
|
*end_ptr = input + 3;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ WCHAR utf8_to_ucs2_char(const unsigned char *input, const unsigned char **end_pt
|
|||||||
|
|
||||||
if ((input[0] & 0xC0) == 0xC0) {
|
if ((input[0] & 0xC0) == 0xC0) {
|
||||||
if (input[1] == 0)
|
if (input[1] == 0)
|
||||||
return ~0;
|
return (WCHAR)~0;
|
||||||
|
|
||||||
*end_ptr = input + 2;
|
*end_ptr = input + 2;
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ WCHAR utf8_to_ucs2_char(const unsigned char *input, const unsigned char **end_pt
|
|||||||
LE16((input[0] & 0x1F) << 6 |
|
LE16((input[0] & 0x1F) << 6 |
|
||||||
(input[1] & 0x3F));
|
(input[1] & 0x3F));
|
||||||
}
|
}
|
||||||
return ~0;
|
return (WCHAR)~0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert one character from UCS2 to UTF-8
|
// Convert one character from UCS2 to UTF-8
|
||||||
@ -110,8 +110,8 @@ int ucs2_to_utf8_char(const WCHAR ucs2_le, char *utf8)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ucs2 >= 0x80 && ucs2 < 0x800) {
|
if (ucs2 >= 0x80 && ucs2 < 0x800) {
|
||||||
utf8[0] = (ucs2 >> 6) | 0xC0;
|
utf8[0] = (char)((ucs2 >> 6) | 0xC0);
|
||||||
utf8[1] = (ucs2 & 0x3F) | 0x80;
|
utf8[1] = (char)((ucs2 & 0x3F) | 0x80);
|
||||||
utf8[2] = '\0';
|
utf8[2] = '\0';
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -230,6 +230,35 @@ int_fast8_t string2UuidLE(const char *const restrict input, GUID *const restrict
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__pure DWORD timeSpanString2Seconds(const char *const restrict argument)
|
||||||
|
{
|
||||||
|
char *unitId;
|
||||||
|
|
||||||
|
long long val = vlmcsd_strtoll(argument, &unitId, 10);
|
||||||
|
|
||||||
|
switch (toupper((int)*unitId))
|
||||||
|
{
|
||||||
|
case 'W':
|
||||||
|
val *= 7;
|
||||||
|
case 'D':
|
||||||
|
val *= 24;
|
||||||
|
case 'H':
|
||||||
|
val *= 60;
|
||||||
|
case 0:
|
||||||
|
case 'M':
|
||||||
|
val *= 60;
|
||||||
|
case 'S':
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*unitId && unitId[1]) return 0;
|
||||||
|
if (val < 1) val = 1;
|
||||||
|
return (DWORD)(val & UINT_MAX);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if !IS_LIBRARY
|
#if !IS_LIBRARY
|
||||||
//Checks a command line argument if it is numeric and between min and max. Returns the numeric value or exits on error
|
//Checks a command line argument if it is numeric and between min and max. Returns the numeric value or exits on error
|
||||||
__pure unsigned int getOptionArgumentInt(const char o, const unsigned int min, const unsigned int max)
|
__pure unsigned int getOptionArgumentInt(const char o, const unsigned int min, const unsigned int max)
|
||||||
@ -261,7 +290,7 @@ void optReset(void)
|
|||||||
}
|
}
|
||||||
#endif // !IS_LIBRARY
|
#endif // !IS_LIBRARY
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(USE_MSRPC)
|
#if _WIN32 || __CYGWIN__
|
||||||
|
|
||||||
// Returns a static message buffer containing text for a given Win32 error. Not thread safe (same as strerror)
|
// Returns a static message buffer containing text for a given Win32 error. Not thread safe (same as strerror)
|
||||||
char* win_strerror(const int message)
|
char* win_strerror(const int message)
|
||||||
@ -273,7 +302,7 @@ char* win_strerror(const int message)
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // defined(_WIN32) || defined(USE_MSRPC)
|
#endif // _WIN32 || __CYGWIN__
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -426,7 +455,7 @@ void getExeName()
|
|||||||
|
|
||||||
fn_exe = (char*)getauxval(AT_EXECFN);
|
fn_exe = (char*)getauxval(AT_EXECFN);
|
||||||
|
|
||||||
# elif __UCLIBC__ && __UCLIBC_MAJOR__ < 1 && !defined(NO_PROCFS) // Workaround for older uclibc
|
# elif (__ANDROID__ && __ANDROID_API__ < 16) || (__UCLIBC__ && __UCLIBC_MAJOR__ < 1 && !defined(NO_PROCFS)) // Workaround for older uclibc
|
||||||
|
|
||||||
char temp[PATH_MAX + 1];
|
char temp[PATH_MAX + 1];
|
||||||
|
|
||||||
@ -493,11 +522,11 @@ void getExeName()
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static void getDefaultDataFile()
|
static void getDefaultDataFile()
|
||||||
{
|
{
|
||||||
char fileName[512];
|
char fileName[MAX_PATH];
|
||||||
getExeName();
|
getExeName();
|
||||||
strcpy(fileName, fn_exe);
|
strncpy(fileName, fn_exe, MAX_PATH);
|
||||||
PathRemoveFileSpec(fileName);
|
PathRemoveFileSpec(fileName);
|
||||||
strncat(fileName, "\\vlmcsd.kmd", 512);
|
strncat(fileName, "\\vlmcsd.kmd", MAX_PATH);
|
||||||
fn_data = vlmcsd_strdup(fileName);
|
fn_data = vlmcsd_strdup(fileName);
|
||||||
}
|
}
|
||||||
#else // !_WIN32
|
#else // !_WIN32
|
||||||
@ -515,7 +544,7 @@ static void getDefaultDataFile()
|
|||||||
char* fn_exe_copy = vlmcsd_strdup(fn_exe);
|
char* fn_exe_copy = vlmcsd_strdup(fn_exe);
|
||||||
strncpy(fileName, dirname(fn_exe_copy), 512);
|
strncpy(fileName, dirname(fn_exe_copy), 512);
|
||||||
free(fn_exe_copy);
|
free(fn_exe_copy);
|
||||||
strncat(fileName, "/vlmcsd.kmd", 512);
|
strncat(fileName, "/vlmcsd.kmd", 500);
|
||||||
fn_data = vlmcsd_strdup(fileName);
|
fn_data = vlmcsd_strdup(fileName);
|
||||||
}
|
}
|
||||||
#endif // !_WIN32
|
#endif // !_WIN32
|
||||||
@ -564,17 +593,13 @@ void loadKmsData()
|
|||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
# if !defined(NO_LOG) && !defined(NO_SOCKETS)
|
# if !defined(NO_LOG) && !defined(NO_SOCKETS)
|
||||||
if (!InetdMode) logger("Read KMS data file %s\n", fn_data);
|
if (!InetdMode) logger("Read KMS data file version %u.%u %s\n", (unsigned int)KmsData->MajorVer, (unsigned int)KmsData->MinorVer, fn_data);
|
||||||
# endif // NO_LOG
|
# endif // NO_LOG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif // NO_EXTERNAL_DATA
|
|
||||||
|
|
||||||
# if !defined(NO_RANDOM_EPID) || !defined(NO_CL_PIDS) || !defined(NO_INI_FILE)
|
|
||||||
KmsResponseParameters = (KmsResponseParam_t*)realloc(KmsResponseParameters, KmsData->CsvlkCount * sizeof(KmsResponseParam_t));
|
# endif // NO_EXTERNAL_DATA
|
||||||
if (!KmsResponseParameters) OutOfMemory();
|
|
||||||
memset(KmsResponseParameters + MIN_CSVLK, 0, (KmsData->CsvlkCount - MIN_CSVLK) * sizeof(KmsResponseParam_t));
|
|
||||||
# endif // !defined(NO_RANDOM_EPID) || !defined(NO_CL_PIDS) || !defined(NO_INI_FILE)
|
|
||||||
|
|
||||||
# ifndef UNSAFE_DATA_LOAD
|
# ifndef UNSAFE_DATA_LOAD
|
||||||
if (((BYTE*)KmsData)[size - 1] != 0) dataFileFormatError();
|
if (((BYTE*)KmsData)[size - 1] != 0) dataFileFormatError();
|
||||||
@ -611,7 +636,7 @@ void loadKmsData()
|
|||||||
# endif // NO_RANDOM_EPID
|
# endif // NO_RANDOM_EPID
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t totalItemCount = KmsData->AppItemCount + KmsData->KmsItemCount + KmsData->SkuItemCount;
|
const uint32_t totalItemCount = KmsData->AppItemCount + KmsData->KmsItemCount + KmsData->SkuItemCount;
|
||||||
|
|
||||||
# ifndef NO_EXTERNAL_DATA
|
# ifndef NO_EXTERNAL_DATA
|
||||||
if (
|
if (
|
||||||
@ -645,7 +670,20 @@ void loadKmsData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NO_SOCKETS
|
||||||
|
void exitOnWarningLevel(const int_fast8_t level)
|
||||||
|
{
|
||||||
|
if (ExitLevel >= level)
|
||||||
|
{
|
||||||
|
printerrorf("Fatal: Exiting on warning level %i or greater\n", (int)ExitLevel);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !NO_SOCKETS
|
||||||
|
|
||||||
#endif // IS_LIBRARY
|
#endif // IS_LIBRARY
|
||||||
|
|
||||||
|
|
||||||
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (intentionally because Google fears, developers don't know how to use it)
|
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (intentionally because Google fears, developers don't know how to use it)
|
||||||
|
|
||||||
#ifdef __NR_shmget
|
#ifdef __NR_shmget
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
BOOL stringToInt(const char *const szValue, const unsigned int min, const unsigned int max, unsigned int *const value);
|
BOOL stringToInt(const char *const szValue, const unsigned int min, const unsigned int max, unsigned int *const value);
|
||||||
unsigned int getOptionArgumentInt(const char o, const unsigned int min, const unsigned int max);
|
unsigned int getOptionArgumentInt(const char o, const unsigned int min, const unsigned int max);
|
||||||
void optReset(void);
|
void optReset(void);
|
||||||
|
__pure DWORD timeSpanString2Seconds(const char *const restrict argument);
|
||||||
|
#define timeSpanString2Minutes(x) (timeSpanString2Seconds(x) / 60)
|
||||||
char* win_strerror(const int message);
|
char* win_strerror(const int message);
|
||||||
int ucs2_to_utf8_char (const WCHAR ucs2_le, char *utf8);
|
int ucs2_to_utf8_char (const WCHAR ucs2_le, char *utf8);
|
||||||
size_t utf8_to_ucs2(WCHAR* const ucs2_le, const char* const utf8, const size_t maxucs2, const size_t maxutf8);
|
size_t utf8_to_ucs2(WCHAR* const ucs2_le, const char* const utf8, const size_t maxucs2, const size_t maxutf8);
|
||||||
@ -38,6 +40,13 @@ void getExeName();
|
|||||||
__pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument);
|
__pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument);
|
||||||
char* vlmcsd_strdup(const char* src);
|
char* vlmcsd_strdup(const char* src);
|
||||||
|
|
||||||
|
#if defined(NO_SOCKETS) || IS_LIBRARY
|
||||||
|
#define exitOnWarningLevel(x)
|
||||||
|
#else // !NO_SOCKETS
|
||||||
|
void exitOnWarningLevel(const int_fast8_t level);
|
||||||
|
#endif // !NO_SOCKETS
|
||||||
|
|
||||||
|
|
||||||
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (intentionally because Google fears, developers don't know how to use it)
|
#if __ANDROID__ && !defined(USE_THREADS) // Bionic does not wrap these syscalls (intentionally because Google fears, developers don't know how to use it)
|
||||||
int shmget(key_t key, size_t size, int shmflg);
|
int shmget(key_t key, size_t size, int shmflg);
|
||||||
void *shmat(int shmid, const void *shmaddr, int shmflg);
|
void *shmat(int shmid, const void *shmaddr, int shmflg);
|
||||||
|
15
src/kms.h
15
src/kms.h
@ -258,12 +258,6 @@ typedef struct VlmcsdData
|
|||||||
char* Name;
|
char* Name;
|
||||||
};
|
};
|
||||||
|
|
||||||
//union
|
|
||||||
//{
|
|
||||||
// uint64_t X_EPidOffset;
|
|
||||||
// char* X_EPid;
|
|
||||||
//};
|
|
||||||
|
|
||||||
uint8_t AppIndex;
|
uint8_t AppIndex;
|
||||||
uint8_t KmsIndex;
|
uint8_t KmsIndex;
|
||||||
uint8_t ProtocolVersion;
|
uint8_t ProtocolVersion;
|
||||||
@ -284,12 +278,15 @@ typedef struct
|
|||||||
};
|
};
|
||||||
} DataPointer_t;
|
} DataPointer_t;
|
||||||
|
|
||||||
|
#define KMS_OPTIONS_USENDR64 1 << 0
|
||||||
|
|
||||||
typedef struct VlmcsdHeader
|
typedef struct VlmcsdHeader
|
||||||
{
|
{
|
||||||
BYTE Magic[4];
|
BYTE Magic[4];
|
||||||
VERSION_INFO;
|
VERSION_INFO;
|
||||||
uint8_t CsvlkCount;
|
uint8_t CsvlkCount;
|
||||||
uint8_t Reserved[3];
|
uint8_t Flags;
|
||||||
|
uint8_t Reserved[2];
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
@ -337,6 +334,7 @@ typedef struct VlmcsdHeader
|
|||||||
#define EPID_INDEX_OFFICE2010 1
|
#define EPID_INDEX_OFFICE2010 1
|
||||||
#define EPID_INDEX_OFFICE2013 2
|
#define EPID_INDEX_OFFICE2013 2
|
||||||
#define EPID_INDEX_OFFICE2016 3
|
#define EPID_INDEX_OFFICE2016 3
|
||||||
|
#define EPID_INDEX_WINCHINAGOV 4
|
||||||
|
|
||||||
typedef HRESULT(__stdcall *RequestCallback_t)(const REQUEST *const baseRequest, RESPONSE *const baseResponse, BYTE *const hwId, const char* const ipstr);
|
typedef HRESULT(__stdcall *RequestCallback_t)(const REQUEST *const baseRequest, RESPONSE *const baseResponse, BYTE *const hwId, const char* const ipstr);
|
||||||
|
|
||||||
@ -363,7 +361,8 @@ void CleanUpClientLists();
|
|||||||
extern RequestCallback_t CreateResponseBase;
|
extern RequestCallback_t CreateResponseBase;
|
||||||
|
|
||||||
#ifdef _PEDANTIC
|
#ifdef _PEDANTIC
|
||||||
uint16_t IsValidLcid(const uint16_t Lcid);
|
uint16_t IsValidLcid(const uint16_t lcid);
|
||||||
|
uint16_t IsValidHostBuild(const uint16_t hostBuild);
|
||||||
#endif // _PEDANTIC
|
#endif // _PEDANTIC
|
||||||
|
|
||||||
#endif // __kms_h
|
#endif // __kms_h
|
||||||
|
1657
src/kmsdata-full.c
1657
src/kmsdata-full.c
File diff suppressed because it is too large
Load Diff
1918
src/kmsdata.c
1918
src/kmsdata.c
File diff suppressed because it is too large
Load Diff
@ -99,7 +99,7 @@ static int_fast8_t getSocketList(struct addrinfo **saList, const char *const add
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
char *szHost, *szPort;
|
char *szHost, *szPort;
|
||||||
size_t len = strlen(addr) + 1;
|
const size_t len = strlen(addr) + 1;
|
||||||
|
|
||||||
// Don't alloca too much
|
// Don't alloca too much
|
||||||
if (len > 264) return FALSE;
|
if (len > 264) return FALSE;
|
||||||
@ -156,7 +156,7 @@ int_fast8_t isDisconnected(const SOCKET s)
|
|||||||
|
|
||||||
if (!setBlockingEnabled(s, FALSE)) return TRUE;
|
if (!setBlockingEnabled(s, FALSE)) return TRUE;
|
||||||
|
|
||||||
int n = recv(s, buffer, 1, MSG_PEEK);
|
const int n = recv(s, buffer, 1, MSG_PEEK);
|
||||||
|
|
||||||
if (!setBlockingEnabled(s, TRUE)) return TRUE;
|
if (!setBlockingEnabled(s, TRUE)) return TRUE;
|
||||||
if (n == 0) return TRUE;
|
if (n == 0) return TRUE;
|
||||||
@ -200,7 +200,7 @@ static int_fast8_t isPrivateIPAddress(struct sockaddr* addr, socklen_t* length)
|
|||||||
|
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
{
|
{
|
||||||
uint32_t ipv4addr = BE32(((struct sockaddr_in*)addr)->sin_addr.s_addr);
|
const uint32_t ipv4addr = BE32(((struct sockaddr_in*)addr)->sin_addr.s_addr);
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -244,11 +244,7 @@ SOCKET connectToAddress(const char *const addr, const int AddressFamily, int_fas
|
|||||||
|
|
||||||
if (ip2str(szAddr, sizeof(szAddr), sa->ai_addr, (socklen_t)sa->ai_addrlen))
|
if (ip2str(szAddr, sizeof(szAddr), sa->ai_addr, (socklen_t)sa->ai_addrlen))
|
||||||
{
|
{
|
||||||
if (showHostName)
|
showHostName ? printf("Connecting to %s (%s) ... ", addr, szAddr) : printf("Connecting to %s ... ", szAddr);
|
||||||
printf("Connecting to %s (%s) ... ", addr, szAddr);
|
|
||||||
else
|
|
||||||
printf("Connecting to %s ... ", szAddr);
|
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +290,6 @@ SOCKET connectToAddress(const char *const addr, const int AddressFamily, int_fas
|
|||||||
|
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
#ifdef SIMPLE_SOCKETS
|
|
||||||
|
|
||||||
static int_fast8_t allowSocketReuse(SOCKET s)
|
static int_fast8_t allowSocketReuse(SOCKET s)
|
||||||
{
|
{
|
||||||
@ -322,6 +317,8 @@ static int_fast8_t allowSocketReuse(SOCKET s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SIMPLE_SOCKETS
|
||||||
|
|
||||||
int listenOnAllAddresses()
|
int listenOnAllAddresses()
|
||||||
{
|
{
|
||||||
uint32_t port_listen;
|
uint32_t port_listen;
|
||||||
@ -393,7 +390,7 @@ void getPrivateIPAddresses(int* numAddresses, char*** ipAddresses)
|
|||||||
|
|
||||||
DWORD dwRetVal;
|
DWORD dwRetVal;
|
||||||
ULONG outBufLen = 16384;
|
ULONG outBufLen = 16384;
|
||||||
ULONG flags = GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_FRIENDLY_NAME;
|
const ULONG flags = GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_FRIENDLY_NAME;
|
||||||
|
|
||||||
firstAdapter = (PIP_ADAPTER_ADDRESSES)vlmcsd_malloc(outBufLen);
|
firstAdapter = (PIP_ADAPTER_ADDRESSES)vlmcsd_malloc(outBufLen);
|
||||||
|
|
||||||
@ -437,7 +434,7 @@ void getPrivateIPAddresses(int* numAddresses, char*** ipAddresses)
|
|||||||
if (!isPrivateIPAddress(currentAddress->Address.lpSockaddr, &length)) continue;
|
if (!isPrivateIPAddress(currentAddress->Address.lpSockaddr, &length)) continue;
|
||||||
|
|
||||||
char *ipAddress = (char*)vlmcsd_malloc(64);
|
char *ipAddress = (char*)vlmcsd_malloc(64);
|
||||||
int error = getnameinfo(currentAddress->Address.lpSockaddr, currentAddress->Address.iSockaddrLength, ipAddress, 64, NULL, 0, NI_NUMERICHOST);
|
const int error = getnameinfo(currentAddress->Address.lpSockaddr, currentAddress->Address.iSockaddrLength, ipAddress, 64, NULL, 0, NI_NUMERICHOST);
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
@ -569,20 +566,17 @@ static int listenOnAddress(const struct addrinfo *const ai, SOCKET *s)
|
|||||||
# if defined(_WIN32) || defined(__CYGWIN__)
|
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
// if (IsWindowsVistaOrGreater()) //Doesn't work with older version of MingW32-w64 toolchain
|
// if (IsWindowsVistaOrGreater()) //Doesn't work with older version of MingW32-w64 toolchain
|
||||||
if ((GetVersion() & 0xff) > 5)
|
if ((GetVersion() & 0xff) > 5)
|
||||||
|
{
|
||||||
# endif // _WIN32
|
# endif // _WIN32
|
||||||
printerrorf("Warning: %s does not support socket option IPV6_V6ONLY: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
printerrorf("Warning: %s does not support socket option IPV6_V6ONLY: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
||||||
|
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
}
|
||||||
|
# endif // _WIN32
|
||||||
# endif // _PEDANTIC
|
# endif // _PEDANTIC
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if !_WIN32 && !__CYGWIN__
|
allowSocketReuse(*s);
|
||||||
if (setsockopt(*s, SOL_SOCKET, SO_REUSEADDR, (sockopt_t)&socketOption, sizeof(socketOption)))
|
|
||||||
{
|
|
||||||
# ifdef _PEDANTIC
|
|
||||||
printerrorf("Warning: %s does not support socket option SO_REUSEADDR: %s\n", ipstr, vlmcsd_strerror(socket_errno));
|
|
||||||
# endif // _PEDANTIC
|
|
||||||
}
|
|
||||||
# endif // !_WIN32 && !__CYGWIN__
|
|
||||||
|
|
||||||
# if HAVE_FREEBIND
|
# if HAVE_FREEBIND
|
||||||
# if (defined(IP_NONLOCALOK) || __FreeBSD_kernel__ || __FreeBSD__) && !defined(IPV6_BINDANY)
|
# if (defined(IP_NONLOCALOK) || __FreeBSD_kernel__ || __FreeBSD__) && !defined(IPV6_BINDANY)
|
||||||
@ -667,6 +661,10 @@ BOOL addListeningSocket(const char *const addr)
|
|||||||
numsockets++;
|
numsockets++;
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
exitOnWarningLevel(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
freeaddrinfo(aiList);
|
freeaddrinfo(aiList);
|
||||||
@ -681,7 +679,7 @@ __pure int_fast8_t checkProtocolStack(const int addressfamily)
|
|||||||
SOCKET s; // = INVALID_SOCKET;
|
SOCKET s; // = INVALID_SOCKET;
|
||||||
|
|
||||||
s = socket(addressfamily, SOCK_STREAM, 0);
|
s = socket(addressfamily, SOCK_STREAM, 0);
|
||||||
int_fast8_t success = (s != INVALID_SOCKET);
|
const int_fast8_t success = (s != INVALID_SOCKET);
|
||||||
|
|
||||||
socketclose(s);
|
socketclose(s);
|
||||||
return success;
|
return success;
|
||||||
@ -766,7 +764,7 @@ static void serveClient(const SOCKET s_client, const DWORD RpcAssocGroup)
|
|||||||
|
|
||||||
# if !defined(NO_LOG) && defined(_PEDANTIC)
|
# if !defined(NO_LOG) && defined(_PEDANTIC)
|
||||||
|
|
||||||
int result =
|
const int result =
|
||||||
setsockopt(s_client, SOL_SOCKET, SO_RCVTIMEO, (sockopt_t)&to, sizeof(to)) ||
|
setsockopt(s_client, SOL_SOCKET, SO_RCVTIMEO, (sockopt_t)&to, sizeof(to)) ||
|
||||||
setsockopt(s_client, SOL_SOCKET, SO_SNDTIMEO, (sockopt_t)&to, sizeof(to));
|
setsockopt(s_client, SOL_SOCKET, SO_SNDTIMEO, (sockopt_t)&to, sizeof(to));
|
||||||
|
|
||||||
|
344
src/ntservice.c
344
src/ntservice.c
@ -16,115 +16,107 @@ SERVICE_STATUS_HANDLE gSvcStatusHandle;
|
|||||||
|
|
||||||
VOID WINAPI ServiceCtrlHandler(DWORD dwCtrl)
|
VOID WINAPI ServiceCtrlHandler(DWORD dwCtrl)
|
||||||
{
|
{
|
||||||
// Handle the requested control code.
|
// Handle the requested control code.
|
||||||
|
switch (dwCtrl)
|
||||||
switch(dwCtrl)
|
|
||||||
{
|
{
|
||||||
case SERVICE_CONTROL_STOP:
|
case SERVICE_CONTROL_STOP:
|
||||||
case SERVICE_CONTROL_SHUTDOWN:
|
case SERVICE_CONTROL_SHUTDOWN:
|
||||||
|
|
||||||
ServiceShutdown = TRUE;
|
ServiceShutdown = TRUE;
|
||||||
ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
|
ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
|
||||||
|
|
||||||
// Remove PID file and free ressources
|
// Remove PID file and free ressources
|
||||||
cleanup();
|
cleanup();
|
||||||
# ifdef USE_MSRPC
|
# if __CYGWIN__ || defined(USE_MSRPC)
|
||||||
ReportServiceStatus(SERVICE_STOPPED, NO_ERROR, 0);
|
ReportServiceStatus(SERVICE_STOPPED, NO_ERROR, 0);
|
||||||
# endif // !USE_MSRPC
|
# endif // __CYGWIN__
|
||||||
return;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID WINAPI ServiceMain(const int argc_unused, CARGV argv_unused)
|
static VOID WINAPI ServiceMain(const int argc_unused, CARGV argv_unused)
|
||||||
{
|
{
|
||||||
// Register the handler function for the service
|
// Register the handler function for the service
|
||||||
|
|
||||||
gSvcStatusHandle = RegisterServiceCtrlHandler(
|
if (!((gSvcStatusHandle = RegisterServiceCtrlHandler(NT_SERVICE_NAME, ServiceCtrlHandler))))
|
||||||
NT_SERVICE_NAME,
|
{
|
||||||
ServiceCtrlHandler
|
return;
|
||||||
);
|
}
|
||||||
|
|
||||||
if(!gSvcStatusHandle)
|
// These SERVICE_STATUS members remain as set here
|
||||||
{
|
|
||||||
//ServiceReportEvent(RegisterServiceCtrlHandler);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// These SERVICE_STATUS members remain as set here
|
gSvcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
||||||
|
gSvcStatus.dwServiceSpecificExitCode = 0;
|
||||||
|
|
||||||
gSvcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
// Run the actual program
|
||||||
gSvcStatus.dwServiceSpecificExitCode = 0;
|
ReportServiceStatus(SERVICE_STOPPED, newmain(), 3000);
|
||||||
|
|
||||||
// Run the actual program
|
|
||||||
ReportServiceStatus(SERVICE_STOPPED, newmain(), 3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SERVICE_TABLE_ENTRY NTServiceDispatchTable[] = {
|
SERVICE_TABLE_ENTRY NTServiceDispatchTable[] = {
|
||||||
{
|
{
|
||||||
(LPSTR)NT_SERVICE_NAME,
|
(LPSTR)NT_SERVICE_NAME,
|
||||||
(LPSERVICE_MAIN_FUNCTION) ServiceMain
|
(LPSERVICE_MAIN_FUNCTION)ServiceMain
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VOID ReportServiceStatus(const DWORD dwCurrentState, const DWORD dwWin32ExitCode, const DWORD dwWaitHint)
|
VOID ReportServiceStatus(const DWORD dwCurrentState, const DWORD dwWin32ExitCode, const DWORD dwWaitHint)
|
||||||
{
|
{
|
||||||
static DWORD dwCheckPoint = 1;
|
static DWORD dwCheckPoint = 1;
|
||||||
|
|
||||||
// Fill in the SERVICE_STATUS structure.
|
// Fill in the SERVICE_STATUS structure.
|
||||||
|
|
||||||
gSvcStatus.dwCurrentState = dwCurrentState;
|
gSvcStatus.dwCurrentState = dwCurrentState;
|
||||||
gSvcStatus.dwWin32ExitCode = dwWin32ExitCode;
|
gSvcStatus.dwWin32ExitCode = dwWin32ExitCode;
|
||||||
gSvcStatus.dwWaitHint = dwWaitHint;
|
gSvcStatus.dwWaitHint = dwWaitHint;
|
||||||
|
|
||||||
if (dwCurrentState == SERVICE_START_PENDING)
|
if (dwCurrentState == SERVICE_START_PENDING)
|
||||||
gSvcStatus.dwControlsAccepted = 0;
|
gSvcStatus.dwControlsAccepted = 0;
|
||||||
else
|
else
|
||||||
gSvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
|
gSvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
|
||||||
|
|
||||||
if ( (dwCurrentState == SERVICE_RUNNING) ||
|
if ((dwCurrentState == SERVICE_RUNNING) ||
|
||||||
(dwCurrentState == SERVICE_STOPPED) )
|
(dwCurrentState == SERVICE_STOPPED))
|
||||||
gSvcStatus.dwCheckPoint = 0;
|
gSvcStatus.dwCheckPoint = 0;
|
||||||
else
|
else
|
||||||
gSvcStatus.dwCheckPoint = dwCheckPoint++;
|
gSvcStatus.dwCheckPoint = dwCheckPoint++;
|
||||||
|
|
||||||
// Report the status of the service to the SCM.
|
// Report the status of the service to the SCM.
|
||||||
SetServiceStatus(gSvcStatusHandle, &gSvcStatus);
|
SetServiceStatus(gSvcStatusHandle, &gSvcStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*VOID ServiceReportEvent(char *szFunction)
|
/*VOID ServiceReportEvent(char *szFunction)
|
||||||
{
|
{
|
||||||
HANDLE hEventSource;
|
HANDLE hEventSource;
|
||||||
const char *eventStrings[2];
|
const char *eventStrings[2];
|
||||||
TCHAR Buffer[80];
|
TCHAR Buffer[80];
|
||||||
|
|
||||||
hEventSource = RegisterEventSource(NULL, NT_SERVICE_NAME);
|
hEventSource = RegisterEventSource(NULL, NT_SERVICE_NAME);
|
||||||
|
|
||||||
if (hEventSource)
|
if (hEventSource)
|
||||||
{
|
{
|
||||||
snprintf(Buffer, 80, "%s failed with %d", szFunction, GetLastError());
|
snprintf(Buffer, 80, "%s failed with %d", szFunction, GetLastError());
|
||||||
|
|
||||||
eventStrings[0] = NT_SERVICE_NAME;
|
eventStrings[0] = NT_SERVICE_NAME;
|
||||||
eventStrings[1] = Buffer;
|
eventStrings[1] = Buffer;
|
||||||
|
|
||||||
ReportEvent(hEventSource, // event log handle
|
ReportEvent(hEventSource, // event log handle
|
||||||
EVENTLOG_ERROR_TYPE, // event type
|
EVENTLOG_ERROR_TYPE, // event type
|
||||||
0, // event category
|
0, // event category
|
||||||
00, // event identifier
|
00, // event identifier
|
||||||
NULL, // no security identifier
|
NULL, // no security identifier
|
||||||
2, // size of lpszStrings array
|
2, // size of lpszStrings array
|
||||||
0, // no binary data
|
0, // no binary data
|
||||||
eventStrings, // array of strings
|
eventStrings, // array of strings
|
||||||
NULL); // no binary data
|
NULL); // no binary data
|
||||||
|
|
||||||
DeregisterEventSource(hEventSource);
|
DeregisterEventSource(hEventSource);
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//Returns 0=Error, 1=Success, 2=Doesn't exist
|
//Returns 0=Error, 1=Success, 2=Doesn't exist
|
||||||
@ -146,12 +138,12 @@ static uint_fast8_t OpenAndRemoveService(DWORD *dwPreviousState, SC_HANDLE *schS
|
|||||||
closeManager = TRUE;
|
closeManager = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*schSCManager = OpenSCManager(
|
*schSCManager = OpenSCManager(
|
||||||
NULL, // local computer
|
NULL, // local computer
|
||||||
NULL, // ServicesActive database
|
NULL, // ServicesActive database
|
||||||
SC_MANAGER_ALL_ACCESS); // full access rights
|
SC_MANAGER_ALL_ACCESS); // full access rights
|
||||||
|
|
||||||
if (!*schSCManager) return 0;
|
if (!*schSCManager) return 0;
|
||||||
|
|
||||||
if (!((installedService = OpenService(*schSCManager, NT_SERVICE_NAME, SERVICE_ALL_ACCESS))))
|
if (!((installedService = OpenService(*schSCManager, NT_SERVICE_NAME, SERVICE_ALL_ACCESS))))
|
||||||
{
|
{
|
||||||
@ -182,86 +174,86 @@ static uint_fast8_t OpenAndRemoveService(DWORD *dwPreviousState, SC_HANDLE *schS
|
|||||||
|
|
||||||
static VOID ServiceInstaller(const char *restrict ServiceUser, const char *const ServicePassword)
|
static VOID ServiceInstaller(const char *restrict ServiceUser, const char *const ServicePassword)
|
||||||
{
|
{
|
||||||
SC_HANDLE schSCManager;
|
SC_HANDLE schSCManager;
|
||||||
SC_HANDLE schService;
|
SC_HANDLE schService;
|
||||||
char szPath[MAX_PATH] = "\"";
|
char szPath[MAX_PATH] = "\"";
|
||||||
|
|
||||||
if (!GetModuleFileName(NULL, szPath + sizeof(char), MAX_PATH - 1))
|
if (!GetModuleFileName(NULL, szPath + sizeof(char), MAX_PATH - 1))
|
||||||
{
|
{
|
||||||
errorout("Cannot install service (%d)\n", (uint32_t)GetLastError());
|
errorout("Cannot install service (%d)\n", (uint32_t)GetLastError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(szPath,"\"");
|
strcat(szPath, "\"");
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i < global_argc; i ++)
|
for (i = 1; i < global_argc; i++)
|
||||||
{
|
{
|
||||||
// Strip unneccessary parameters, especially the password
|
// Strip unneccessary parameters, especially the password
|
||||||
if (!strcmp(global_argv[i], "-s")) continue;
|
if (!strcmp(global_argv[i], "-s")) continue;
|
||||||
|
|
||||||
if (!strcmp(global_argv[i], "-W") ||
|
if (!strcmp(global_argv[i], "-W") ||
|
||||||
!strcmp(global_argv[i], "-U"))
|
!strcmp(global_argv[i], "-U"))
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(szPath, " ");
|
strcat(szPath, " ");
|
||||||
|
|
||||||
if (strchr(global_argv[i], ' '))
|
if (strchr(global_argv[i], ' '))
|
||||||
{
|
{
|
||||||
strcat(szPath, "\"");
|
strcat(szPath, "\"");
|
||||||
strcat(szPath, global_argv[i]);
|
strcat(szPath, global_argv[i]);
|
||||||
strcat(szPath, "\"");
|
strcat(szPath, "\"");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strcat(szPath, global_argv[i]);
|
strcat(szPath, global_argv[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a handle to the SCM database.
|
// Get a handle to the SCM database.
|
||||||
|
|
||||||
SERVICE_STATUS status;
|
SERVICE_STATUS status;
|
||||||
DWORD dwPreviousState;
|
DWORD dwPreviousState;
|
||||||
|
|
||||||
if (!OpenAndRemoveService(&dwPreviousState, &schSCManager))
|
if (!OpenAndRemoveService(&dwPreviousState, &schSCManager))
|
||||||
{
|
{
|
||||||
errorout("Service removal failed (%d)\n", (uint32_t)GetLastError());
|
errorout("Service removal failed (%d)\n", (uint32_t)GetLastError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *tempUser = NULL;
|
char *tempUser = NULL;
|
||||||
|
|
||||||
if (ServiceUser)
|
if (ServiceUser)
|
||||||
{
|
{
|
||||||
// Shortcuts for some well known users
|
// Shortcuts for some well known users
|
||||||
if (!strcasecmp(ServiceUser, "/l")) ServiceUser="NT AUTHORITY\\LocalService";
|
if (!strcasecmp(ServiceUser, "/l")) ServiceUser = "NT AUTHORITY\\LocalService";
|
||||||
if (!strcasecmp(ServiceUser, "/n")) ServiceUser="NT AUTHORITY\\NetworkService";
|
if (!strcasecmp(ServiceUser, "/n")) ServiceUser = "NT AUTHORITY\\NetworkService";
|
||||||
|
|
||||||
// Allow Local Users without .\ , e.g. "johndoe" instead of ".\johndoe"
|
// Allow Local Users without .\ , e.g. "johndoe" instead of ".\johndoe"
|
||||||
if (!strchr(ServiceUser, '\\'))
|
if (!strchr(ServiceUser, '\\'))
|
||||||
{
|
{
|
||||||
tempUser = (char*)vlmcsd_malloc(strlen(ServiceUser) + 3);
|
tempUser = (char*)vlmcsd_malloc(strlen(ServiceUser) + 3);
|
||||||
strcpy(tempUser, ".\\");
|
strcpy(tempUser, ".\\");
|
||||||
strcat(tempUser, ServiceUser);
|
strcat(tempUser, ServiceUser);
|
||||||
ServiceUser = tempUser;
|
ServiceUser = tempUser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
schService = CreateService(
|
schService = CreateService(
|
||||||
schSCManager, // SCM database
|
schSCManager, // SCM database
|
||||||
NT_SERVICE_NAME, // name of service
|
NT_SERVICE_NAME, // name of service
|
||||||
NT_SERVICE_DISPLAY_NAME, // service name to display
|
NT_SERVICE_DISPLAY_NAME, // service name to display
|
||||||
SERVICE_ALL_ACCESS, // desired access
|
SERVICE_ALL_ACCESS, // desired access
|
||||||
SERVICE_WIN32_OWN_PROCESS, // service type
|
SERVICE_WIN32_OWN_PROCESS, // service type
|
||||||
SERVICE_AUTO_START, // start type
|
SERVICE_AUTO_START, // start type
|
||||||
SERVICE_ERROR_NORMAL, // error control type
|
SERVICE_ERROR_NORMAL, // error control type
|
||||||
szPath, // path to service's binary
|
szPath, // path to service's binary
|
||||||
NULL, // no load ordering group
|
NULL, // no load ordering group
|
||||||
NULL, // no tag identifier
|
NULL, // no tag identifier
|
||||||
"tcpip\0", // depends on TCP/IP
|
"tcpip\0", // depends on TCP/IP
|
||||||
ServiceUser, // LocalSystem account
|
ServiceUser, // LocalSystem account
|
||||||
ServicePassword); // no password
|
ServicePassword); // no password
|
||||||
|
|
||||||
# if __clang__ && (__CYGWIN__ || __MINGW64__ )
|
# if __clang__ && (__CYGWIN__ || __MINGW64__ )
|
||||||
// Workaround for clang not understanding some GCC asm syntax used in <w32api/psdk_inc/intrin-impl.h>
|
// Workaround for clang not understanding some GCC asm syntax used in <w32api/psdk_inc/intrin-impl.h>
|
||||||
@ -271,43 +263,43 @@ static VOID ServiceInstaller(const char *restrict ServiceUser, const char *const
|
|||||||
# endif
|
# endif
|
||||||
if (tempUser) free(tempUser);
|
if (tempUser) free(tempUser);
|
||||||
|
|
||||||
if (schService == NULL)
|
if (schService == NULL)
|
||||||
{
|
{
|
||||||
errorout("CreateService failed (%u)\n", (uint32_t)GetLastError());
|
errorout("CreateService failed (%u)\n", (uint32_t)GetLastError());
|
||||||
CloseServiceHandle(schSCManager);
|
CloseServiceHandle(schSCManager);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorout("Service installed successfully\n");
|
errorout("Service installed successfully\n");
|
||||||
|
|
||||||
if (dwPreviousState == SERVICE_RUNNING)
|
if (dwPreviousState == SERVICE_RUNNING)
|
||||||
{
|
{
|
||||||
printf("Restarting " NT_SERVICE_NAME " service => ");
|
printf("Restarting " NT_SERVICE_NAME " service => ");
|
||||||
status.dwCurrentState = SERVICE_STOPPED;
|
status.dwCurrentState = SERVICE_STOPPED;
|
||||||
|
|
||||||
if (StartService(schService, 0, NULL))
|
if (StartService(schService, 0, NULL))
|
||||||
{
|
{
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
if (!QueryServiceStatus(schService, &status) || status.dwCurrentState != SERVICE_START_PENDING) break;
|
if (!QueryServiceStatus(schService, &status) || status.dwCurrentState != SERVICE_START_PENDING) break;
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status.dwCurrentState == SERVICE_RUNNING)
|
if (status.dwCurrentState == SERVICE_RUNNING)
|
||||||
printf("Success\n");
|
printf("Success\n");
|
||||||
else if (status.dwCurrentState == SERVICE_START_PENDING)
|
else if (status.dwCurrentState == SERVICE_START_PENDING)
|
||||||
printf("Not ready within a second\n");
|
printf("Not ready within a second\n");
|
||||||
else
|
else
|
||||||
errorout("Error\n");
|
errorout("Error\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
errorout("Error %u\n", (uint32_t)GetLastError());
|
errorout("Error %u\n", (uint32_t)GetLastError());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CloseServiceHandle(schService);
|
CloseServiceHandle(schService);
|
||||||
CloseServiceHandle(schSCManager);
|
CloseServiceHandle(schSCManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
int NtServiceInstallation(const int_fast8_t installService, const char *restrict ServiceUser, const char *const ServicePassword)
|
int NtServiceInstallation(const int_fast8_t installService, const char *restrict ServiceUser, const char *const ServicePassword)
|
||||||
@ -322,7 +314,7 @@ int NtServiceInstallation(const int_fast8_t installService, const char *restrict
|
|||||||
|
|
||||||
if (installService == 2) // Remove
|
if (installService == 2) // Remove
|
||||||
{
|
{
|
||||||
switch(OpenAndRemoveService(NULL, NULL))
|
switch (OpenAndRemoveService(NULL, NULL))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
errorout("Error removing service %s\n", NT_SERVICE_NAME);
|
errorout("Error removing service %s\n", NT_SERVICE_NAME);
|
||||||
|
@ -643,6 +643,10 @@ void printServerFlags()
|
|||||||
" SUPPORT_WINE"
|
" SUPPORT_WINE"
|
||||||
# endif // (_WIN32 || __CYGWIN__) && (!defined(USE_MSRPC) || defined(SUPPORT_WINE))
|
# endif // (_WIN32 || __CYGWIN__) && (!defined(USE_MSRPC) || defined(SUPPORT_WINE))
|
||||||
|
|
||||||
|
# if (_WIN32 || __CYGWIN__) && defined(NO_TAP)
|
||||||
|
" NO_TAP"
|
||||||
|
# endif // (_WIN32 || __CYGWIN__) && defined(NO_TAP)
|
||||||
|
|
||||||
# if !HAVE_FREEBIND
|
# if !HAVE_FREEBIND
|
||||||
" NO_FREEBIND"
|
" NO_FREEBIND"
|
||||||
# endif //!HAVE_FREEBIND
|
# endif //!HAVE_FREEBIND
|
||||||
|
32
src/rpc.c
32
src/rpc.c
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
/* Forwards */
|
/* Forwards */
|
||||||
|
|
||||||
static int checkRpcHeader(const RPC_HEADER *const Header, const BYTE desiredPacketType, const PRINTFUNC p);
|
static int checkRpcHeader(const RPC_HEADER *const header, const BYTE desiredPacketType, const PRINTFUNC p);
|
||||||
|
|
||||||
|
|
||||||
/* Data definitions */
|
/* Data definitions */
|
||||||
@ -254,7 +254,7 @@ static int rpcRequest(const RPC_REQUEST64 *const Request, RPC_RESPONSE64 *const
|
|||||||
|
|
||||||
# ifndef SIMPLE_RPC
|
# ifndef SIMPLE_RPC
|
||||||
|
|
||||||
WORD Ctx = LE16(Request->ContextId);
|
const WORD Ctx = LE16(Request->ContextId);
|
||||||
|
|
||||||
if (Ctx == *NdrCtx)
|
if (Ctx == *NdrCtx)
|
||||||
{
|
{
|
||||||
@ -282,7 +282,7 @@ static int rpcRequest(const RPC_REQUEST64 *const Request, RPC_RESPONSE64 *const
|
|||||||
|
|
||||||
if (isValid)
|
if (isValid)
|
||||||
{
|
{
|
||||||
uint16_t majorIndex = LE16(((WORD*)requestData)[1]) - 4;
|
const uint16_t majorIndex = LE16(((WORD*)requestData)[1]) - 4;
|
||||||
if (!((ResponseSize = _Versions[majorIndex].CreateResponse(requestData, responseData, ipstr)))) ResponseSize = 0x8007000D;
|
if (!((ResponseSize = _Versions[majorIndex].CreateResponse(requestData, responseData, ipstr)))) ResponseSize = 0x8007000D;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ static int rpcRequest(const RPC_REQUEST64 *const Request, RPC_RESPONSE64 *const
|
|||||||
len += sizeof(DWORD);
|
len += sizeof(DWORD);
|
||||||
|
|
||||||
// Pad zeros to 32-bit align (seems not neccassary but Windows RPC does it this way)
|
// Pad zeros to 32-bit align (seems not neccassary but Windows RPC does it this way)
|
||||||
int pad = ((~len & 3) + 1) & 3;
|
const int pad = ((~len & 3) + 1) & 3;
|
||||||
memset(pRpcReturnCode + sizeof(DWORD), 0, pad);
|
memset(pRpcReturnCode + sizeof(DWORD), 0, pad);
|
||||||
len += pad;
|
len += pad;
|
||||||
|
|
||||||
@ -348,8 +348,8 @@ static void CheckRpcBindRequest(const RPC_BIND_REQUEST *const Request, const uns
|
|||||||
uint_fast8_t i, HasTransferSyntaxNDR32 = FALSE;
|
uint_fast8_t i, HasTransferSyntaxNDR32 = FALSE;
|
||||||
char guidBuffer1[GUID_STRING_LENGTH + 1], guidBuffer2[GUID_STRING_LENGTH + 1];
|
char guidBuffer1[GUID_STRING_LENGTH + 1], guidBuffer2[GUID_STRING_LENGTH + 1];
|
||||||
|
|
||||||
uint32_t CapCtxItems = (len - sizeof(*Request) + sizeof(Request->CtxItems)) / sizeof(Request->CtxItems);
|
const uint32_t CapCtxItems = (len - sizeof(*Request) + sizeof(Request->CtxItems)) / sizeof(Request->CtxItems);
|
||||||
DWORD NumCtxItems = LE32(Request->NumCtxItems);
|
const DWORD NumCtxItems = LE32(Request->NumCtxItems);
|
||||||
|
|
||||||
if (NumCtxItems < CapCtxItems) // Can't be too small because already handled by RpcBindSize
|
if (NumCtxItems < CapCtxItems) // Can't be too small because already handled by RpcBindSize
|
||||||
logger("Warning: Excess bytes in RPC bind request.\n");
|
logger("Warning: Excess bytes in RPC bind request.\n");
|
||||||
@ -406,11 +406,11 @@ static void CheckRpcBindRequest(const RPC_BIND_REQUEST *const Request, const uns
|
|||||||
/*
|
/*
|
||||||
* Check, if we receive enough bytes to return a valid RPC bind response
|
* Check, if we receive enough bytes to return a valid RPC bind response
|
||||||
*/
|
*/
|
||||||
static unsigned int checkRpcBindSize(const RPC_BIND_REQUEST *const Request, const unsigned int RequestSize, WORD* NdrCtx, WORD* Ndr64Ctx)
|
static unsigned int checkRpcBindSize(const RPC_BIND_REQUEST *const Request, const unsigned int RequestSize, WORD* NdrCtx_unused, WORD* Ndr64Ctx_unused)
|
||||||
{
|
{
|
||||||
if (RequestSize < sizeof(RPC_BIND_REQUEST)) return FALSE;
|
if (RequestSize < sizeof(RPC_BIND_REQUEST)) return FALSE;
|
||||||
|
|
||||||
unsigned int numCtxItems = LE32(Request->NumCtxItems);
|
const unsigned int numCtxItems = LE32(Request->NumCtxItems);
|
||||||
|
|
||||||
if (RequestSize < sizeof(RPC_BIND_REQUEST) - sizeof(Request->CtxItems[0]) + numCtxItems * sizeof(Request->CtxItems[0])) return FALSE;
|
if (RequestSize < sizeof(RPC_BIND_REQUEST) - sizeof(Request->CtxItems[0]) + numCtxItems * sizeof(Request->CtxItems[0])) return FALSE;
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ static unsigned int checkRpcBindSize(const RPC_BIND_REQUEST *const Request, cons
|
|||||||
static int rpcBind(const RPC_BIND_REQUEST *const Request, RPC_BIND_RESPONSE* Response, const DWORD RpcAssocGroup, const SOCKET sock, WORD* NdrCtx, WORD* Ndr64Ctx, BYTE packetType, const char* const ipstr_unused)
|
static int rpcBind(const RPC_BIND_REQUEST *const Request, RPC_BIND_RESPONSE* Response, const DWORD RpcAssocGroup, const SOCKET sock, WORD* NdrCtx, WORD* Ndr64Ctx, BYTE packetType, const char* const ipstr_unused)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
DWORD numCtxItems = LE32(Request->NumCtxItems);
|
const DWORD numCtxItems = LE32(Request->NumCtxItems);
|
||||||
int_fast8_t IsNDR64possible = FALSE;
|
int_fast8_t IsNDR64possible = FALSE;
|
||||||
uint_fast8_t portNumberSize;
|
uint_fast8_t portNumberSize;
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ static int rpcBind(const RPC_BIND_REQUEST *const Request, RPC_BIND_RESPONSE* Res
|
|||||||
memset(&result->TransferSyntax, 0, sizeof(GUID));
|
memset(&result->TransferSyntax, 0, sizeof(GUID));
|
||||||
|
|
||||||
# ifndef SIMPLE_RPC
|
# ifndef SIMPLE_RPC
|
||||||
int isInterfaceUUID = IsEqualGUID(&Request->CtxItems[i].InterfaceUUID, (GUID*)InterfaceUuid);
|
const int isInterfaceUUID = IsEqualGUID(&Request->CtxItems[i].InterfaceUUID, (GUID*)InterfaceUuid);
|
||||||
if (isInterfaceUUID) nackReason = RPC_SYNTAX_UNSUPPORTED;
|
if (isInterfaceUUID) nackReason = RPC_SYNTAX_UNSUPPORTED;
|
||||||
# else // SIMPLE_RPC
|
# else // SIMPLE_RPC
|
||||||
# define isInterfaceUUID TRUE
|
# define isInterfaceUUID TRUE
|
||||||
@ -809,7 +809,7 @@ RpcStatus rpcSendRequest(const RpcCtx sock, const BYTE *const kmsRequest, const
|
|||||||
RPC_REQUEST64 *RpcRequest;
|
RPC_REQUEST64 *RpcRequest;
|
||||||
RPC_RESPONSE64 _Response;
|
RPC_RESPONSE64 _Response;
|
||||||
int status;
|
int status;
|
||||||
int_fast8_t useNdr64 = RpcFlags.HasNDR64 && UseClientRpcNDR64 && firstPacketSent;
|
const int_fast8_t useNdr64 = RpcFlags.HasNDR64 && UseClientRpcNDR64 && firstPacketSent;
|
||||||
size_t size = sizeof(RPC_HEADER) + (useNdr64 ? sizeof(RPC_REQUEST64) : sizeof(RPC_REQUEST)) + requestSize;
|
size_t size = sizeof(RPC_HEADER) + (useNdr64 ? sizeof(RPC_REQUEST64) : sizeof(RPC_REQUEST)) + requestSize;
|
||||||
size_t responseSize2;
|
size_t responseSize2;
|
||||||
|
|
||||||
@ -949,8 +949,8 @@ RpcStatus rpcSendRequest(const RpcCtx sock, const BYTE *const kmsRequest, const
|
|||||||
|
|
||||||
DWORD *pReturnCode;
|
DWORD *pReturnCode;
|
||||||
|
|
||||||
size_t len = *responseSize + (useNdr64 ? sizeof(_Response.Ndr64) : sizeof(_Response.Ndr)) + sizeof(*pReturnCode);
|
const size_t len = *responseSize + (useNdr64 ? sizeof(_Response.Ndr64) : sizeof(_Response.Ndr)) + sizeof(*pReturnCode);
|
||||||
size_t pad = ((~len & 3) + 1) & 3;
|
const size_t pad = ((~len & 3) + 1) & 3;
|
||||||
|
|
||||||
if (len + pad != LE32(_Response.AllocHint))
|
if (len + pad != LE32(_Response.AllocHint))
|
||||||
{
|
{
|
||||||
@ -982,7 +982,7 @@ RpcStatus rpcSendRequest(const RpcCtx sock, const BYTE *const kmsRequest, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int_fast8_t IsNullGuid(BYTE* guidPtr)
|
static int_fast8_t IsNullGuid(const BYTE* guidPtr)
|
||||||
{
|
{
|
||||||
int_fast8_t i;
|
int_fast8_t i;
|
||||||
|
|
||||||
@ -1005,8 +1005,8 @@ static RpcStatus rpcBindOrAlterClientContext(const RpcCtx sock, const BYTE packe
|
|||||||
RPC_BIND_REQUEST *bindRequest;
|
RPC_BIND_REQUEST *bindRequest;
|
||||||
RPC_BIND_RESPONSE *bindResponse;
|
RPC_BIND_RESPONSE *bindResponse;
|
||||||
int status;
|
int status;
|
||||||
WORD ctxItems = 1 + (packetType == RPC_PT_BIND_REQ ? UseClientRpcNDR64 + UseClientRpcBTFN : 0);
|
const WORD ctxItems = 1 + (packetType == RPC_PT_BIND_REQ ? UseClientRpcNDR64 + UseClientRpcBTFN : 0);
|
||||||
size_t rpcBindSize = (sizeof(RPC_HEADER) + sizeof(RPC_BIND_REQUEST) + (ctxItems - 1) * sizeof(bindRequest->CtxItems[0]));
|
const size_t rpcBindSize = (sizeof(RPC_HEADER) + sizeof(RPC_BIND_REQUEST) + (ctxItems - 1) * sizeof(bindRequest->CtxItems[0]));
|
||||||
WORD ctxIndex = 0;
|
WORD ctxIndex = 0;
|
||||||
WORD i;
|
WORD i;
|
||||||
WORD CtxBTFN = RPC_INVALID_CTX, CtxNDR64 = RPC_INVALID_CTX;
|
WORD CtxBTFN = RPC_INVALID_CTX, CtxNDR64 = RPC_INVALID_CTX;
|
||||||
|
@ -75,6 +75,8 @@ int_fast8_t logverbose = 0;
|
|||||||
#endif // NO_LOG
|
#endif // NO_LOG
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
|
int_fast8_t ExitLevel = 0;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
int_fast8_t nodaemon = 0;
|
int_fast8_t nodaemon = 0;
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
@ -84,7 +86,7 @@ int_fast8_t InetdMode = 0;
|
|||||||
int_fast8_t nodaemon = 1;
|
int_fast8_t nodaemon = 1;
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
int_fast8_t InetdMode = 1;
|
int_fast8_t InetdMode = 1;
|
||||||
#endif
|
#endif // NO_SOCKETS
|
||||||
|
|
||||||
PVlmcsdHeader_t KmsData = NULL;
|
PVlmcsdHeader_t KmsData = NULL;
|
||||||
#ifndef NO_EXTERNAL_DATA
|
#ifndef NO_EXTERNAL_DATA
|
||||||
@ -102,9 +104,15 @@ const char *fn_exe = NULL;
|
|||||||
#ifndef NO_RANDOM_EPID
|
#ifndef NO_RANDOM_EPID
|
||||||
int_fast8_t RandomizationLevel = 1;
|
int_fast8_t RandomizationLevel = 1;
|
||||||
uint16_t Lcid = 0;
|
uint16_t Lcid = 0;
|
||||||
|
uint16_t HostBuild = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#if !defined(USE_MSRPC) && !defined(SIMPLE_RPC)
|
||||||
|
uint8_t IsNDR64Defined = FALSE;
|
||||||
|
#endif // !defined(USE_MSRPC) && !defined(SIMPLE_RPC)
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||||
#ifdef SIMPLE_SOCKETS
|
#ifdef SIMPLE_SOCKETS
|
||||||
SOCKET s_server;
|
SOCKET s_server;
|
||||||
#else
|
#else
|
||||||
@ -120,7 +128,7 @@ HANDLE MaxTaskSemaphore;
|
|||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#endif // !defined(NO_LIMIT) && !__minix__
|
#endif // !defined(NO_LIMIT) && !__minix__
|
||||||
#endif // NO_SOCKETS
|
#endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||||
|
|
||||||
#ifdef _NTSERVICE
|
#ifdef _NTSERVICE
|
||||||
int_fast8_t IsNTService = TRUE;
|
int_fast8_t IsNTService = TRUE;
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "kms.h"
|
#include "kms.h"
|
||||||
|
|
||||||
#define MIN_CSVLK 4
|
//#define MIN_CSVLK 6
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char* Epid;
|
const char* Epid;
|
||||||
@ -133,6 +133,7 @@ extern int_fast8_t UseClientRpcBTFN;
|
|||||||
#endif // USE_MSRPC
|
#endif // USE_MSRPC
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
|
extern int_fast8_t ExitLevel;
|
||||||
extern char *defaultport;
|
extern char *defaultport;
|
||||||
#endif // NO_SOCKETS
|
#endif // NO_SOCKETS
|
||||||
|
|
||||||
@ -161,9 +162,14 @@ extern int_fast8_t logverbose;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(USE_MSRPC) && !defined(SIMPLE_RPC)
|
||||||
|
extern uint8_t IsNDR64Defined;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NO_RANDOM_EPID
|
#ifndef NO_RANDOM_EPID
|
||||||
extern int_fast8_t RandomizationLevel;
|
extern int_fast8_t RandomizationLevel;
|
||||||
extern uint16_t Lcid;
|
extern uint16_t Lcid;
|
||||||
|
extern uint16_t HostBuild;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||||
|
77
src/tap-windows.h
Normal file
77
src/tap-windows.h
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* TAP-Windows -- A kernel driver to provide virtual tap
|
||||||
|
* device functionality on Windows.
|
||||||
|
*
|
||||||
|
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
||||||
|
*
|
||||||
|
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
||||||
|
* and is released under the GPL version 2 (see below). This particular file
|
||||||
|
* (tap-windows.h) is also licensed using the MIT license (see COPYRIGHT.MIT).
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2
|
||||||
|
* as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program (see the file COPYING included with this
|
||||||
|
* distribution); if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
#ifndef __TAP_WIN_H
|
||||||
|
#define __TAP_WIN_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* =============
|
||||||
|
* TAP IOCTLs
|
||||||
|
* =============
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define TAP_WIN_CONTROL_CODE(request,method) \
|
||||||
|
CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
|
||||||
|
|
||||||
|
/* Present in 8.1 */
|
||||||
|
|
||||||
|
#define TAP_WIN_IOCTL_GET_MAC TAP_WIN_CONTROL_CODE (1, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_GET_VERSION TAP_WIN_CONTROL_CODE (2, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_GET_MTU TAP_WIN_CONTROL_CODE (3, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_GET_INFO TAP_WIN_CONTROL_CODE (4, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT TAP_WIN_CONTROL_CODE (5, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_SET_MEDIA_STATUS TAP_WIN_CONTROL_CODE (6, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_CONFIG_DHCP_MASQ TAP_WIN_CONTROL_CODE (7, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_GET_LOG_LINE TAP_WIN_CONTROL_CODE (8, METHOD_BUFFERED)
|
||||||
|
#define TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT TAP_WIN_CONTROL_CODE (9, METHOD_BUFFERED)
|
||||||
|
|
||||||
|
/* Added in 8.2 */
|
||||||
|
|
||||||
|
/* obsoletes TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT */
|
||||||
|
#define TAP_WIN_IOCTL_CONFIG_TUN TAP_WIN_CONTROL_CODE (10, METHOD_BUFFERED)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* =================
|
||||||
|
* Registry keys
|
||||||
|
* =================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
|
||||||
|
|
||||||
|
#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ======================
|
||||||
|
* Filesystem prefixes
|
||||||
|
* ======================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define USERMODEDEVICEDIR "\\\\.\\Global\\"
|
||||||
|
#define SYSDEVICEDIR "\\Device\\"
|
||||||
|
#define USERDEVICEDIR "\\DosDevices\\Global\\"
|
||||||
|
#define TAP_WIN_SUFFIX ".tap"
|
||||||
|
|
||||||
|
#endif // __TAP_WIN_H
|
||||||
|
|
||||||
|
|
@ -227,6 +227,10 @@ typedef struct __packed
|
|||||||
|
|
||||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(NO_SOCKETS)
|
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(NO_SOCKETS)
|
||||||
#define _NTSERVICE
|
#define _NTSERVICE
|
||||||
|
#else
|
||||||
|
#ifndef NO_TAP
|
||||||
|
#define NO_TAP
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__CYGWIN__) || defined(_WIN32) || defined(NO_SOCKETS)) && !defined(NO_SIGHUP)
|
#if (defined(__CYGWIN__) || defined(_WIN32) || defined(NO_SOCKETS)) && !defined(NO_SIGHUP)
|
||||||
|
@ -854,7 +854,7 @@ int SendActivationRequest(const RpcCtx sock, RESPONSE *baseResponse, REQUEST *ba
|
|||||||
else
|
else
|
||||||
request = CreateRequestV6(&requestSize, baseRequest);
|
request = CreateRequestV6(&requestSize, baseRequest);
|
||||||
|
|
||||||
if (!(status = rpcSendRequest(sock, request, requestSize, &response, &responseSize)))
|
if (!((status = rpcSendRequest(sock, request, requestSize, &response, &responseSize))))
|
||||||
{
|
{
|
||||||
if (LE16(((RESPONSE*)(response))->MajorVer) == 4)
|
if (LE16(((RESPONSE*)(response))->MajorVer) == 4)
|
||||||
{
|
{
|
||||||
|
509
src/vlmcsd.c
509
src/vlmcsd.c
@ -80,7 +80,11 @@
|
|||||||
#include "ntservice.h"
|
#include "ntservice.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
|
||||||
static const char* const optstring = "N:B:m:t:w:0:3:6:H:A:R:u:g:L:p:i:P:l:r:U:W:C:c:F:o:T:K:E:M:j:SseDdVvqkZ";
|
#ifndef NO_TAP
|
||||||
|
#include "wintap.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const char* const optstring = "a:N:B:m:t:A:R:u:g:L:p:i:H:P:l:r:U:W:C:c:F:O:o:x:T:K:E:M:j:SseDdVvqkZ";
|
||||||
|
|
||||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||||
static uint_fast8_t maxsockets = 0;
|
static uint_fast8_t maxsockets = 0;
|
||||||
@ -105,16 +109,22 @@ static const char *fn_ini = INI_FILE;
|
|||||||
static const char *fn_ini = NULL;
|
static const char *fn_ini = NULL;
|
||||||
#endif // !INI_FILE
|
#endif // !INI_FILE
|
||||||
|
|
||||||
|
#ifndef NO_TAP
|
||||||
|
char* tapArgument = NULL;
|
||||||
|
#endif // NO_TAP
|
||||||
|
|
||||||
static const char* IniFileErrorMessage = "";
|
static const char* IniFileErrorMessage = "";
|
||||||
char* IniFileErrorBuffer = NULL;
|
char* IniFileErrorBuffer = NULL;
|
||||||
#define INIFILE_ERROR_BUFFERSIZE 256
|
#define INIFILE_ERROR_BUFFERSIZE 256
|
||||||
|
|
||||||
static IniFileParameter_t IniFileParameterList[] =
|
static IniFileParameter_t IniFileParameterList[] =
|
||||||
{
|
{
|
||||||
{ "Windows", INI_PARAM_WINDOWS },
|
# ifndef NO_SOCKETS
|
||||||
{ "Office2010", INI_PARAM_OFFICE2010 },
|
{ "ExitLevel", INI_PARAM_EXIT_LEVEL },
|
||||||
{ "Office2013", INI_PARAM_OFFICE2013 },
|
# endif // NO_SOCKETS
|
||||||
{ "Office2016", INI_PARAM_OFFICE2016 },
|
# ifndef NO_TAP
|
||||||
|
{ "VPN", INI_PARAM_VPN },
|
||||||
|
# endif // NO_TAP
|
||||||
# ifndef NO_EXTERNAL_DATA
|
# ifndef NO_EXTERNAL_DATA
|
||||||
{ "KmsData", INI_PARAM_DATA_FILE },
|
{ "KmsData", INI_PARAM_DATA_FILE },
|
||||||
# endif // NO_EXTERNAL_DATA
|
# endif // NO_EXTERNAL_DATA
|
||||||
@ -129,6 +139,7 @@ static IniFileParameter_t IniFileParameterList[] =
|
|||||||
# ifndef NO_RANDOM_EPID
|
# ifndef NO_RANDOM_EPID
|
||||||
{ "RandomizationLevel", INI_PARAM_RANDOMIZATION_LEVEL },
|
{ "RandomizationLevel", INI_PARAM_RANDOMIZATION_LEVEL },
|
||||||
{ "LCID", INI_PARAM_LCID },
|
{ "LCID", INI_PARAM_LCID },
|
||||||
|
{ "HostBuild", INI_PARAM_HOST_BUILD },
|
||||||
# endif // NO_RANDOM_EPID
|
# endif // NO_RANDOM_EPID
|
||||||
# if !defined(NO_SOCKETS) && (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS) || defined(HAVE_GETIFADDR))
|
# if !defined(NO_SOCKETS) && (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS) || defined(HAVE_GETIFADDR))
|
||||||
{ "Port", INI_PARAM_PORT },
|
{ "Port", INI_PARAM_PORT },
|
||||||
@ -255,20 +266,17 @@ static __noreturn void usage()
|
|||||||
"\nUsage:\n"
|
"\nUsage:\n"
|
||||||
" %s [ options ]\n\n"
|
" %s [ options ]\n\n"
|
||||||
"Where:\n"
|
"Where:\n"
|
||||||
# ifndef NO_CL_PIDS
|
|
||||||
" -w <ePID>\t\talways use <ePID> for Windows\n"
|
|
||||||
" -0 <ePID>\t\talways use <ePID> for Office2010\n"
|
|
||||||
" -3 <ePID>\t\talways use <ePID> for Office2013\n"
|
|
||||||
" -6 <ePID>\t\talways use <ePID> for Office2016\n"
|
|
||||||
" -H <HwId>\t\talways use hardware Id <HwId>\n"
|
|
||||||
# endif // NO_CL_PIDS
|
|
||||||
# if !defined(_WIN32) && !defined(NO_USER_SWITCH)
|
# if !defined(_WIN32) && !defined(NO_USER_SWITCH)
|
||||||
" -u <user>\t\tset uid to <user>\n"
|
" -u <user>\t\tset uid to <user>\n"
|
||||||
" -g <group>\t\tset gid to <group>\n"
|
" -g <group>\t\tset gid to <group>\n"
|
||||||
# endif // !defined(_WIN32) && !defined(NO_USER_SWITCH)
|
# endif // !defined(_WIN32) && !defined(NO_USER_SWITCH)
|
||||||
|
# ifndef NO_CL_PIDS
|
||||||
|
" -a <csvlk>=<epid>\tuse <epid> for <csvlk>\n"
|
||||||
|
# endif // NO_CL_PIDS
|
||||||
# ifndef NO_RANDOM_EPID
|
# ifndef NO_RANDOM_EPID
|
||||||
" -r 0|1|2\t\tset ePID randomization level (default 1)\n"
|
" -r 0|1|2\t\tset ePID randomization level (default 1)\n"
|
||||||
" -C <LCID>\t\tuse fixed <LCID> in random ePIDs\n"
|
" -C <LCID>\t\tuse fixed <LCID> in random ePIDs\n"
|
||||||
|
" -H <build>\t\tuse fixed <build> number in random ePIDs\n"
|
||||||
# endif // NO_RANDOM_EPID
|
# endif // NO_RANDOM_EPID
|
||||||
# if !defined(NO_PRIVATE_IP_DETECT)
|
# if !defined(NO_PRIVATE_IP_DETECT)
|
||||||
# if HAVE_GETIFADDR
|
# if HAVE_GETIFADDR
|
||||||
@ -281,7 +289,11 @@ static __noreturn void usage()
|
|||||||
# endif // USE_MSRPC
|
# endif // USE_MSRPC
|
||||||
# endif // !HAVE_GETIFADDR
|
# endif // !HAVE_GETIFADDR
|
||||||
# endif // !defined(NO_PRIVATE_IP_DETECT)
|
# endif // !defined(NO_PRIVATE_IP_DETECT)
|
||||||
|
# ifndef NO_TAP
|
||||||
|
" -O <v>[=<a>][/<c>]\tuse VPN adapter <v> with IPv4 address <a> and CIDR <c>\n"
|
||||||
|
# endif
|
||||||
# ifndef NO_SOCKETS
|
# ifndef NO_SOCKETS
|
||||||
|
" -x <level>\t\texit if warning <level> reached (default 0)\n"
|
||||||
# if !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
# if !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||||
" -L <address>[:<port>]\tlisten on IP address <address> with optional <port>\n"
|
" -L <address>[:<port>]\tlisten on IP address <address> with optional <port>\n"
|
||||||
" -P <port>\t\tset TCP port <port> for subsequent -L statements (default 1688)\n"
|
" -P <port>\t\tset TCP port <port> for subsequent -L statements (default 1688)\n"
|
||||||
@ -314,7 +326,7 @@ static __noreturn void usage()
|
|||||||
# endif // _WIN32
|
# endif // _WIN32
|
||||||
# endif // NO_SOCKETS
|
# endif // NO_SOCKETS
|
||||||
# ifndef NO_STRICT_MODES
|
# ifndef NO_STRICT_MODES
|
||||||
" -K 0|1|2|3\t\tset whitelisting level for KMS IDs (default -K0)\n"
|
" -K 0|1|2|3\t\tset white-listing level for KMS IDs (default -K0)\n"
|
||||||
" -c0, -c1\t\tdisable/enable client time checking (default -c0)\n"
|
" -c0, -c1\t\tdisable/enable client time checking (default -c0)\n"
|
||||||
# ifndef NO_CLIENT_LIST
|
# ifndef NO_CLIENT_LIST
|
||||||
" -M0, -M1\t\tdisable/enable maintaining clients (default -M0)\n"
|
" -M0, -M1\t\tdisable/enable maintaining clients (default -M0)\n"
|
||||||
@ -368,46 +380,12 @@ static __noreturn void usage()
|
|||||||
|
|
||||||
|
|
||||||
#ifndef NO_CUSTOM_INTERVALS
|
#ifndef NO_CUSTOM_INTERVALS
|
||||||
|
|
||||||
// Convert time span strings (e.g. "2h", "5w") to minutes
|
|
||||||
__pure static DWORD timeSpanString2Minutes(const char *const restrict argument)
|
|
||||||
{
|
|
||||||
char *unitId;
|
|
||||||
|
|
||||||
long long val = vlmcsd_strtoll(argument, &unitId, 10);
|
|
||||||
|
|
||||||
switch (toupper((int)*unitId))
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
case 'M':
|
|
||||||
break;
|
|
||||||
case 'H':
|
|
||||||
val *= 60;
|
|
||||||
break;
|
|
||||||
case 'D':
|
|
||||||
val *= 60 * 24;
|
|
||||||
break;
|
|
||||||
case 'W':
|
|
||||||
val *= 60 * 24 * 7;
|
|
||||||
break;
|
|
||||||
case 'S':
|
|
||||||
val /= 60;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val < 1) val = 1;
|
|
||||||
if (val > UINT_MAX) val = UINT_MAX;
|
|
||||||
|
|
||||||
return (DWORD)val;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_INI_FILE
|
#ifndef NO_INI_FILE
|
||||||
|
|
||||||
__pure static BOOL getTimeSpanFromIniFile(DWORD* result, const char *const restrict argument)
|
__pure static BOOL getTimeSpanFromIniFile(DWORD* result, const char *const restrict argument)
|
||||||
{
|
{
|
||||||
DWORD val = timeSpanString2Minutes(argument);
|
const DWORD val = timeSpanString2Minutes(argument);
|
||||||
|
|
||||||
if (!val)
|
if (!val)
|
||||||
{
|
{
|
||||||
IniFileErrorMessage = "Incorrect time span.";
|
IniFileErrorMessage = "Incorrect time span.";
|
||||||
@ -417,12 +395,13 @@ __pure static BOOL getTimeSpanFromIniFile(DWORD* result, const char *const restr
|
|||||||
*result = val;
|
*result = val;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NO_INI_FILE
|
#endif // NO_INI_FILE
|
||||||
|
|
||||||
|
|
||||||
__pure static DWORD getTimeSpanFromCommandLine(const char *const restrict optarg, const char optchar)
|
__pure static DWORD getTimeSpanFromCommandLine(const char *const restrict arg, const char optchar)
|
||||||
{
|
{
|
||||||
long long val = timeSpanString2Minutes(optarg);
|
const DWORD val = timeSpanString2Minutes(arg);
|
||||||
|
|
||||||
if (!val)
|
if (!val)
|
||||||
{
|
{
|
||||||
@ -430,12 +409,77 @@ __pure static DWORD getTimeSpanFromCommandLine(const char *const restrict optarg
|
|||||||
exit(VLMCSD_EINVAL);
|
exit(VLMCSD_EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (DWORD)val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NO_CUSTOM_INTERVALS
|
#endif // NO_CUSTOM_INTERVALS
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(NO_INI_FILE) || !defined (NO_CL_PIDS)
|
||||||
|
static __pure int isControlCharOrSlash(const char c)
|
||||||
|
{
|
||||||
|
if ((unsigned char)c < '!') return TRUE;
|
||||||
|
if (c == '/') return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void iniFileLineNextWord(const char **s)
|
||||||
|
{
|
||||||
|
while (**s && isspace((int)**s)) (*s)++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static BOOL setHwIdFromIniFileLine(const char **s, const uint32_t index, const uint8_t overwrite)
|
||||||
|
{
|
||||||
|
iniFileLineNextWord(s);
|
||||||
|
|
||||||
|
if (**s == '/')
|
||||||
|
{
|
||||||
|
if (!overwrite && KmsResponseParameters[index].HwId) return TRUE;
|
||||||
|
|
||||||
|
BYTE* HwId = (BYTE*)vlmcsd_malloc(sizeof(((RESPONSE_V6 *)0)->HwId));
|
||||||
|
hex2bin(HwId, *s + 1, sizeof(((RESPONSE_V6 *)0)->HwId));
|
||||||
|
KmsResponseParameters[index].HwId = HwId;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static BOOL setEpidFromIniFileLine(const char **s, const uint32_t index, const char *ePidSource, const uint8_t overwrite)
|
||||||
|
{
|
||||||
|
iniFileLineNextWord(s);
|
||||||
|
const char *savedPosition = *s;
|
||||||
|
uint_fast16_t i;
|
||||||
|
|
||||||
|
for (i = 0; !isControlCharOrSlash(**s); i++)
|
||||||
|
{
|
||||||
|
if (utf8_to_ucs2_char((const unsigned char*)*s, (const unsigned char**)s) == (WCHAR)~0)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < 1 || i >= PID_BUFFER_SIZE) return FALSE;
|
||||||
|
if (!overwrite && KmsResponseParameters[index].Epid) return TRUE;
|
||||||
|
|
||||||
|
const size_t size = *s - savedPosition + 1;
|
||||||
|
|
||||||
|
char* epidbuffer = (char*)vlmcsd_malloc(size);
|
||||||
|
memcpy(epidbuffer, savedPosition, size - 1);
|
||||||
|
epidbuffer[size - 1] = 0;
|
||||||
|
|
||||||
|
KmsResponseParameters[index].Epid = epidbuffer;
|
||||||
|
|
||||||
|
#ifndef NO_LOG
|
||||||
|
KmsResponseParameters[index].EpidSource = ePidSource;
|
||||||
|
#endif //NO_LOG
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif // !defined(NO_INI_FILE) || !defined (NO_CL_PIDS)
|
||||||
|
|
||||||
#ifndef NO_INI_FILE
|
#ifndef NO_INI_FILE
|
||||||
static void ignoreIniFileParameter(uint_fast8_t iniFileParameterId)
|
static void ignoreIniFileParameter(uint_fast8_t iniFileParameterId)
|
||||||
{
|
{
|
||||||
@ -477,97 +521,19 @@ static BOOL getIniFileArgumentInt(unsigned int *result, const char *const argume
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static __pure int isControlCharOrSlash(const char c)
|
|
||||||
{
|
|
||||||
if ((unsigned char)c < '!') return TRUE;
|
|
||||||
if (c == '/') return TRUE;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void iniFileLineNextWord(const char **s)
|
|
||||||
{
|
|
||||||
while (**s && isspace((int)**s)) (*s)++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL setHwIdFromIniFileLine(const char **s, const uint32_t index)
|
|
||||||
{
|
|
||||||
iniFileLineNextWord(s);
|
|
||||||
|
|
||||||
if (**s == '/')
|
|
||||||
{
|
|
||||||
if (KmsResponseParameters[index].HwId) return TRUE;
|
|
||||||
|
|
||||||
BYTE* HwId = (BYTE*)vlmcsd_malloc(sizeof(((RESPONSE_V6 *)0)->HwId));
|
|
||||||
hex2bin(HwId, *s + 1, sizeof(((RESPONSE_V6 *)0)->HwId));
|
|
||||||
KmsResponseParameters[index].HwId = HwId;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL setEpidFromIniFileLine(const char **s, const uint32_t index)
|
|
||||||
{
|
|
||||||
iniFileLineNextWord(s);
|
|
||||||
const char *savedPosition = *s;
|
|
||||||
uint_fast16_t i;
|
|
||||||
|
|
||||||
for (i = 0; !isControlCharOrSlash(**s); i++)
|
|
||||||
{
|
|
||||||
if (utf8_to_ucs2_char((const unsigned char*)*s, (const unsigned char**)s) == (WCHAR)~0)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < 1 || i >= PID_BUFFER_SIZE) return FALSE;
|
|
||||||
if (KmsResponseParameters[index].Epid) return TRUE;
|
|
||||||
|
|
||||||
size_t size = *s - savedPosition + 1;
|
|
||||||
|
|
||||||
char* epidbuffer = (char*)vlmcsd_malloc(size);
|
|
||||||
memcpy(epidbuffer, savedPosition, size - 1);
|
|
||||||
epidbuffer[size - 1] = 0;
|
|
||||||
|
|
||||||
KmsResponseParameters[index].Epid = epidbuffer;
|
|
||||||
|
|
||||||
#ifndef NO_LOG
|
|
||||||
KmsResponseParameters[index].EpidSource = fn_ini;
|
|
||||||
#endif //NO_LOG
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
||||||
{
|
{
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
BOOL success = TRUE;
|
BOOL success = TRUE;
|
||||||
const char *s = (const char*)iniarg;
|
|
||||||
|
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case INI_PARAM_WINDOWS:
|
# ifndef NO_TAP
|
||||||
setEpidFromIniFileLine(&s, EPID_INDEX_WINDOWS);
|
|
||||||
setHwIdFromIniFileLine(&s, EPID_INDEX_WINDOWS);
|
case INI_PARAM_VPN:
|
||||||
|
tapArgument = (char*)vlmcsd_strdup(iniarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INI_PARAM_OFFICE2010:
|
# endif // NO_TAP
|
||||||
setEpidFromIniFileLine(&s, EPID_INDEX_OFFICE2010);
|
|
||||||
setHwIdFromIniFileLine(&s, EPID_INDEX_OFFICE2010);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case INI_PARAM_OFFICE2013:
|
|
||||||
setEpidFromIniFileLine(&s, EPID_INDEX_OFFICE2013);
|
|
||||||
setHwIdFromIniFileLine(&s, EPID_INDEX_OFFICE2013);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case INI_PARAM_OFFICE2016:
|
|
||||||
setEpidFromIniFileLine(&s, EPID_INDEX_OFFICE2016);
|
|
||||||
setHwIdFromIniFileLine(&s, EPID_INDEX_OFFICE2016);
|
|
||||||
break;
|
|
||||||
|
|
||||||
# if !defined(NO_USER_SWITCH) && !_WIN32
|
# if !defined(NO_USER_SWITCH) && !_WIN32
|
||||||
|
|
||||||
@ -611,6 +577,11 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
|||||||
if (success) RandomizationLevel = (int_fast8_t)result;
|
if (success) RandomizationLevel = (int_fast8_t)result;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case INI_PARAM_HOST_BUILD:
|
||||||
|
success = getIniFileArgumentInt(&result, iniarg, 0, 65535);
|
||||||
|
if (success) HostBuild = (uint16_t)result;
|
||||||
|
break;
|
||||||
|
|
||||||
# endif // NO_RANDOM_EPID
|
# endif // NO_RANDOM_EPID
|
||||||
|
|
||||||
# if (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS) || defined(HAVE_GETIFADDR)) && !defined(NO_SOCKETS)
|
# if (defined(USE_MSRPC) || defined(SIMPLE_SOCKETS) || defined(HAVE_GETIFADDR)) && !defined(NO_SOCKETS)
|
||||||
@ -729,6 +700,7 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
|||||||
|
|
||||||
case INI_PARAM_RPC_NDR64:
|
case INI_PARAM_RPC_NDR64:
|
||||||
success = getIniFileArgumentBool(&UseServerRpcNDR64, iniarg);
|
success = getIniFileArgumentBool(&UseServerRpcNDR64, iniarg);
|
||||||
|
if (success) IsNDR64Defined = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INI_PARAM_RPC_BTFN:
|
case INI_PARAM_RPC_BTFN:
|
||||||
@ -737,6 +709,15 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
|||||||
|
|
||||||
# endif // USE_MSRPC
|
# endif // USE_MSRPC
|
||||||
|
|
||||||
|
# ifndef NO_SOCKETS
|
||||||
|
|
||||||
|
case INI_PARAM_EXIT_LEVEL:
|
||||||
|
success = getIniFileArgumentInt(&result, iniarg, 0, 1);
|
||||||
|
if (success) ExitLevel = (int_fast8_t)result;
|
||||||
|
break;
|
||||||
|
|
||||||
|
# endif // NO_SOCKETS
|
||||||
|
|
||||||
# if HAVE_FREEBIND
|
# if HAVE_FREEBIND
|
||||||
|
|
||||||
case INI_PARAM_FREEBIND:
|
case INI_PARAM_FREEBIND:
|
||||||
@ -792,6 +773,56 @@ static BOOL getIniFileArgument(const char **s)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char* GetNextString(char* s)
|
||||||
|
{
|
||||||
|
return s + strlen(s) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int8_t GetCsvlkIndexFromName(const char *s)
|
||||||
|
{
|
||||||
|
int8_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < KmsData->CsvlkCount; i++)
|
||||||
|
{
|
||||||
|
const char *csvlkName = GetNextString(KmsData->CsvlkData[i].EPid);
|
||||||
|
|
||||||
|
if (!strncasecmp(csvlkName, s, strlen(csvlkName)))
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL handleIniFileEpidParameter(const char *s, uint8_t allowIniFileDirectives, const char *ePidSource)
|
||||||
|
{
|
||||||
|
int_fast16_t i;
|
||||||
|
|
||||||
|
if (allowIniFileDirectives)
|
||||||
|
{
|
||||||
|
for (i = 0; i < (int_fast16_t)vlmcsd_countof(IniFileParameterList); i++)
|
||||||
|
{
|
||||||
|
if (!strncasecmp(IniFileParameterList[i].Name, s, strlen(IniFileParameterList[i].Name)))
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i = GetCsvlkIndexFromName(s);
|
||||||
|
|
||||||
|
if (i >= 0)
|
||||||
|
{
|
||||||
|
if (!getIniFileArgument(&s)) return FALSE;
|
||||||
|
if (!setEpidFromIniFileLine(&s, i, ePidSource, !allowIniFileDirectives)) return FALSE;
|
||||||
|
if (!setHwIdFromIniFileLine(&s, i, !allowIniFileDirectives)) return FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
IniFileErrorMessage = "Unknown keyword.";
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL handleIniFileParameter(const char *s)
|
static BOOL handleIniFileParameter(const char *s)
|
||||||
{
|
{
|
||||||
@ -801,14 +832,13 @@ static BOOL handleIniFileParameter(const char *s)
|
|||||||
{
|
{
|
||||||
if (strncasecmp(IniFileParameterList[i].Name, s, strlen(IniFileParameterList[i].Name))) continue;
|
if (strncasecmp(IniFileParameterList[i].Name, s, strlen(IniFileParameterList[i].Name))) continue;
|
||||||
if (!IniFileParameterList[i].Id) return TRUE;
|
if (!IniFileParameterList[i].Id) return TRUE;
|
||||||
|
|
||||||
if (!getIniFileArgument(&s)) return FALSE;
|
if (!getIniFileArgument(&s)) return FALSE;
|
||||||
|
|
||||||
return setIniFileParameter(IniFileParameterList[i].Id, s);
|
return setIniFileParameter(IniFileParameterList[i].Id, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
IniFileErrorMessage = "Unknown keyword.";
|
IniFileErrorMessage = NULL;
|
||||||
return FALSE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -836,6 +866,11 @@ static BOOL readIniFile(const uint_fast8_t pass)
|
|||||||
FILE *restrict f;
|
FILE *restrict f;
|
||||||
BOOL result = TRUE;
|
BOOL result = TRUE;
|
||||||
|
|
||||||
|
if (pass == INI_FILE_PASS_2 && KmsData->MinorVer < 6)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
IniFileErrorBuffer = (char*)vlmcsd_malloc(INIFILE_ERROR_BUFFERSIZE);
|
IniFileErrorBuffer = (char*)vlmcsd_malloc(INIFILE_ERROR_BUFFERSIZE);
|
||||||
|
|
||||||
if (!((f = fopen(fn_ini, "r")))) return FALSE;
|
if (!((f = fopen(fn_ini, "r")))) return FALSE;
|
||||||
@ -847,18 +882,18 @@ static BOOL readIniFile(const uint_fast8_t pass)
|
|||||||
iniFileLineNextWord(&s);
|
iniFileLineNextWord(&s);
|
||||||
if (*s == ';' || *s == '#' || !*s) continue;
|
if (*s == ';' || *s == '#' || !*s) continue;
|
||||||
|
|
||||||
# ifndef NO_SOCKETS
|
|
||||||
if (pass == INI_FILE_PASS_1)
|
if (pass == INI_FILE_PASS_1)
|
||||||
# endif // NO_SOCKETS
|
|
||||||
{
|
{
|
||||||
if (handleIniFileParameter(s)) continue;
|
if (handleIniFileParameter(s)) continue;
|
||||||
|
lineParseError = TRUE;
|
||||||
lineParseError = TRUE;/*!checkGuidInIniFileLine(&s, &appIndex) ||
|
}
|
||||||
!setEpidFromIniFileLine(&s, appIndex) ||
|
else if (pass == INI_FILE_PASS_2)
|
||||||
!setHwIdFromIniFileLine(&s, appIndex);*/
|
{
|
||||||
|
if (handleIniFileEpidParameter(s, TRUE, fn_ini)) continue;
|
||||||
|
lineParseError = TRUE;
|
||||||
}
|
}
|
||||||
# if !defined(NO_SOCKETS) && !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
# if !defined(NO_SOCKETS) && !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
||||||
else if (pass == INI_FILE_PASS_2)
|
else if (pass == INI_FILE_PASS_3)
|
||||||
{
|
{
|
||||||
lineParseError = !setupListeningSocketsFromIniFile(s);
|
lineParseError = !setupListeningSocketsFromIniFile(s);
|
||||||
}
|
}
|
||||||
@ -1012,7 +1047,7 @@ static int daemonizeAndSetSignalAction()
|
|||||||
|
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
|
|
||||||
static BOOL terminationHandler(const DWORD fdwCtrlType)
|
static BOOL __stdcall terminationHandler(const DWORD fdwCtrlType)
|
||||||
{
|
{
|
||||||
// What a lame substitute for Unix signal handling
|
// What a lame substitute for Unix signal handling
|
||||||
switch (fdwCtrlType)
|
switch (fdwCtrlType)
|
||||||
@ -1035,7 +1070,7 @@ static DWORD daemonizeAndSetSignalAction()
|
|||||||
if (!SetConsoleCtrlHandler((PHANDLER_ROUTINE)terminationHandler, TRUE))
|
if (!SetConsoleCtrlHandler((PHANDLER_ROUTINE)terminationHandler, TRUE))
|
||||||
{
|
{
|
||||||
#ifndef NO_LOG
|
#ifndef NO_LOG
|
||||||
DWORD rc = GetLastError();
|
const DWORD rc = GetLastError();
|
||||||
logger("Warning: Could not register Windows signal handler: Error %u\n", rc);
|
logger("Warning: Could not register Windows signal handler: Error %u\n", rc);
|
||||||
#endif // NO_LOG
|
#endif // NO_LOG
|
||||||
}
|
}
|
||||||
@ -1049,14 +1084,14 @@ static DWORD daemonizeAndSetSignalAction()
|
|||||||
// Workaround for Cygwin fork problem (only affects cygwin processes that are Windows services)
|
// Workaround for Cygwin fork problem (only affects cygwin processes that are Windows services)
|
||||||
// Best is to compile for Cygwin with threads. fork() is slow and unreliable on Cygwin
|
// Best is to compile for Cygwin with threads. fork() is slow and unreliable on Cygwin
|
||||||
#if !defined(NO_INI_FILE) || !defined(NO_LOG) || !defined(NO_CL_PIDS) || !defined(NO_EXTERNAL_DATA)
|
#if !defined(NO_INI_FILE) || !defined(NO_LOG) || !defined(NO_CL_PIDS) || !defined(NO_EXTERNAL_DATA)
|
||||||
__pure static char* getCommandLineArg(char *const restrict optarg)
|
__pure static char* getCommandLineArg(char *const restrict arg)
|
||||||
{
|
{
|
||||||
# if !__CYGWIN__ || defined(USE_THREADS) || defined(NO_SOCKETS)
|
# if !__CYGWIN__ || defined(USE_THREADS) || defined(NO_SOCKETS)
|
||||||
return optarg;
|
return arg;
|
||||||
# else
|
# else
|
||||||
if (!IsNTService) return optarg;
|
if (!IsNTService) return arg;
|
||||||
|
|
||||||
return vlmcsd_strdup(optarg);
|
return vlmcsd_strdup(arg);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif // !defined(NO_INI_FILE) || !defined(NO_LOG) || !defined(NO_CL_PIDS) || !defined(NO_EXTERNAL_DATA)
|
#endif // !defined(NO_INI_FILE) || !defined(NO_LOG) || !defined(NO_CL_PIDS) || !defined(NO_EXTERNAL_DATA)
|
||||||
@ -1065,10 +1100,6 @@ __pure static char* getCommandLineArg(char *const restrict optarg)
|
|||||||
static void parseGeneralArguments() {
|
static void parseGeneralArguments() {
|
||||||
int o;
|
int o;
|
||||||
|
|
||||||
#ifndef NO_CL_PIDS
|
|
||||||
BYTE* HwId;
|
|
||||||
#endif // NO_CL_PIDS
|
|
||||||
|
|
||||||
for (opterr = 0; (o = getopt(global_argc, (char* const*)global_argv, (const char*)optstring)) > 0; ) switch (o)
|
for (opterr = 0; (o = getopt(global_argc, (char* const*)global_argv, (const char*)optstring)) > 0; ) switch (o)
|
||||||
{
|
{
|
||||||
# if !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
|
# if !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
|
||||||
@ -1078,44 +1109,18 @@ static void parseGeneralArguments() {
|
|||||||
break;
|
break;
|
||||||
# endif // !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
|
# endif // !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
|
||||||
|
|
||||||
|
# ifndef NO_TAP
|
||||||
|
|
||||||
|
case 'O':
|
||||||
|
ignoreIniFileParameter(INI_PARAM_VPN);
|
||||||
|
tapArgument = getCommandLineArg(optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
# endif // NO_TAP
|
||||||
|
|
||||||
# ifndef NO_CL_PIDS
|
# ifndef NO_CL_PIDS
|
||||||
|
|
||||||
case 'w':
|
case 'a':
|
||||||
KmsResponseParameters[EPID_INDEX_WINDOWS].Epid = getCommandLineArg(optarg);
|
|
||||||
# ifndef NO_LOG
|
|
||||||
KmsResponseParameters[EPID_INDEX_WINDOWS].EpidSource = "command line";
|
|
||||||
# endif // NO_LOG
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '0':
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2010].Epid = getCommandLineArg(optarg);
|
|
||||||
# ifndef NO_LOG
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2010].EpidSource = "command line";
|
|
||||||
# endif // NO_LOG
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '3':
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2013].Epid = getCommandLineArg(optarg);
|
|
||||||
# ifndef NO_LOG
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2013].EpidSource = "command line";
|
|
||||||
# endif // NO_LOG
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '6':
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2016].Epid = getCommandLineArg(optarg);
|
|
||||||
# ifndef NO_LOG
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2016].EpidSource = "command line";
|
|
||||||
# endif // NO_LOG
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'H':
|
|
||||||
HwId = (BYTE*)vlmcsd_malloc(sizeof(((RESPONSE_V6 *)0)->HwId));
|
|
||||||
hex2bin(HwId, optarg, sizeof(((RESPONSE_V6 *)0)->HwId));
|
|
||||||
|
|
||||||
KmsResponseParameters[EPID_INDEX_WINDOWS].HwId =
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2010].HwId =
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2013].HwId =
|
|
||||||
KmsResponseParameters[EPID_INDEX_OFFICE2016].HwId = HwId;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
# endif // NO_CL_PIDS
|
# endif // NO_CL_PIDS
|
||||||
@ -1134,6 +1139,11 @@ static void parseGeneralArguments() {
|
|||||||
|
|
||||||
# ifndef NO_SOCKETS
|
# ifndef NO_SOCKETS
|
||||||
|
|
||||||
|
case 'x':
|
||||||
|
ignoreIniFileParameter(INI_PARAM_EXIT_LEVEL);
|
||||||
|
ExitLevel = (int_fast8_t)getOptionArgumentInt((char)o, 0, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
ignoreIniFileParameter(INI_PARAM_PORT);
|
ignoreIniFileParameter(INI_PARAM_PORT);
|
||||||
# if !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
# if !defined(SIMPLE_SOCKETS) && !defined(USE_MSRPC)
|
||||||
@ -1311,6 +1321,19 @@ static void parseGeneralArguments() {
|
|||||||
# endif // _PEDANTIC
|
# endif // _PEDANTIC
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'H':
|
||||||
|
HostBuild = (uint16_t)getOptionArgumentInt((char)o, 0, 0xffff);
|
||||||
|
ignoreIniFileParameter(INI_PARAM_HOST_BUILD);
|
||||||
|
|
||||||
|
# ifdef _PEDANTIC
|
||||||
|
if (!IsValidHostBuild(HostBuild))
|
||||||
|
{
|
||||||
|
printerrorf("Warning: %u is not a known released Windows Server build >= 2008.\n");
|
||||||
|
}
|
||||||
|
# endif // _PEDANTIC
|
||||||
|
|
||||||
|
break;
|
||||||
# endif // NO_RANDOM_PID
|
# endif // NO_RANDOM_PID
|
||||||
|
|
||||||
# if !defined(NO_USER_SWITCH) && !defined(_WIN32)
|
# if !defined(NO_USER_SWITCH) && !defined(_WIN32)
|
||||||
@ -1363,6 +1386,7 @@ static void parseGeneralArguments() {
|
|||||||
# ifndef SIMPLE_RPC
|
# ifndef SIMPLE_RPC
|
||||||
case 'N':
|
case 'N':
|
||||||
if (!getArgumentBool(&UseServerRpcNDR64, optarg)) usage();
|
if (!getArgumentBool(&UseServerRpcNDR64, optarg)) usage();
|
||||||
|
IsNDR64Defined = TRUE;
|
||||||
ignoreIniFileParameter(INI_PARAM_RPC_NDR64);
|
ignoreIniFileParameter(INI_PARAM_RPC_NDR64);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1413,16 +1437,16 @@ static void writePidFile()
|
|||||||
|
|
||||||
if (fn_pid && !InetdMode)
|
if (fn_pid && !InetdMode)
|
||||||
{
|
{
|
||||||
FILE *_f = fopen(fn_pid, "w");
|
FILE *file = fopen(fn_pid, "w");
|
||||||
|
|
||||||
if (_f)
|
if (file)
|
||||||
{
|
{
|
||||||
# if _MSC_VER
|
# if _MSC_VER
|
||||||
fprintf(_f, "%u", (unsigned int)GetCurrentProcessId());
|
fprintf(file, "%u", (unsigned int)GetCurrentProcessId());
|
||||||
# else
|
# else
|
||||||
fprintf(_f, "%u", (unsigned int)getpid());
|
fprintf(file, "%u", (unsigned int)getpid());
|
||||||
# endif
|
# endif
|
||||||
fclose(_f);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifndef NO_LOG
|
# ifndef NO_LOG
|
||||||
@ -1431,8 +1455,8 @@ static void writePidFile()
|
|||||||
logger("Warning: Cannot write pid file '%s'. %s.\n", fn_pid, strerror(errno));
|
logger("Warning: Cannot write pid file '%s'. %s.\n", fn_pid, strerror(errno));
|
||||||
}
|
}
|
||||||
# endif // NO_LOG
|
# endif // NO_LOG
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
#define writePidFile()
|
#define writePidFile()
|
||||||
#endif // !defined(NO_PID_FILE)
|
#endif // !defined(NO_PID_FILE)
|
||||||
@ -1539,8 +1563,8 @@ static void allocateSemaphore(void)
|
|||||||
{
|
{
|
||||||
printerrorf("Warning: Could not create semaphore: %s\n", vlmcsd_strerror(errno));
|
printerrorf("Warning: Could not create semaphore: %s\n", vlmcsd_strerror(errno));
|
||||||
MaxTasks = SEM_VALUE_MAX;
|
MaxTasks = SEM_VALUE_MAX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# endif // THREADS or CYGWIN
|
# endif // THREADS or CYGWIN
|
||||||
|
|
||||||
@ -1553,7 +1577,7 @@ static void allocateSemaphore(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# endif // _WIN32
|
# endif // _WIN32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // !defined(NO_LIMIT) && !defined(NO_SOCKETS) && !__minix__
|
#endif // !defined(NO_LIMIT) && !defined(NO_SOCKETS) && !__minix__
|
||||||
|
|
||||||
@ -1566,15 +1590,15 @@ int setupListeningSockets()
|
|||||||
char** privateIPList = NULL;
|
char** privateIPList = NULL;
|
||||||
int numPrivateIPs = 0;
|
int numPrivateIPs = 0;
|
||||||
if (PublicIPProtectionLevel & 1) getPrivateIPAddresses(&numPrivateIPs, &privateIPList);
|
if (PublicIPProtectionLevel & 1) getPrivateIPAddresses(&numPrivateIPs, &privateIPList);
|
||||||
uint_fast8_t allocsockets = maxsockets ? (maxsockets + numPrivateIPs) : ((PublicIPProtectionLevel & 1) ? numPrivateIPs : 2);
|
const uint_fast8_t allocsockets = (uint_fast8_t)(maxsockets ? (maxsockets + numPrivateIPs) : ((PublicIPProtectionLevel & 1) ? numPrivateIPs : 2));
|
||||||
# else // !HAVE_GETIFADDR
|
# else // !HAVE_GETIFADDR
|
||||||
uint_fast8_t allocsockets = maxsockets ? maxsockets : 2;
|
uint_fast8_t allocsockets = maxsockets ? maxsockets : 2;
|
||||||
# endif // !HAVE_GETIFADDR
|
# endif // !HAVE_GETIFADDR
|
||||||
|
|
||||||
SocketList = (SOCKET*)vlmcsd_malloc((size_t)allocsockets * sizeof(SOCKET));
|
SocketList = (SOCKET*)vlmcsd_malloc((size_t)allocsockets * sizeof(SOCKET));
|
||||||
|
|
||||||
int_fast8_t haveIPv4Stack = checkProtocolStack(AF_INET);
|
const int_fast8_t haveIPv4Stack = checkProtocolStack(AF_INET);
|
||||||
int_fast8_t haveIPv6Stack = checkProtocolStack(AF_INET6);
|
const int_fast8_t haveIPv6Stack = checkProtocolStack(AF_INET6);
|
||||||
|
|
||||||
// Reset getopt since we've alread used it
|
// Reset getopt since we've alread used it
|
||||||
optReset();
|
optReset();
|
||||||
@ -1597,7 +1621,7 @@ int setupListeningSockets()
|
|||||||
# ifndef NO_INI_FILE
|
# ifndef NO_INI_FILE
|
||||||
if (maxsockets && !numsockets)
|
if (maxsockets && !numsockets)
|
||||||
{
|
{
|
||||||
if (fn_ini && !readIniFile(INI_FILE_PASS_2))
|
if (fn_ini && !readIniFile(INI_FILE_PASS_3))
|
||||||
{
|
{
|
||||||
# ifdef INI_FILE
|
# ifdef INI_FILE
|
||||||
if (strcmp(fn_ini, INI_FILE))
|
if (strcmp(fn_ini, INI_FILE))
|
||||||
@ -1632,7 +1656,7 @@ int setupListeningSockets()
|
|||||||
if (haveIPv6Stack) addListeningSocket("::");
|
if (haveIPv6Stack) addListeningSocket("::");
|
||||||
if (haveIPv4Stack) addListeningSocket("0.0.0.0");
|
if (haveIPv4Stack) addListeningSocket("0.0.0.0");
|
||||||
# endif // !HAVE_GETIFADDR
|
# endif // !HAVE_GETIFADDR
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!numsockets)
|
if (!numsockets)
|
||||||
{
|
{
|
||||||
@ -1647,10 +1671,6 @@ int setupListeningSockets()
|
|||||||
|
|
||||||
int server_main(int argc, CARGV argv)
|
int server_main(int argc, CARGV argv)
|
||||||
{
|
{
|
||||||
# if !defined(NO_RANDOM_EPID) || !defined(NO_CL_PIDS) || !defined(NO_INI_FILE)
|
|
||||||
KmsResponseParameters = (KmsResponseParam_t*)vlmcsd_malloc(sizeof(KmsResponseParam_t) * MIN_CSVLK);
|
|
||||||
memset(KmsResponseParameters, 0, sizeof(KmsResponseParam_t) * MIN_CSVLK);
|
|
||||||
# endif // !defined(NO_RANDOM_EPID) || !defined(NO_CL_PIDS) || !defined(NO_INI_FILE)
|
|
||||||
global_argc = argc;
|
global_argc = argc;
|
||||||
global_argv = argv;
|
global_argv = argv;
|
||||||
|
|
||||||
@ -1731,7 +1751,7 @@ int newmain()
|
|||||||
# ifndef NO_LOG
|
# ifndef NO_LOG
|
||||||
logstdout = 0;
|
logstdout = 0;
|
||||||
# endif // !NO_LOG
|
# endif // !NO_LOG
|
||||||
}
|
}
|
||||||
|
|
||||||
# endif // !defined(_WIN32) && !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
# endif // !defined(_WIN32) && !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||||
|
|
||||||
@ -1749,6 +1769,67 @@ int newmain()
|
|||||||
|
|
||||||
loadKmsData();
|
loadKmsData();
|
||||||
|
|
||||||
|
# if !defined(USE_MSRPC) && !defined(SIMPLE_RPC)
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
!IsNDR64Defined
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UseServerRpcNDR64 = !!KmsData->Flags & KMS_OPTIONS_USENDR64;
|
||||||
|
# ifndef NO_RANDOM_EPID
|
||||||
|
if (HostBuild&&RandomizationLevel)
|
||||||
|
{
|
||||||
|
UseServerRpcNDR64 = HostBuild > 7601;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
# endif // !defined(USE_MSRPC) && !defined(SIMPLE_RPC)
|
||||||
|
|
||||||
|
# if !defined(NO_INI_FILE) || !defined(NO_CL_PIDS)
|
||||||
|
if (KmsData->MinorVer < 6)
|
||||||
|
{
|
||||||
|
printerrorf("Warning: Need database version 1.6 or greater to set custom ePids\n");
|
||||||
|
}
|
||||||
|
# endif // !defined(NO_INI_FILE) || !defined(NO_CL_PIDS)
|
||||||
|
|
||||||
|
# if !defined(NO_RANDOM_EPID) || !defined(NO_CL_PIDS) || !defined(NO_INI_FILE)
|
||||||
|
KmsResponseParameters = (KmsResponseParam_t*)vlmcsd_malloc(sizeof(KmsResponseParam_t) * KmsData->CsvlkCount);
|
||||||
|
memset(KmsResponseParameters, 0, sizeof(KmsResponseParam_t) * KmsData->CsvlkCount);
|
||||||
|
# endif // !defined(NO_RANDOM_EPID) || !defined(NO_CL_PIDS) || !defined(NO_INI_FILE)
|
||||||
|
|
||||||
|
#ifndef NO_CL_PIDS
|
||||||
|
optReset();
|
||||||
|
int o;
|
||||||
|
|
||||||
|
for (opterr = 0; (o = getopt(global_argc, (char* const*)global_argv, (const char*)optstring)) > 0; ) switch (o)
|
||||||
|
{
|
||||||
|
case 'a':
|
||||||
|
if (KmsData->MinorVer < 6 || !handleIniFileEpidParameter(optarg, FALSE, "command line"))
|
||||||
|
{
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // NO_CL_PIDS
|
||||||
|
|
||||||
|
# ifndef NO_INI_FILE
|
||||||
|
|
||||||
|
if (fn_ini && !readIniFile(INI_FILE_PASS_2))
|
||||||
|
{
|
||||||
|
# ifdef INI_FILE
|
||||||
|
if (strcmp(fn_ini, INI_FILE))
|
||||||
|
# endif // INI_FILE
|
||||||
|
printerrorf("Warning: Can't read %s: %s\n", fn_ini, strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
|
# endif // NO_INI_FILE
|
||||||
|
|
||||||
# ifndef NO_CLIENT_LIST
|
# ifndef NO_CLIENT_LIST
|
||||||
if (MaintainClients) InitializeClientLists();
|
if (MaintainClients) InitializeClientLists();
|
||||||
# endif // !NO_CLIENT_LIST
|
# endif // !NO_CLIENT_LIST
|
||||||
@ -1769,6 +1850,10 @@ int newmain()
|
|||||||
return NtServiceInstallation(installService, ServiceUser, ServicePassword);
|
return NtServiceInstallation(installService, ServiceUser, ServicePassword);
|
||||||
# endif // _NTSERVICE
|
# endif // _NTSERVICE
|
||||||
|
|
||||||
|
# ifndef NO_TAP
|
||||||
|
if (tapArgument && !InetdMode) startTap(tapArgument);
|
||||||
|
# endif // NO_TAP
|
||||||
|
|
||||||
# if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
# if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||||
if (!InetdMode)
|
if (!InetdMode)
|
||||||
{
|
{
|
||||||
@ -1807,7 +1892,7 @@ int newmain()
|
|||||||
{
|
{
|
||||||
printerrorf("Fatal: %s for %s failed: %s\n", "setuid", uname, strerror(errno));
|
printerrorf("Fatal: %s for %s failed: %s\n", "setuid", uname, strerror(errno));
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
# ifndef NO_SIGHUP
|
# ifndef NO_SIGHUP
|
||||||
}
|
}
|
||||||
# endif // NO_SIGHUP
|
# endif // NO_SIGHUP
|
||||||
|
@ -48,18 +48,18 @@ int server_main(int argc, CARGV argv);
|
|||||||
#define INI_PARAM_FREEBIND 17
|
#define INI_PARAM_FREEBIND 17
|
||||||
#define INI_PARAM_PUBLIC_IP_PROTECTION_LEVEL 18
|
#define INI_PARAM_PUBLIC_IP_PROTECTION_LEVEL 18
|
||||||
#define INI_PARAM_LOG_DATE_AND_TIME 19
|
#define INI_PARAM_LOG_DATE_AND_TIME 19
|
||||||
#define INI_PARAM_WINDOWS 20
|
#define INI_PARAM_HOST_BUILD 20
|
||||||
#define INI_PARAM_OFFICE2010 21
|
|
||||||
#define INI_PARAM_OFFICE2013 22
|
|
||||||
#define INI_PARAM_OFFICE2016 23
|
|
||||||
#define INI_PARAM_WHITELISTING_LEVEL 24
|
#define INI_PARAM_WHITELISTING_LEVEL 24
|
||||||
#define INI_PARAM_CHECK_CLIENT_TIME 25
|
#define INI_PARAM_CHECK_CLIENT_TIME 25
|
||||||
#define INI_PARAM_MAINTAIN_CLIENTS 26
|
#define INI_PARAM_MAINTAIN_CLIENTS 26
|
||||||
#define INI_PARAM_START_EMPTY 27
|
#define INI_PARAM_START_EMPTY 27
|
||||||
#define INI_PARAM_DATA_FILE 28
|
#define INI_PARAM_DATA_FILE 28
|
||||||
|
#define INI_PARAM_VPN 29
|
||||||
|
#define INI_PARAM_EXIT_LEVEL 30
|
||||||
|
|
||||||
#define INI_FILE_PASS_1 1
|
#define INI_FILE_PASS_1 1
|
||||||
#define INI_FILE_PASS_2 2
|
#define INI_FILE_PASS_2 2
|
||||||
|
#define INI_FILE_PASS_3 3
|
||||||
|
|
||||||
typedef struct IniFileParameter
|
typedef struct IniFileParameter
|
||||||
{
|
{
|
||||||
|
372
src/wintap.c
Normal file
372
src/wintap.c
Normal file
@ -0,0 +1,372 @@
|
|||||||
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG
|
||||||
|
#define CONFIG "config.h"
|
||||||
|
#endif // CONFIG
|
||||||
|
#include CONFIG
|
||||||
|
#include "helpers.h"
|
||||||
|
#include "wintap.h"
|
||||||
|
|
||||||
|
#ifndef NO_TAP
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "endian.h"
|
||||||
|
#include "output.h"
|
||||||
|
#include "tap-windows.h"
|
||||||
|
#include <iphlpapi.h>
|
||||||
|
|
||||||
|
#if !_WIN32
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif // !_WIN32
|
||||||
|
|
||||||
|
static char* szIpAddress = "10.10.10.9";
|
||||||
|
static char* szMask = "30";
|
||||||
|
static char* szTapName;
|
||||||
|
static char *ActiveTapName, *AdapterClass;
|
||||||
|
static char* szLeaseDuration = "1d";
|
||||||
|
static uint32_t IpAddress, Mask, Network, Broadcast, DhcpServer; // These are host-endian (=little-endian) for easier calculations
|
||||||
|
static uint32_t Mtu;
|
||||||
|
static uint_fast8_t Cidr;
|
||||||
|
static HANDLE TapHandle;
|
||||||
|
static TapDriverVersion_t DriverVersion;
|
||||||
|
static IpPacket_t* IpPacket;
|
||||||
|
static uint32_t DhcpLeaseDuration;
|
||||||
|
|
||||||
|
|
||||||
|
static BOOL isAddressAssigned()
|
||||||
|
{
|
||||||
|
PMIB_IPADDRTABLE pIPAddrTable;
|
||||||
|
DWORD dwSize = 0;
|
||||||
|
BOOL result = FALSE;
|
||||||
|
|
||||||
|
pIPAddrTable = (PMIB_IPADDRTABLE)vlmcsd_malloc(sizeof(MIB_IPADDRTABLE));
|
||||||
|
DWORD status = GetIpAddrTable(pIPAddrTable, &dwSize, 0);
|
||||||
|
free(pIPAddrTable);
|
||||||
|
|
||||||
|
if (status != ERROR_INSUFFICIENT_BUFFER) return FALSE;
|
||||||
|
pIPAddrTable = (MIB_IPADDRTABLE *)vlmcsd_malloc(dwSize);
|
||||||
|
|
||||||
|
if (GetIpAddrTable(pIPAddrTable, &dwSize, 0))
|
||||||
|
{
|
||||||
|
free(pIPAddrTable);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
PMIB_IPADDRROW row;
|
||||||
|
for (row = pIPAddrTable->table; row < pIPAddrTable->table + pIPAddrTable->dwNumEntries; row++)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
row->dwAddr == BE32(IpAddress) &&
|
||||||
|
!(row->wType & (MIB_IPADDR_DELETED | MIB_IPADDR_DISCONNECTED | MIB_IPADDR_TRANSIENT))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
result = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
free(pIPAddrTable);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void parseTapArgument(char* argument)
|
||||||
|
{
|
||||||
|
char* equalsignPosition = strchr(argument, (int)'=');
|
||||||
|
char* slashPosition = strchr(argument, (int)'/');
|
||||||
|
char* colonPosition = strchr(argument, (int)':');
|
||||||
|
|
||||||
|
szTapName = argument;
|
||||||
|
|
||||||
|
if (equalsignPosition)
|
||||||
|
{
|
||||||
|
*equalsignPosition = 0;
|
||||||
|
szIpAddress = equalsignPosition + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (slashPosition)
|
||||||
|
{
|
||||||
|
*slashPosition = 0;
|
||||||
|
szMask = slashPosition + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (colonPosition)
|
||||||
|
{
|
||||||
|
*colonPosition = 0;
|
||||||
|
szLeaseDuration = colonPosition + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
IpAddress = BE32(inet_addr(szIpAddress));
|
||||||
|
|
||||||
|
if (IpAddress == BE32(INADDR_NONE))
|
||||||
|
{
|
||||||
|
printerrorf("Fatal: %s is not a valid IPv4 address\n", szIpAddress);
|
||||||
|
exit(VLMCSD_EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
char* next;
|
||||||
|
Cidr = (uint8_t)strtol(szMask, &next, 10);
|
||||||
|
|
||||||
|
if (*next || Cidr < 8 || Cidr > 30)
|
||||||
|
{
|
||||||
|
printerrorf("Fatal: /%s is not a valid CIDR mask between /8 and /30\n", szMask);
|
||||||
|
exit(VLMCSD_EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!((DhcpLeaseDuration = timeSpanString2Seconds(szLeaseDuration))))
|
||||||
|
{
|
||||||
|
printerrorf("Fatal: No valid time span specified in option -%c.\n", 'O');
|
||||||
|
exit(VLMCSD_EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
Mask = (uint32_t)~(0xffffffff >> Cidr);
|
||||||
|
Network = IpAddress & Mask;
|
||||||
|
Broadcast = IpAddress | ~Mask;
|
||||||
|
DhcpServer = IpAddress + 1;
|
||||||
|
|
||||||
|
if (IpAddress <= Network || IpAddress + 1 >= Broadcast)
|
||||||
|
{
|
||||||
|
uint32_t lowerIpBE = BE32(Network + 1);
|
||||||
|
uint32_t upperIpBE = BE32(Broadcast - 2);
|
||||||
|
const char* szLower = vlmcsd_strdup(inet_ntoa(*(struct in_addr*)&lowerIpBE));
|
||||||
|
const char* szUpper = vlmcsd_strdup(inet_ntoa(*(struct in_addr*)&upperIpBE));
|
||||||
|
|
||||||
|
printerrorf("Fatal: For this subnet the IPv4 address must be ");
|
||||||
|
|
||||||
|
if (lowerIpBE == upperIpBE)
|
||||||
|
{
|
||||||
|
printerrorf("%s\n", szLower);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printerrorf("between %s and %s\n", szLower, szUpper);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(VLMCSD_EINVAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__noreturn static void WinErrorExit(DWORD error)
|
||||||
|
{
|
||||||
|
printerrorf("Registry read error: %s\n", win_strerror((int)error));
|
||||||
|
exit(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static HANDLE OpenTapHandle()
|
||||||
|
{
|
||||||
|
HANDLE handle = INVALID_HANDLE_VALUE;
|
||||||
|
HKEY regAdapterKey;
|
||||||
|
DWORD regResult;
|
||||||
|
if ((regResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, ADAPTER_KEY, 0, KEY_READ | KEY_WOW64_64KEY, ®AdapterKey)) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
WinErrorExit(regResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
char subkeyName[TAP_REGISTRY_DATA_SIZE];
|
||||||
|
DWORD i, subKeySize = sizeof(subkeyName);
|
||||||
|
|
||||||
|
for (i = 0; (regResult = RegEnumKeyEx(regAdapterKey, i, subkeyName, &subKeySize, NULL, NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS; i++)
|
||||||
|
{
|
||||||
|
HKEY regSubKey;
|
||||||
|
DWORD type, regDataSize;
|
||||||
|
char regData[TAP_REGISTRY_DATA_SIZE];
|
||||||
|
|
||||||
|
if (regResult) WinErrorExit(regResult);
|
||||||
|
|
||||||
|
if ((regResult = RegOpenKeyEx(regAdapterKey, subkeyName, 0, KEY_READ | KEY_WOW64_64KEY, ®SubKey)) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
regDataSize = sizeof(regData);
|
||||||
|
|
||||||
|
if (RegQueryValueEx(regSubKey, "ComponentId", NULL, &type, (LPBYTE)regData, ®DataSize) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
type == REG_SZ &&
|
||||||
|
(
|
||||||
|
!strncmp(regData, "tap0801", sizeof(regData)) ||
|
||||||
|
!strncmp(regData, "tap0901", sizeof(regData)) ||
|
||||||
|
!strncmp(regData, "TEAMVIEWERVPN", sizeof(regData))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
AdapterClass = vlmcsd_strdup(regData);
|
||||||
|
regDataSize = sizeof(regData);
|
||||||
|
|
||||||
|
if (RegQueryValueEx(regSubKey, "NetCfgInstanceId", NULL, &type, (LPBYTE)regData, ®DataSize) == ERROR_SUCCESS && type == REG_SZ)
|
||||||
|
{
|
||||||
|
HKEY connectionKey;
|
||||||
|
char connectionKeyName[TAP_REGISTRY_DATA_SIZE];
|
||||||
|
|
||||||
|
strncpy(connectionKeyName, NETWORK_CONNECTIONS_KEY "\\", sizeof(connectionKeyName));
|
||||||
|
strncat(connectionKeyName, regData, sizeof(connectionKeyName));
|
||||||
|
strncat(connectionKeyName, "\\Connection", sizeof(connectionKeyName));
|
||||||
|
|
||||||
|
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, connectionKeyName, 0, KEY_READ | KEY_WOW64_64KEY, &connectionKey) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
char deviceName[TAP_REGISTRY_DATA_SIZE];
|
||||||
|
regDataSize = sizeof(deviceName);
|
||||||
|
|
||||||
|
if (RegQueryValueEx(connectionKey, "Name", NULL, &type, (LPBYTE)deviceName, ®DataSize) == ERROR_SUCCESS && type == REG_SZ)
|
||||||
|
{
|
||||||
|
if (!strcmp(szTapName, ".") || !strncasecmp(szTapName, deviceName, sizeof(deviceName)))
|
||||||
|
{
|
||||||
|
ActiveTapName = vlmcsd_strdup(deviceName);
|
||||||
|
strncpy(deviceName, USERMODEDEVICEDIR, sizeof(deviceName));
|
||||||
|
strncat(deviceName, regData, sizeof(deviceName));
|
||||||
|
strncat(deviceName, strcmp(AdapterClass, "TEAMVIEWERVPN") ? TAP_WIN_SUFFIX : ".dgt", sizeof(deviceName));
|
||||||
|
handle = CreateFile(deviceName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(connectionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (handle == INVALID_HANDLE_VALUE) free(AdapterClass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(regSubKey);
|
||||||
|
subKeySize = sizeof(subkeyName);
|
||||||
|
if (handle != INVALID_HANDLE_VALUE) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(regAdapterKey);
|
||||||
|
|
||||||
|
if (handle == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
printerrorf("Fatal: No compatible VPN adapter");
|
||||||
|
|
||||||
|
if (!strcmp(szTapName, "."))
|
||||||
|
{
|
||||||
|
printerrorf("s");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printerrorf(" with name \"%s\"", szTapName);
|
||||||
|
}
|
||||||
|
|
||||||
|
printerrorf(" available for use\n");
|
||||||
|
exit(ERROR_DEVICE_NOT_AVAILABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int DevCtl(DWORD code, void* data, DWORD len)
|
||||||
|
{
|
||||||
|
if (!DeviceIoControl(TapHandle, code, data, len, data, len, &len, NULL))
|
||||||
|
{
|
||||||
|
const DWORD error = GetLastError();
|
||||||
|
printerrorf("Fatal: VPN adapter error: %s\n", win_strerror(error));
|
||||||
|
exit(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static DWORD WINAPI TapMirror(LPVOID data_unused)
|
||||||
|
{
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
DWORD bytesRead, bytesWritten;
|
||||||
|
if (!ReadFile(TapHandle, IpPacket, Mtu, &bytesRead, NULL)) break;
|
||||||
|
|
||||||
|
const uint32_t temp = IpPacket->ip_src;
|
||||||
|
IpPacket->ip_src = IpPacket->ip_dst;
|
||||||
|
IpPacket->ip_dst = temp;
|
||||||
|
|
||||||
|
if (!WriteFile(TapHandle, IpPacket, bytesRead, &bytesWritten, NULL)) break;
|
||||||
|
|
||||||
|
# if !defined(NO_LOG) && defined(_PEDANTIC)
|
||||||
|
if (bytesRead != bytesWritten) logger("Warning: VPN device \"%s\": %u bytes could not be written\n", ActiveTapName, bytesRead - bytesWritten);
|
||||||
|
# endif // !defined(NO_LOG) && defined(_PEDANTIC)
|
||||||
|
}
|
||||||
|
|
||||||
|
const DWORD error = GetLastError();
|
||||||
|
|
||||||
|
# ifndef NO_LOG
|
||||||
|
logger("Warning: VPN thread for device \"%s\" exiting: %s\n", ActiveTapName, win_strerror(error));
|
||||||
|
# endif // NO_LOG
|
||||||
|
|
||||||
|
free(ActiveTapName);
|
||||||
|
CloseHandle(TapHandle);
|
||||||
|
exitOnWarningLevel(1);
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void startTap(char* const argument)
|
||||||
|
{
|
||||||
|
if (!strcmp(argument, "-")) return;
|
||||||
|
parseTapArgument(argument);
|
||||||
|
|
||||||
|
TapHandle = OpenTapHandle();
|
||||||
|
|
||||||
|
// Get MTU and driver version
|
||||||
|
DevCtl(TAP_WIN_IOCTL_GET_MTU, &Mtu, sizeof(Mtu));
|
||||||
|
DevCtl(TAP_WIN_IOCTL_GET_VERSION, &DriverVersion, sizeof(DriverVersion));
|
||||||
|
|
||||||
|
// Configure TUN mode
|
||||||
|
TapConfigTun_t tapTunCfg;
|
||||||
|
tapTunCfg.Address.s_addr = BE32(IpAddress);
|
||||||
|
tapTunCfg.Network.s_addr = BE32(Network);
|
||||||
|
tapTunCfg.Mask.s_addr = BE32(Mask);
|
||||||
|
DevCtl(TAP_WIN_IOCTL_CONFIG_TUN, &tapTunCfg, sizeof(tapTunCfg));
|
||||||
|
|
||||||
|
// Setup the drivers internal DHCP server
|
||||||
|
TapConfigDhcp_t tapDhcpCfg;
|
||||||
|
tapDhcpCfg.Address.s_addr = BE32(IpAddress);
|
||||||
|
tapDhcpCfg.Mask.s_addr = BE32(Mask);
|
||||||
|
tapDhcpCfg.DhcpServer.s_addr = BE32(IpAddress + 1);
|
||||||
|
tapDhcpCfg.LeaseDuration = DhcpLeaseDuration;
|
||||||
|
DevCtl(TAP_WIN_IOCTL_CONFIG_DHCP_MASQ, &tapDhcpCfg, sizeof(tapDhcpCfg));
|
||||||
|
|
||||||
|
// Connect the virtual network cable
|
||||||
|
BOOL isCableConnected = TRUE;
|
||||||
|
DevCtl(TAP_WIN_IOCTL_SET_MEDIA_STATUS, &isCableConnected, sizeof(isCableConnected));
|
||||||
|
|
||||||
|
// Allocate buffer and start mirror thread
|
||||||
|
IpPacket = (IpPacket_t*)vlmcsd_malloc(Mtu);
|
||||||
|
HANDLE threadHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TapMirror, NULL, 0, NULL);
|
||||||
|
|
||||||
|
if (!threadHandle)
|
||||||
|
{
|
||||||
|
DWORD error = GetLastError();
|
||||||
|
printerrorf("Fatal: Unable to start VPN thread: %s\n", win_strerror(error));
|
||||||
|
exit(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseHandle(threadHandle);
|
||||||
|
|
||||||
|
# ifndef NO_LOG
|
||||||
|
logger("%s %u.%u.%u device \"%s\" started\n", AdapterClass, DriverVersion.Major, DriverVersion.Minor, DriverVersion.Build, ActiveTapName);
|
||||||
|
# endif // NO_LOG
|
||||||
|
|
||||||
|
DWORD i;
|
||||||
|
BOOL isAssigned;
|
||||||
|
|
||||||
|
// Wait up to 4 seconds until the IP address is up and running
|
||||||
|
// so vlmcsd can actually bind to and listen on it
|
||||||
|
for (i = 0; !((isAssigned = isAddressAssigned())) && i < 20; i++) Sleep(200);
|
||||||
|
|
||||||
|
if (!isAssigned)
|
||||||
|
{
|
||||||
|
printerrorf("Warning: IPv4 address %s not assigned\n", szIpAddress);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# ifndef NO_LOG
|
||||||
|
logger("IPv4 address %s assigned\n", szIpAddress);
|
||||||
|
# endif // NO_LOG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // NO_TAP
|
||||||
|
|
50
src/wintap.h
Normal file
50
src/wintap.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#ifndef __WINTAP_H
|
||||||
|
#define __WINTAP_H
|
||||||
|
|
||||||
|
#define TAP_REGISTRY_DATA_SIZE 256
|
||||||
|
|
||||||
|
// Network-Endian (= Big-Endian)
|
||||||
|
typedef struct TapConfigTun
|
||||||
|
{
|
||||||
|
struct in_addr Address;
|
||||||
|
struct in_addr Network;
|
||||||
|
struct in_addr Mask;
|
||||||
|
} TapConfigTun_t, *PTapConfigTun_t;
|
||||||
|
|
||||||
|
// Network-Endian (= Big-Endian), except LeaseDuration
|
||||||
|
typedef struct TapConfigDhcp
|
||||||
|
{
|
||||||
|
struct in_addr Address;
|
||||||
|
struct in_addr Mask;
|
||||||
|
struct in_addr DhcpServer;
|
||||||
|
uint32_t LeaseDuration; // Host-Endian (=Little-Endian). Anything else is Big-Endian
|
||||||
|
} TapConfigDhcp_t, *PTapConfigDhcp_t;
|
||||||
|
|
||||||
|
typedef struct TapDriverVersion
|
||||||
|
{
|
||||||
|
uint32_t Major;
|
||||||
|
uint32_t Minor;
|
||||||
|
uint32_t Build;
|
||||||
|
uint32_t Revision;
|
||||||
|
} TapDriverVersion_t, *PTapDriverVersion_t;
|
||||||
|
|
||||||
|
// Network-Endian (= Big-Endian)
|
||||||
|
typedef struct IpPacket {
|
||||||
|
uint8_t ip_hl : 4, /* header length */
|
||||||
|
ip_v : 4; /* version */
|
||||||
|
uint8_t ip_tos; /* type of service */
|
||||||
|
int16_t ip_len; /* total length */
|
||||||
|
uint16_t ip_id; /* identification */
|
||||||
|
int16_t ip_off; /* fragment offset field */
|
||||||
|
uint8_t ip_ttl; /* time to live */
|
||||||
|
uint8_t ip_p; /* protocol */
|
||||||
|
uint16_t ip_sum; /* checksum */
|
||||||
|
uint32_t ip_src, ip_dst; /* source and dest address */
|
||||||
|
uint8_t payload[0];
|
||||||
|
} IpPacket_t, *PIpPacket_t;
|
||||||
|
|
||||||
|
void startTap(char* const argument);
|
||||||
|
|
||||||
|
#endif //__WINTAP_H
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user