Compare commits

...

27 commits

Author SHA1 Message Date
Rouben 65228e5c79
Merge pull request #40 from simonsmh/master
Update debian submodule
2020-05-19 17:44:42 -04:00
Simon Shi cfc3e40505 update debian submodule 2020-05-12 13:26:29 +08:00
Rouben 5b08c8f2a3
Merge pull request #38 from rouben/master
vlmcsd-1113-2020-03-28-Hotbird64
2020-03-30 01:30:22 -04:00
Rouben Tchakhmakhtchian e599080486
vlmcsd-1113-2020-03-28-Hotbird64 2020-03-30 01:21:09 -04:00
Wind4 ce1dfa16b2 Update submodule 2019-08-08 18:17:04 +08:00
Wind4 7bf83cc319 Add docker scripts 2019-08-08 18:09:25 +08:00
Wind4 f1a3c7f290
Merge pull request #25 from simonsmh/master
Add .gitignore to make project struct simple.
2018-11-26 10:44:32 +08:00
Simon Shi 4906b0fd81
Add .gitignore 2018-11-08 23:59:24 +08:00
Rouben cd488aeb85
vlmcsd-1112-2019-10-20-Hotbird64 2018-10-23 23:46:00 -04:00
Wind4 28a50f7bba Add debian build script 2017-10-17 17:00:20 +08:00
Wind4 550df56794 vlmcsd-1111-2017-06-17-Hotbird64 2017-06-22 15:21:58 +08:00
Wind4 5a29226593 vlmcsd-1108-2017-01-19-Hotbird64 2017-02-11 17:39:52 +08:00
Wind4 c5e1a0a591 vlmcsd-1107-2016-12-12-Hotbird64 2016-12-18 13:14:31 +08:00
Wind4 af593fc11b vlmcsd-1106-2016-12-06-Hotbird64 2016-12-11 12:25:30 +08:00
Wind4 9bd3e9c470 vlmcsd-1105-2016-11-28-Hotbird64 2016-12-02 15:56:18 +08:00
Wind4 b8fdaf9a6b vlmcsd-1103-2016-11-05-Hotbird64 2016-11-16 12:12:36 +08:00
Wind4 fcbbc40d60 vlmcsd-svn1099-2016-10-25-Hotbird64 2016-10-31 20:59:15 +08:00
Wind4 936811ff5c vlmcsd-svn1085-2016-10-21-Hotbird64 2016-10-24 21:32:24 +08:00
Wind4 798675dc66 vlmcsd-svn1065-2016-10-12-Hotbird64 2016-10-14 13:28:23 +08:00
Wind4 d413afbadf vlmcsd-svn1031-2016-10-06-Hotbird64 2016-10-08 13:35:48 +08:00
Wind4 0b2c216c06 vlmcsd-svn1016-2016-09-16-Hotbird64 2016-09-18 11:30:46 +08:00
Wind4 213ac7d870 vlmcsd-svn1006-2016-09-03-Hotbird64 2016-09-04 22:03:54 +08:00
Wind4 032d201234 vlmcsd-svn1003-2016-08-27-Hotbird64 2016-08-31 11:50:33 +08:00
Wind4 9099d5aa69 vlmcsd-svn998-2016-08-11-Hotbird64 2016-08-15 18:35:59 +08:00
Wind4 8d3bfb8d55 vlmcsd-svn977-2016-07-13-Hotbird64 2016-08-02 22:39:39 +08:00
Wind4 f72621f166 vlmcsd-svn934-2016-06-17-Hotbird64 2016-06-28 13:07:01 +08:00
Wind4 c479a67c2c vlmcsd-svn906-2016-06-05-Hotbird64 2016-06-06 10:36:00 +08:00
166 changed files with 15964 additions and 93628 deletions

12
.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
VisualStudio/
bin/
build/
buildroot-configs/
floppy/
hotbird64-mass-build/
lib/
src/VisualStudio-Linux-Remote/
*.vcxproj*
*.html
*.pdf
*.txt

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "debian"]
path = debian
url = https://github.com/Wind4/vlmcsd-debian.git
[submodule "docker"]
path = docker
url = https://github.com/Wind4/vlmcsd-docker.git

View file

@ -1,29 +1,19 @@
################################################################################
.NOTPARALLEL:
.PHONY: clean
MAX_THREADS ?= 16
PROGRAM_NAME ?= vlmcsd
CLIENT_NAME ?= vlmcs
MULTI_NAME ?= vlmcsdmulti
CONFIG ?= config.h
PROGRAM_NAME ?= bin/vlmcsd
CLIENT_NAME ?= bin/vlmcs
MULTI_NAME ?= bin/vlmcsdmulti
OBJ_NAME ?= build/libkms-static.o
A_NAME ?= lib/libkms.a
# crypto library to use for standard algos, could save ~1-2kb ;)
# can be either 'openssl', 'polarssl' or anything other for internal impl
CRYPTO ?= internal
BASE_PROGRAM_NAME=$(notdir $(PROGRAM_NAME))
BASE_CLIENT_NAME=$(notdir $(CLIENT_NAME))
BASE_MULTI_NAME=$(notdir $(MULTI_NAME))
BASE_DLL_NAME=$(notdir $(DLL_NAME))
BASE_A_NAME=$(notdir $(A_NAME))
# use DNS_PARSER=internal if your OS doesn't supply the DNS parser routines
DNS_PARSER ?= OS
# You should supply your own version string here
VLMCSD_VERSION ?= $(shell test -d .svn && echo svn`svnversion`)
FEATURES ?= full
VERBOSE ?= NO
################################################################################
CC ?= gcc
TARGETPLATFORM := $(shell LANG=en_US.UTF-8 $(CC) -v 2>&1 | grep '^Target: ' | cut -f 2 -d ' ')
ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
@ -31,464 +21,135 @@ ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
UNIX := 1
endif
ifneq (,$(findstring androideabi,$(TARGETPLATFORM)))
ifneq (,$(findstring android,$(TARGETPLATFORM)))
ANDROID := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring minix,$(TARGETPLATFORM)))
MINIX := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring mingw,$(TARGETPLATFORM)))
MINGW := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring cygwin,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring cygnus,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring freebsd,$(TARGETPLATFORM)))
FREEBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring netbsd,$(TARGETPLATFORM)))
NETBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring openbsd,$(TARGETPLATFORM)))
OPENBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring solaris,$(TARGETPLATFORM)))
SOLARIS := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring linux,$(TARGETPLATFORM)))
LINUX := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring gnu,$(TARGETPLATFORM)))
ifeq (,$(findstring linux,$(TARGETPLATFORM)))
UNIX := 1
HURD := 1
ELF := 1
endif
endif
ifeq ($(CYGWIN),1)
DLL_NAME ?= cygkms.dll
DLL_NAME ?= lib/cygkms.dll
else ifeq ($(WIN),1)
DLL_NAME ?= libkms.dll
DLL_NAME ?= lib/libkms.dll
else ifeq ($(DARWIN),1)
DLL_NAME ?= libkms.dylib
DLL_NAME ?= lib/libkms.dylib
else
DLL_NAME ?= libkms.so
DLL_NAME ?= lib/libkms.so
endif
BASECFLAGS = -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
BASELDFLAGS =
STRIPFLAGS =
CLIENTLDFLAGS =
SERVERLDFLAGS =
.DEFAULT:
+@(test -d bin || mkdir bin) & (test -d lib || mkdir lib) & (test -d build || mkdir build)
+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
ifeq ($(NOLIBS),1)
NOLRESOLV=1
NOLPTHREAD=1
endif
ifneq ($(NO_DNS),1)
ifneq ($(ANDROID),1)
ifneq ($(NOLRESOLV),1)
ifeq ($(MINGW),1)
BASELDFLAGS += -ldnsapi
endif
ifeq ($(LINUX),1)
BASELDFLAGS += -lresolv
endif
ifeq ($(DARWIN),1)
BASELDFLAGS += -lresolv
endif
ifeq ($(CYGWIN),1)
DNS_PARSER := internal
BASELDFLAGS += -lresolv
endif
ifeq ($(OPENBSD),1)
DNS_PARSER := internal
endif
ifeq ($(SOLARIS),1)
BASELDFLAGS += -lresolv
endif
endif
endif
else
BASECFLAGS += -DNO_DNS
endif
ifneq ($(CAT),2)
BASECFLAGS += "-Wall"
endif
ifeq ($(DARWIN), 1)
STRIPFLAGS += -Wl,-S -Wl,-x
BASECFLAGS += -Wno-deprecated-declarations
else ifeq ($(shell uname), SunOS)
STRIPFLAGS += -s
ifeq ($(notdir $(LD_ALTEXEC)),gld)
BASELDFLAGS += -Wl,--gc-sections
endif
BASELDFLAGS += -lsocket
else
ifneq ($(CC),tcc)
BASELDFLAGS += -Wl,--gc-sections
endif
STRIPFLAGS += -s
endif
ifeq ($(FEATURES), embedded)
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG
else ifeq ($(FEATURES), autostart)
BASECFLAGS += -DNO_HELP
else ifeq ($(FEATURES), minimum)
BASECFLAGS += -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT
else ifeq ($(FEATURES), most)
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), inetd)
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), fixedepids)
BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
endif
ifdef INI
BASECFLAGS += -DINI_FILE=\"$(INI)\"
endif
ifeq ($(THREADS), 1)
BASECFLAGS += -DUSE_THREADS
endif
ifeq ($(CHILD_HANDLER), 1)
BASECFLAGS += -DCHILD_HANDLER
endif
ifeq ($(NO_TIMEOUT), 1)
BASECFLAGS += -DNO_TIMEOUT
endif
ifdef WINDOWS
BASECFLAGS += -DEPID_WINDOWS=\"$(WINDOWS)\"
endif
ifdef OFFICE2010
BASECFLAGS += -DEPID_OFFICE2010=\"$(OFFICE2010)\"
endif
ifdef OFFICE2013
BASECFLAGS += -DEPID_OFFICE2013=\"$(OFFICE2013)\"
endif
ifdef HWID
BASECFLAGS += -DHWID=$(HWID)
endif
ifdef TERMINAL_WIDTH
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH)
endif
ifeq ($(NOPROCFS), 1)
BASECFLAGS += -DNO_PROCFS
endif
ifeq ($(AUXV), 1)
BASECFLAGS += -DUSE_AUXV
endif
ifneq ($(ANDROID), 1)
ifneq ($(MINIX), 1)
ifneq ($(NOLPTHREAD), 1)
ifeq ($(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)),)
BASELDFLAGS += -lpthread
endif
ifneq ($(findstring USE_THREADS,$(BASECFLAGS)),)
BASELDFLAGS += -lpthread
endif
endif
endif
endif
$(MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
all: $(CLIENT_NAME) $(PROGRAM_NAME)
ifdef CAT
allmulti: $(CLIENT_NAME) $(PROGRAM_NAME) $(MULTI_NAME)
endif
ifneq ($(strip $(VLMCSD_VERSION)),)
BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\"
endif
ifdef CAT
BASECFLAGS += -DONE_FILE
endif
SRCS = crypto.c kms.c endian.c output.c shared_globals.c helpers.c
HEADERS = $(CONFIG) types.h rpc.h vlmcsd.h endian.h crypto.h kms.h network.h output.h shared_globals.h vlmcs.h helpers.h
DEPS = $(MULTI_SRCS:.c=.d)
VLMCSD_SRCS = vlmcsd.c $(SRCS)
VLMCSD_OBJS = $(VLMCSD_SRCS:.c=.o)
VLMCS_SRCS = vlmcs.c $(SRCS)
VLMCS_OBJS = $(VLMCS_SRCS:.c=.o)
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c $(SRCS)
MULTI_OBJS = $(MULTI_SRCS:.c=.o)
DLL_SRCS = libkms.c $(SRCS)
DLL_OBJS = $(DLL_SRCS:.c=.o)
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
ifneq ($(NO_DNS),1)
VLMCS_SRCS += dns_srv.c
MULTI_SRCS += dns_srv.c
ifeq ($(DNS_PARSER),internal)
ifneq ($(MINGW),1)
VLMCS_SRCS += ns_parse.c ns_name.c
MULTI_SRCS += ns_parse.c ns_name.c
BASECFLAGS += "-DDNS_PARSER_INTERNAL"
endif
endif
endif
ifeq ($(MSRPC),1)
VLMCSD_SRCS += msrpc-server.c
VLMCS_SRCS += msrpc-client.c
MULTI_SRCS += msrpc-server.c msrpc-client.c
BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
BASELDFLAGS += -lrpcrt4
else
SRCS += network.c rpc.c
endif
ifeq "$(WIN)" "1"
VLMCSD_SRCS += ntservice.c
MULTI_SRCS += ntservice.c
endif
ifeq ($(CRYPTO), openssl_with_aes)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl_with_aes_soft)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL -D_OPENSSL_SOFTWARE
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl)
BASECFLAGS += -D_CRYPTO_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), polarssl)
BASECFLAGS += -D_CRYPTO_POLARSSL
BASELDFLAGS += -lpolarssl
else ifeq ($(CRYPTO), windows)
BASECFLAGS += -D_CRYPTO_WINDOWS
SRCS += crypto_windows.c
#BASELDFLAGS += -lpolarssl
else
BASECFLAGS += -D_CRYPTO_INTERNAL
SRCS += crypto_internal.c
endif
ifneq ($(STRIP),0)
BASELDFLAGS += $(STRIPFLAGS)
endif
ifeq ($(OPENSSL_HMAC),0)
BASECFLAGS += -D_OPENSSL_NO_HMAC
endif
ifeq ($(DEPENDENCIES),2)
BASECFLAGS += -MMD
endif
ifeq ($(VERBOSE),3)
COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
endif
ifeq ($(CAT),2)
LDCMD := CC/LD
else
LDCMD := LD
endif
-include $(MULTI_SRCS:.c=.d)
%.o: %.c
ifeq ($(VERBOSE),1)
$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
ifeq ($(DEPENDENCIES),1)
$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
else
@echo "$(COMPILER) CC $@ <- $<"
@$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
ifeq ($(DEPENDENCIES),1)
@echo "$(COMPILER) DEP $*.d <- $<"
@$(CC) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
endif
endif
vlmcsd_all.c: $(VLMCSD_SRCS)
ifeq ($(VERBOSE),1)
cat $^ > $@
else
@echo "$(COMPILER) CAT $@ <- $^"
@cat $^ > $@
endif
vlmcs_all.c: $(VLMCS_SRCS)
ifeq ($(VERBOSE),1)
cat $^ > $@
else
@echo "$(COMPILER) CAT $@ <- $^"
@cat $^ > $@
endif
vlmcsdmulti_all.c: $(MULTI_SRCS)
ifeq ($(VERBOSE),1)
cat $^ > $@
else
@echo "$(COMPILER) CAT $@ <- $^"
@cat $^ > $@
endif
ifdef CAT
ifeq ($(CAT),2)
$(PROGRAM_NAME): vlmcsd_all.c
else
$(PROGRAM_NAME): vlmcsd_all.o
endif
else
$(PROGRAM_NAME): $(VLMCSD_OBJS)
endif
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
endif
ifdef CAT
ifeq ($(CAT),2)
$(CLIENT_NAME): vlmcs_all.c
else
$(CLIENT_NAME): vlmcs_all.o
endif
else
$(CLIENT_NAME): $(VLMCS_OBJS)
endif
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
endif
ifdef CAT
ifeq ($(CAT),2)
$(MULTI_NAME): vlmcsdmulti_all.c
else
$(MULTI_NAME): vlmcsdmulti_all.o
endif
else
$(MULTI_NAME): $(MULTI_OBJS)
endif
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS)
endif
$(DLL_NAME): $(DLL_SRCS)
ifeq ($(VERBOSE),1)
+$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) -shared -DIS_LIBRARY=1 -UNO_SOCKETS -UUSE_MSRPC
else
+@echo "$(COMPILER) $(LDCMD) $@ <- $^"
+@$(CC) -o $@ $^ $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) -shared -DIS_LIBRARY=1 -UNO_SOCKETS -UUSE_MSRPC
endif
%.pdf : %
ifeq ($(shell uname), Darwin)
groff -Tps -mandoc -c $< | pstopdf -i -o $@
else
groff -Tpdf -mandoc -c $< > $@
endif
%.html : %
groff -Thtml -mandoc -c $< > $@
%.unix.txt : %
groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
%.dos.txt : %.unix.txt
# unix2dos -n $< $@
# sed -e 's/$$/\r/' $< > $@
awk 'sub("$$", "\r")' $< > $@
pdfdocs : $(PDFDOCS)
dosdocs : $(DOSDOCS)
unixdocs : $(UNIXDOCS)
htmldocs : $(HTMLDOCS)
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
all:
+@(test -d bin || mkdir bin) & (test -d lib || mkdir lib) & (test -d build || mkdir build)
+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
clean:
rm -f *.o *.d *_all.c $(PROGRAM_NAME) $(MULTI_NAME) $(DLL_NAME) $(CLIENT_NAME) $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS)
+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
+@$(MAKE) -j$(MAX_THREADS) -C man $@
alldocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
dosdocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
unixdocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
htmldocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
pdfdocs:
+@$(MAKE) -j$(MAX_THREADS) -C man $@
GNUmakefile:
help:
@echo "Type:"
@echo " ${MAKE} - to build $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo " ${MAKE} clean - to remove $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo " ${MAKE} help - to see this help"
@echo " ${MAKE} pdfdocs - Create PDF versions of the documentation (Requires groff with PDF support)."
@echo " ${MAKE} htmldocs - Create HTML versions of the documentation."
@echo " ${MAKE} unixdocs - Create Unix TXT versions of the documentation."
@echo " ${MAKE} dosdocs - Create DOS/Windows TXT versions of the documentation."
@echo " ${MAKE} alldocs - Create all versions of the documentation."
@echo " ${MAKE} -j <x> - Use <x> parallel tasks (SMP support) when compiling $(PROGRAM_NAME) and $(CLIENT_NAME)"
@echo "Type"
@echo " ${MAKE} - to build $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME)"
@echo " ${MAKE} clean - to remove all targets and temporary files"
@echo " ${MAKE} pdfdocs - Create PDF versions of the documentation (Requires groff with PDF support)."
@echo " ${MAKE} htmldocs - Create HTML versions of the documentation."
@echo " ${MAKE} unixdocs - Create Unix TXT versions of the documentation."
@echo " ${MAKE} dosdocs - Create DOS/Windows TXT versions of the documentation."
@echo " ${MAKE} alldocs - Create all versions of the documentation."
@echo " ${MAKE} vlmcsd - to build KMS server $(PROGRAM_NAME)"
@echo " ${MAKE} vlmcs - to build KMS client $(CLIENT_NAME)"
@echo " ${MAKE} vlmcsdmulti - to build $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) in a single multi-call binary $(MULTI_NAME)"
@echo " ${MAKE} libkms - to build the shared library $(DLL_NAME)"
@echo " ${MAKE} libkms-static - to build the static library $(A_NAME)"
@echo ""
@echo " ${MAKE} $(PROGRAM_NAME) - to build the server only."
@echo " ${MAKE} $(CLIENT_NAME) - to build the client only."
@echo " ${MAKE} $(MULTI_NAME) - to build $(PROGRAM_NAME) and $(CLIENT_NAME) in a single multi-call binary"
@echo " ${MAKE} $(DLL_NAME) - to build the shared library $(DLL_NAME)"
@echo ""
@echo "Options:"
@echo "Options"
@echo " CONFIG=<x> Compile <x> as instead of config.h."
@echo " INI=<x> Compile $(PROGRAM_NAME) with default ini file <x>"
@echo " INI=<x> Compile $(BASE_PROGRAM_NAME) with default ini file <x>"
@echo " DATA=<x> Compile $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) with default KMS data file <x>"
@echo " PROGRAM_NAME=<x> Use <x> as output file name for the KMS server. Defaults to vlmcsd."
@echo " CLIENT_NAME=<x> Use <x> as output file name for the KMS client. Defaults to vlmcs."
@echo " MULTI_NAME=<x> Use <x> as output file name for the multi-call binary. Defaults to vlmcsdmulti."
@ -498,7 +159,10 @@ help:
@echo " CRYPTO=openssl_with_aes_soft EXPERIMENTAL: Use openssl for SHA256/HMAC and AES calculations (software)."
@echo " CRYPTO=polarssl Use polarssl instead of internal crypto code for SHA256/HMAC calculations."
@echo " CRYPTO=windows Use Windows CryptoAPI instead of internal crypto code for SHA256/HMAC calculations."
@echo " MSRPC=1 Use Microsoft RPC instead of vlmcsd's internal RPC. Only works with Windows and Cygwin targets."
@echo " CC=<x> Use compiler <x>. Supported compilers are gcc, icc, tcc and clang. Others may or may not work."
@echo " AR=<x> Use <x> instead of ar to build $(BASE_A_NAME). Set to gcc-ar if you want to use gcc's LTO feature."
@echo " COMPILER_LANGUAGE=<x> May be c or c++."
@echo " TERMINAL_WIDTH=<x> Assume a fixed terminal width of <x> columns. Use in case of problems only."
@echo " VLMCSD_VERSION=<x> Sets <x> as your version identifier. Defaults to \"private build\"."
@echo " CFLAGS=<x> Pass <x> as additional arguments to the compiler."
@ -506,58 +170,64 @@ help:
@echo " PLATFORMFLAGS=<x> Pass <x> as additional arguments to the compiler and the linker."
@echo " BASECFLAGS=<x> Pass only <x> as arguments to the compiler (advanced users only)."
@echo " BASELDFLAGS=<x> Pass only <x> as arguments to the linker (advanced users only)."
@echo " STRIP=0 Don't strip debug information from $(PROGRAM_NAME) and $(CLIENT_NAME) (for developers)."
@echo " STRIP=0 Don't strip debug information from $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) (for developers)."
@echo " VERBOSE=1 Be verbose when making targets."
@echo " VERBOSE=3 Show name of compiler."
@echo " THREADS=1 Use threads instead of fork(). Automatically set for native Windows. Recommended for Cygwin."
@echo " WINDOWS=<x> Use <x> as the default ePID for Windows (when using $(PROGRAM_NAME) with -r 0)."
@echo " OFFICE2010=<x> Use <x> as the default ePID for Office2010 (when using $(PROGRAM_NAME) with -r 0)."
@echo " OFFICE2013=<x> Use <x> as the default ePID for Office2013 (when using $(PROGRAM_NAME) with -r 0)."
@echo " HWID=<x> Use <x> as the default HWID (when it can't be found in an ini file)."
@echo " FEATURES=full Compile $(PROGRAM_NAME) with all features (default)."
@echo " FEATURES=most Compile $(PROGRAM_NAME) without rarely used features."
@echo " FEATURES=embedded Compile $(PROGRAM_NAME) with typical features for embedded systems."
@echo " FEATURES=autostart Removes features typically not needed if you place $(PROGRAM_NAME) in an autostart script."
@echo " FEATURES=inetd Compile $(PROGRAM_NAME) for running through an internet superserver only."
@echo " FEATURES=minimum Compiles only basic features of $(PROGRAM_NAME)."
@echo " FEATURES=fixedepids $(PROGRAM_NAME) only uses bultin internal ePIDs."
@echo " FEATURES=full Compile $(BASE_PROGRAM_NAME) with all features (default)."
@echo " FEATURES=most Compile $(BASE_PROGRAM_NAME) without rarely used features."
@echo " FEATURES=embedded Compile $(BASE_PROGRAM_NAME) with typical features for embedded systems."
@echo " FEATURES=autostart Removes features typically not needed if you place $(BASE_PROGRAM_NAME) in an autostart script."
@echo " FEATURES=inetd Compile $(BASE_PROGRAM_NAME) for running through an internet superserver only."
@echo " FEATURES=minimum Compiles only basic features of $(BASE_PROGRAM_NAME)."
@echo " FEATURES=fixedepids $(BASE_PROGRAM_NAME) only uses bultin internal ePIDs."
@echo ""
@echo "Useful CFLAGS to save memory when running $(PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=):"
@echo " -DNO_EXTENDED_PRODUCT_LIST Don't compile the detailed product list."
@echo " -DNO_BASIC_PRODUCT_LIST Don't compile the basic product list."
@echo "Useful CFLAGS to save memory when running $(BASE_PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=)"
@echo " -DNO_STRICT_MODES Don't support enhanced emulator detection prevention."
@echo " -DNO_CLIENT_LIST Don't support maintaining a client list (CMIDs)."
@echo " -DNO_VERBOSE_LOG Don't support verbose logging. Removes -v option."
@echo " -DNO_LOG Don't add support for logging. Implies -DNO_VERBOSE_LOG -DNO_EXTENDED_PRODUCT_LIST and -DNO_BASIC_PRODUCT_LIST."
@echo " -DNO_LOG Don't add support for logging. Implies -DNO_VERBOSE_LOG."
@echo " -DNO_RANDOM_EPID Don't support random ePIDs."
@echo " -DNO_INI_FILE Don't support reading ePIDs/HWIDs from a file."
@echo " -DNO_PID_FILE Don't support writing a PID file. Removes -p option."
@echo " -DNO_USER_SWITCH Don't support changing uid/gid after program start. Removes -u and -g options."
@echo " -DNO_HELP Don't support command line help."
@echo " -DNO_CUSTOM_INTERVALS Don't support custom intervals for retry and refresh activation. Removes -A and -R options."
@echo " -DNO_SOCKETS Don't support standalone operation. Requires an internet superserver to start $(PROGRAM_NAME)."
@echo " -DNO_CL_PIDS Don't support specifying ePIDs and HwId from the command line in $(PROGRAM_NAME)."
@echo " -DNO_LIMIT Don't support limiting concurrent clients in $(PROGRAM_NAME)."
@echo " -DNO_SIGHUP Don't support SIGHUP handling in $(PROGRAM_NAME)."
@echo " -DNO_FREEBIND Don't support binding to foreign IP addresses. Removes -F0 and -F1 options. Only affects FreeBSD and Linux."
@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_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_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_VERSION_INFORMATION Don't support displaying version information in $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME). Removes -V option."
@echo " -DNO_PRIVATE_IP_DETECT Don't support protection against clients with public IP addresses in $(BASE_PROGRAM_NAME)"
@echo " -DSMALL_AES Use a smaller (saves about 200 bytes) but slower implementation of AES."
@echo " -DNO_EXTERNAL_DATA Don't support loading an external database. Mutually exclusive with -DNO_INTERNAL_DATA"
@echo " -DNO_INTERNAL_DATA Don't compile an internal database. Mutually exclusive with -DNO_EXTERNAL_DATA"
@echo " -DUNSAFE_DATA_LOAD Don't check the KMS data file for integrity. Saves some bytes but is dangerous."
@echo ""
@echo "Troubleshooting options"
@echo " CAT=1 Combine all sources in a single file."
@echo " CAT=2 Combine all sources in a single file and don't create a *.o file."
@echo " CAT=1 Combine all sources in a single in-memory file and compile directly to target."
@echo " NOPROCFS=1 Don't rely on a properly mounted proc filesystem in /proc."
@echo " AUXV=1 Use /proc/self/auxv (requires Linux with glibc >= 2.16 or musl.)"
@echo " NOLPTHREAD=1 Disable detection if -lpthread is required (for use with Android NDK)."
@echo " NOLRESOLV=1 Disable detection if -lresolv is requires (for use with Android NDK)."
@echo " NOLRESOLV=1 Disable detection if -lresolv is required (for use with Android NDK)."
@echo " NOLIBS=1 Do not attempt to autodetect any library dependencies."
@echo " OPENSSL_HMAC=0 Compile for openssl versions that don't have HMAC support (required on some embedded devices)."
@echo " NO_TIMEOUT=1 Do not set timeouts for sockets (for systems that don't support it)."
@echo " CHILD_HANDLER=1 Install a handler for SIGCHLD (for systems that don't support SA_NOCLDWAIT)."
@echo " NO_DNS=1 Compile vlmcs without support for detecting KMS servers via DNS."
@echo " DNS_PARSER=internal Use $(CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
@echo " NO_DNS=1 Compile $(BASE_CLIENT_NAME) without support for detecting KMS servers via DNS."
@echo " NO_GETIFADDRS=1 Compile $(BASE_PROGRAM_NAME) without using getifaddrs()."
@echo " GETIFADDRS=musl Compile $(BASE_PROGRAM_NAME) with its own implementation of getifaddrs() based on musl."
@echo " DNS_PARSER=internal Use $(BASE_CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
@echo ""
@echo "Other useful CFLAGS:"
@echo " -DSUPPORT_WINE Add code that the Windows version of $(PROGRAM_NAME) runs on Wine if MSRPC=1"
@echo "Other useful CFLAGS"
@echo " -DNO_COMPILER_UAA Do not use compiler support for byte swapping and unaligned access"
@echo " -DFULL_INTERNAL_DATA Embed full internal KMS data in $(BASE_PROGRAM_NAME)."
@echo " -DSUPPORT_WINE Add code that the Windows version of $(BASE_PROGRAM_NAME) runs on Wine if MSRPC=1"
@echo " -D_PEDANTIC Report rare error/warning conditions instead of silently ignoring them."
@echo " -DINCLUDE_BETAS Include SKU / activation IDs for obsolete beta/preview products."
@echo " -DFD_SETSIZE=<x> Allow <x> -L statements in $(PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."
@echo " -flto Use link time optimization. Not supported by old compilers (gcc < 4.7). Use whenever supported."
@echo " -flto=jobserver Utilize all CPUs during link time optimization. Requires ${MAKE} -j <cpus>"
@echo " -fno-stack-protector No stack checking. Smaller binaries."
@echo " -pipe Use pipes instead of temporary files (faster compilation, extends the life of your SSD)."
@echo " -DFD_SETSIZE=<x> Allow <x> -L statements in $(BASE_PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."

7
README
View file

@ -1,13 +1,14 @@
To view the documentation cd to the directory containing the distribution
files and type
man ./vlmcsd.8
man man/vlmcsd.8
to see documentation for vlmcsd
man ./vlmcs.1
man man/vlmcs.1
to see documentation for vlmcs
man ./vlmcsd.7
man man/vlmcsd.7
to see general documentation for kms
If you don't have man, you may also use the .txt, .html and .pdf files
in the man directory

1
debian Submodule

@ -0,0 +1 @@
Subproject commit 96200e41ef8b25388b2fa0f78c29133424b2c425

1
docker Submodule

@ -0,0 +1 @@
Subproject commit 4195d04f687973a514e3fb663bd87161afd46697

149
etc/vlmcsd.ini Normal file
View file

@ -0,0 +1,149 @@
#
#
# Sample vlmcsd.ini
#
# 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.
# 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.
# 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.
#
# Set ePID/HwId for Windows explicitly
;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
;Office2010 = 06401-00096-199-222222-03-1033-17763.0000-2822018
# Set ePID/HwId for Office 2013 (including Visio and Project) explicitly
;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
;Office2016 = 06401-00206-437-444444-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
# Set ePID/HwId for Office 2019 (including Visio and Project) explicitly
;Office2019 = 06401-00206-666-666666-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
# Set ePID/HwId for Windows China Government (Enterprise G/GN) explicitly
;WinChinaGov = 06401-03858-000-555555-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
# Use a compatible VPN device to create a hidden local IPv4 address
# Command line: -O
# VPN = <VPN adapter name>[=<IPv4 address>][/<CIDR mask>][:<DHCP lease duration>]
# 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
# Use custom TCP port
# Command line: -P
# ***The Port directive only works if vlmcsd was compiled to use MS RPC or simple sockets
# ***Use Listen otherwise
;Port = 1234
# Listen on all IPv4 addresses (default port 1688)
# Command line: -L
# Does not work with MS RPC or simple sockets, use Port=
;Listen = 0.0.0.0:1688
# Listen on all IPv6 addresses (default port 1688)
# Command line: -L
;Listen = [::]:1688
# Listen on all private IP addresses and reject incoming requests from public IP addresses
# Command line: -o
# PublicIPProtectionLevel = 3
# Allow binding to foreign IP addresses
# Command line: -F0 and -F1
;FreeBind = true
# Randomize ePIDs at program start up (only those that are not explicitly specified)
# Command line: -r
;RandomizationLevel = 1
# Use a specific host build in ePIDs even if the ePID is randomized
# Command line: -H
;HostBuild = 17763
# Use a specific culture (1033 = English US) in ePIDs even if the ePID is randomized
# Command line: -C
;LCID = 1033
# Set a maximum of 4 workers (forked processes or threads)
# Command line: -m
;MaxWorkers = 4
# Disconnect users after 30 seconds of inactivity
# Command line: -t
;ConnectionTimeout = 30
# Disconnect clients immediately after each request
# Command line: -d and -k
;DisconnectClientsImmediately = yes
# Write a pid file (a file containing the process id of vlmcsd)
# Command line: -p
;PidFile = /var/run/vlmcsd.pid
# Load a KMS data file
# Command line: -j
;KmsData = /etc/vlmcsd.kmd
# Write log to /var/log/vlmcsd.log
# Command line: -l (-e and -f also override this directive)
;LogFile = /var/log/vlmcsd.log
# Don't include date and time in logs (default is true)
# Command line: -T0 and -T1
;LogDateAndTime = false
# Create a verbose log
# Command line: -v and -q
;LogVerbose = true
# Whitelist known products
# Command line: -K0, -K1, -K2, -K3
;WhiteListingLevel = 0
# Check that the client time is within +/- 4 hours of the system time
# Command line: -c0, -c1
;CheckClientTime = false
# Maintain a list of CMIDs
# Command line: -M0, -M1
;MaintainClients = false
# Start with empty CMID list (Requires MaintainClients = true)
# Command line: -E0, -E1
;StartEmpty = false
# Set activation interval to 2 hours
# Command line: -A
;ActivationInterval = 2h
# Set renewal interval to 7 days
# Command line: -R
;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 Normal file

Binary file not shown.

Binary file not shown.

369
helpers.c
View file

@ -1,369 +0,0 @@
/*
* Helper functions used by other modules
*/
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#ifndef _WIN32
#include <errno.h>
#endif // _WIN32
#include <getopt.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "helpers.h"
#include "output.h"
#include "endian.h"
#include "shared_globals.h"
/*
* UCS2 <-> UTF-8 functions
* All functions use little endian UCS2 since we only need it to communicate with Windows via RPC
*/
// Convert one character from UTF-8 to UCS2
// Returns 0xffff, if utf-8 evaluates to > 0xfffe (outside basic multilingual pane)
WCHAR utf8_to_ucs2_char (const unsigned char *input, const unsigned char **end_ptr)
{
*end_ptr = input;
if (input[0] == 0)
return ~0;
if (input[0] < 0x80) {
*end_ptr = input + 1;
return LE16(input[0]);
}
if ((input[0] & 0xE0) == 0xE0) {
if (input[1] == 0 || input[2] == 0)
return ~0;
*end_ptr = input + 3;
return
LE16((input[0] & 0x0F)<<12 |
(input[1] & 0x3F)<<6 |
(input[2] & 0x3F));
}
if ((input[0] & 0xC0) == 0xC0) {
if (input[1] == 0)
return ~0;
*end_ptr = input + 2;
return
LE16((input[0] & 0x1F)<<6 |
(input[1] & 0x3F));
}
return ~0;
}
// Convert one character from UCS2 to UTF-8
// Returns length of UTF-8 char (1, 2 or 3) or -1 on error (UTF-16 outside UCS2)
// char *utf8 must be large enough to hold 3 bytes
int ucs2_to_utf8_char (const WCHAR ucs2_le, char *utf8)
{
const WCHAR ucs2 = LE16(ucs2_le);
if (ucs2 < 0x80) {
utf8[0] = ucs2;
utf8[1] = '\0';
return 1;
}
if (ucs2 >= 0x80 && ucs2 < 0x800) {
utf8[0] = (ucs2 >> 6) | 0xC0;
utf8[1] = (ucs2 & 0x3F) | 0x80;
utf8[2] = '\0';
return 2;
}
if (ucs2 >= 0x800 && ucs2 < 0xFFFF) {
if (ucs2 >= 0xD800 && ucs2 <= 0xDFFF) {
/* Ill-formed (UTF-16 ouside of BMP) */
return -1;
}
utf8[0] = ((ucs2 >> 12) ) | 0xE0;
utf8[1] = ((ucs2 >> 6 ) & 0x3F) | 0x80;
utf8[2] = ((ucs2 ) & 0x3F) | 0x80;
utf8[3] = '\0';
return 3;
}
return -1;
}
// Converts UTF8 to UCS2. Returns size in bytes of the converted string or -1 on error
size_t utf8_to_ucs2(WCHAR* const ucs2_le, const char* const utf8, const size_t maxucs2, const size_t maxutf8)
{
const unsigned char* current_utf8 = (unsigned char*)utf8;
WCHAR* current_ucs2_le = ucs2_le;
for (; *current_utf8; current_ucs2_le++)
{
size_t size = (char*)current_utf8 - utf8;
if (size >= maxutf8) return (size_t)-1;
if (((*current_utf8 & 0xc0) == 0xc0) && (size >= maxutf8 - 1)) return (size_t)-1;
if (((*current_utf8 & 0xe0) == 0xe0) && (size >= maxutf8 - 2)) return (size_t)-1;
if (current_ucs2_le - ucs2_le >= (intptr_t)maxucs2 - 1) return (size_t)-1;
*current_ucs2_le = utf8_to_ucs2_char(current_utf8, &current_utf8);
current_ucs2_le[1] = 0;
if (*current_ucs2_le == (WCHAR)-1) return (size_t)-1;
}
return current_ucs2_le - ucs2_le;
}
// Converts UCS2 to UTF-8. Return TRUE or FALSE
BOOL ucs2_to_utf8(const WCHAR* const ucs2_le, char* utf8, size_t maxucs2, size_t maxutf8)
{
char utf8_char[4];
const WCHAR* current_ucs2 = ucs2_le;
unsigned int index_utf8 = 0;
for(*utf8 = 0; *current_ucs2; current_ucs2++)
{
if (current_ucs2 - ucs2_le > (intptr_t)maxucs2) return FALSE;
int len = ucs2_to_utf8_char(*current_ucs2, utf8_char);
if (index_utf8 + len > maxutf8) return FALSE;
strncat(utf8, utf8_char, len);
index_utf8+=len;
}
return TRUE;
}
/* End of UTF-8 <-> UCS2 conversion */
// Checks, whether a string is a valid integer number between min and max. Returns TRUE or FALSE. Puts int value in *value
BOOL stringToInt(const char *const szValue, const unsigned int min, const unsigned int max, unsigned int *const value)
{
char *nextchar;
errno = 0;
long long result = strtoll(szValue, &nextchar, 10);
if (errno || result < (long long)min || result > (long long)max || *nextchar)
{
return FALSE;
}
*value = (unsigned int)result;
return TRUE;
}
//Converts a String Guid to a host binary guid in host endianess
int_fast8_t string2Uuid(const char *const restrict input, GUID *const restrict guid)
{
int i;
if (strlen(input) < GUID_STRING_LENGTH) return FALSE;
if (input[8] != '-' || input[13] != '-' || input[18] != '-' || input[23] != '-') return FALSE;
for (i = 0; i < GUID_STRING_LENGTH; i++)
{
if (i == 8 || i == 13 || i == 18 || i == 23) continue;
const char c = toupper((int)input[i]);
if (c < '0' || c > 'F' || (c > '9' && c < 'A')) return FALSE;
}
char inputCopy[GUID_STRING_LENGTH + 1];
strncpy(inputCopy, input, GUID_STRING_LENGTH + 1);
inputCopy[8] = inputCopy[13] = inputCopy[18] = 0;
hex2bin((BYTE*)&guid->Data1, inputCopy, 8);
hex2bin((BYTE*)&guid->Data2, inputCopy + 9, 4);
hex2bin((BYTE*)&guid->Data3, inputCopy + 14, 4);
hex2bin(guid->Data4, input + 19, 16);
guid->Data1 = BE32(guid->Data1);
guid->Data2 = BE16(guid->Data2);
guid->Data3 = BE16(guid->Data3);
return TRUE;
}
// convert GUID to little-endian
void LEGUID(GUID *const restrict out, const GUID* const restrict in)
{
#if __BYTE_ORDER != __LITTLE_ENDIAN
out->Data1 = LE32(in->Data1);
out->Data2 = LE16(in->Data2);
out->Data3 = LE16(in->Data3);
memcpy(out->Data4, in->Data4, sizeof(out->Data4));
#else
memcpy(out, in, sizeof(GUID));
#endif
}
//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)
{
unsigned int result;
if (!stringToInt(optarg, min, max, &result))
{
printerrorf("Fatal: Option \"-%c\" must be numeric between %u and %u.\n", o, min, max);
exit(!0);
}
return result;
}
// Resets getopt() to start parsing from the beginning
void optReset(void)
{
#if __minix__ || defined(__BSD__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
optind = 1;
optreset = 1; // Makes newer BSD getopt happy
#elif defined(__UCLIBC__) // uClibc headers also define __GLIBC__ so be careful here
optind = 0; // uClibc seeks compatibility with GLIBC
#elif defined(__GLIBC__)
optind = 0; // Makes GLIBC getopt happy
#else // Standard for most systems
optind = 1;
#endif
}
#if defined(_WIN32) || defined(USE_MSRPC)
// Returns a static message buffer containing text for a given Win32 error. Not thread safe (same as strerror)
char* win_strerror(const int message)
{
#define STRERROR_BUFFER_SIZE 256
static char buffer[STRERROR_BUFFER_SIZE];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, message, 0, buffer, STRERROR_BUFFER_SIZE, NULL);
return buffer;
}
#endif // defined(_WIN32) || defined(USE_MSRPC)
/*
* parses an address in the form host:[port] in addr
* returns host and port in seperate strings
*/
void parseAddress(char *const addr, char** szHost, char** szPort)
{
*szHost = addr;
# ifndef NO_SOCKETS
*szPort = (char*)defaultport;
# else // NO_SOCKETS
*szPort = "1688";
# endif // NO_SOCKETS
char *lastcolon = strrchr(addr, ':');
char *firstcolon = strchr(addr, ':');
char *closingbracket = strrchr(addr, ']');
if (*addr == '[' && closingbracket) //Address in brackets
{
*closingbracket = 0;
(*szHost)++;
if (closingbracket[1] == ':')
*szPort = closingbracket + 2;
}
else if (firstcolon && firstcolon == lastcolon) //IPv4 address or hostname with port
{
*firstcolon = 0;
*szPort = firstcolon + 1;
}
}
// Initialize random generator (needs to be done in each thread)
void randomNumberInit()
{
struct timeval tv;
gettimeofday(&tv, NULL);
srand((unsigned int)(tv.tv_sec ^ tv.tv_usec));
}
// We always exit immediately if any OOM condition occurs
__noreturn void OutOfMemory(void)
{
errorout("Fatal: Out of memory");
exit(!0);
}
void* vlmcsd_malloc(size_t len)
{
void* buf = malloc(len);
if (!buf) OutOfMemory();
return buf;
}
/*
* Converts hex digits to bytes in big-endian order.
* Ignores any non-hex characters
*/
void hex2bin(BYTE *const bin, const char *hex, const size_t maxbin)
{
static const char *const hexdigits = "0123456789ABCDEF";
char* nextchar;
size_t i;
for (i = 0; (i < 16) && utf8_to_ucs2_char((const unsigned char*)hex, (const unsigned char**)&nextchar) != (WCHAR)-1; hex = nextchar)
{
const char* pos = strchr(hexdigits, toupper((int)*hex));
if (!pos) continue;
if (!(i & 1)) bin[i >> 1] = 0;
bin[i >> 1] |= (char)(pos - hexdigits);
if (!(i & 1)) bin[i >> 1] <<= 4;
i++;
if (i >> 1 > maxbin) break;
}
}
__pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument)
{
if (
!strncasecmp(argument, "true", 4) ||
!strncasecmp(argument, "on", 2) ||
!strncasecmp(argument, "yes", 3) ||
!strncasecmp(argument, "1", 1)
)
{
*result = TRUE;
return TRUE;
}
else if (
!strncasecmp(argument, "false", 5) ||
!strncasecmp(argument, "off", 3) ||
!strncasecmp(argument, "no", 2) ||
!strncasecmp(argument, "0", 1)
)
{
*result = FALSE;
return TRUE;
}
return FALSE;
}

1118
kms.c

File diff suppressed because it is too large Load diff

117
libkms.c
View file

@ -1,117 +0,0 @@
/*
* libkms.c
*/
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#define EXTERNAL dllexport
#define DLLVERSION 0x30000
#include "libkms.h"
#include "shared_globals.h"
#include "network.h"
#include "helpers.h"
#ifndef _WIN32
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <netinet/in.h>
#endif // WIN32
static int_fast8_t IsServerStarted = FALSE;
EXTERNC __declspec(EXTERNAL) DWORD __cdecl SendActivationRequest
(
const char* const hostname,
const int port,
RESPONSE* baseResponse,
const REQUEST* const baseRequest,
RESPONSE_RESULT* result, BYTE *hwid
)
{
return !0; // not yet implemented
}
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, RequestCallback_t requestCallback)
{
char listenAddress[64];
if (IsServerStarted) return !0;
# ifdef _WIN32
# ifndef USE_MSRPC
// Windows Sockets must be initialized
WSADATA wsadata;
int error;
if ((error = WSAStartup(0x0202, &wsadata)))
{
return error;
}
# endif // USE_MSRPC
# endif // _WIN32
CreateResponseBase = requestCallback;
int maxsockets = 0;
int_fast8_t haveIPv4 = FALSE;
int_fast8_t haveIPv6 = FALSE;
if (checkProtocolStack(AF_INET)) { haveIPv4 = TRUE; maxsockets++; }
if (checkProtocolStack(AF_INET6)) { haveIPv6 = TRUE; maxsockets++; }
if(!maxsockets) return !0;
SocketList = (SOCKET*)vlmcsd_malloc(sizeof(SOCKET) * (size_t)maxsockets);
numsockets = 0;
if (haveIPv4)
{
snprintf(listenAddress, 64, "0.0.0.0:%u", (unsigned int)port);
addListeningSocket(listenAddress);
}
if (haveIPv6)
{
snprintf(listenAddress, 64, "[::]:%u", (unsigned int)port);
addListeningSocket(listenAddress);
}
if (!numsockets)
{
free(SocketList);
return !0;
}
IsServerStarted = TRUE;
runServer();
IsServerStarted = FALSE;
return 0;
}
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StopKmsServer()
{
if (!IsServerStarted) return !0;
closeAllListeningSockets();
if (SocketList) free(SocketList);
return 0;
}
EXTERNC __declspec(EXTERNAL) int __cdecl GetLibKmsVersion()
{
return DLLVERSION;
}

View file

@ -1,33 +0,0 @@
/*
* libkms.h
*/
#ifndef LIBKMS_H_
#define LIBKMS_H_
#include "types.h"
#include "kms.h"
#include "rpc.h"
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#endif
#if !defined(_WIN32) && !__CYGWIN__
#define __declspec(x) __attribute__((__visibility__("default")))
#endif
#if !defined(EXTERNAL)
#define EXTERNAL dllimport
#endif
EXTERNC __declspec(EXTERNAL) DWORD __cdecl SendActivationRequest(const char* const hostname, const int port, RESPONSE* baseResponse, const REQUEST* const baseRequest, RESPONSE_RESULT* result, BYTE *hwid);
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StartKmsServer(const int port, RequestCallback_t requestCallback);
EXTERNC __declspec(EXTERNAL) DWORD __cdecl StopKmsServer();
EXTERNC __declspec(EXTERNAL) int __cdecl GetLibKmsVersion();
//EXTERN_C __declspec(EXTERNAL) unsigned int __cdecl GetRandom32();
#endif /* LIBKMS_H_ */

View file

@ -1,31 +0,0 @@
#!/usr/local/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
gmake $MAKEFLAGS PROGRAM_NAME=vlmcsd-DragonFly-x64 CLIENT_NAME=vlmcs-DragonFly-x64 CFLAGS="$CF" LDFLAGS="$LF"
rm vlmcsd.o vlmcs.o
gmake vlmcsdmulti-DragonFly-x64 $REUSEOBJFLAGS CFLAGS="$CF" LDFLAGS="$LF" MULTI_NAME=vlmcsdmulti-DragonFly-x64
rm *.o
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
cp -af vlmcsd-DragonFly-x64 /usr/local/sbin/vlmcsd
cp -af vlmcs-DragonFly-x64 /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/DragonFly/intel/

View file

@ -1,46 +0,0 @@
#!/usr/local/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x64-gcc CLIENT_NAME=vlmcs-FreeBSD-10.2-x64-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-gcc CC=gcc5 CFLAGS="$CF" LDFLAGS="$LF"
gmake $MAKEFLAGS CLIENT_NAME=vlmcs-FreeBSD-10.2-x64 PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64 CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="$LF"
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
gmake $REUSEOBJFLAGS vlmcsdmulti-FreeBSD-10.2-x64 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x64 CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="$LF"
gmake $MAKEFLAGS CLIENT_NAME=vlmcs-FreeBSD-10.2-x86 PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86 CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
gmake $REUSEOBJFLAGS vlmcsdmulti-FreeBSD-10.2-x86 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x86 CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
gmake $MAKEFLAGS allmulti CAT=2 MULTI_NAME=vlmcsdmulti-FreeBSD-10.2-x86-gcc CLIENT_NAME=vlmcs-FreeBSD-10.2-x86-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-gcc CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.2-x64-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.2-x64-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-threads THREADS=1 CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS vlmcsd-FreeBSD-10.2-x86-threads PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-threads THREADS=1 CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS CAT=2 vlmcsd-FreeBSD-10.2-x86-threads-gcc PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-threads-gcc THREADS=1 CC=gcc5 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.2-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x64-openssl1.0.1-EXPERIMENTAL CC=clang36 CFLAGS="$CFCLANG" LDFLAGS="$LF"
gmake $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=vlmcs-FreeBSD-10.2-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=vlmcsd-FreeBSD-10.2-x86-openssl1.0.1-EXPERIMENTAL CC=clang36 CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
rm *.o
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
sudo cp -af vlmcsd-FreeBSD-10.2-x86-gcc /usr/local/sbin/vlmcsd
sudo cp -af vlmcs-FreeBSD-10.2-x86-gcc /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/FreeBSD/intel/

3512
make_linux

File diff suppressed because it is too large Load diff

View file

@ -1,50 +0,0 @@
#!/bin/bash
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"
export CFLAGS="$SMALLCC"
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m31 -mesa -mpacked-stack -msmall-exec"
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
export THREADS=0
export FEATURES=full
export MULTI_NAME=vlmcsdmulti-s390-glibc
export CLIENT_NAME=vlmcs-s390-glibc
export PROGRAM_NAME=vlmcsd-s390-glibc
make -B -j`nproc` $CLIENT_NAME $PROGRAM_NAME
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
make -j`nproc` $MULTI_NAME
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
export MULTI_NAME=vlmcsdmulti-s390x-glibc
export CLIENT_NAME=vlmcs-s390x-glibc
export PROGRAM_NAME=vlmcsd-s390x-glibc
make -B -j`nproc` $CLIENT_NAME $PROGRAM_NAME
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
make -j`nproc` $MULTI_NAME
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
cp -af vlmcsd-s390-glibc /usr/local/sbin/vlmcsd
cp -af vlmcs-s390-glibc /usr/local/bin/vlmcs
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
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

View file

@ -1,25 +0,0 @@
#!/bin/sh
export VLMCSD_VERSION=svn$(ssh root@ubuntu64.internal "cd x; svnversion")
scp -p make_minix root@ubuntu64.internal:x
scp -pr root@ubuntu64.internal:x/* .
# Compile vlmcsd binaries for Minix 3
SUFFIX=-minix-$(uname -r)-x86
export CC=clang
export CFLAGS="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
export LDFLAGS="-Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
export PROGRAM_NAME=vlmcsd$SUFFIX
export CLIENT_NAME=vlmcs$SUFFIX
export MULTI_NAME=vlmcsdmulti$SUFFIX
gmake clean
gmake -B
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
gmake $MULTI_NAME
strip -s --strip-unneeded --remove-section .eh_frame_hdr --remove-section .eh_frame --remove-section .ident --remove-section .note.minix.ident --remove-section .note.netbsd.pax --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag *$SUFFIX
scp -p *$SUFFIX root@ubuntu64.internal:x/binaries/Minix/intel/

View file

@ -1,35 +0,0 @@
#!/usr/pkg/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
gmake $MAKEFLAGS CC=/usr/pkg/gcc49/bin/gcc PROGRAM_NAME=vlmcsd-NetBSD-x64 CLIENT_NAME=vlmcs-NetBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
rm vlmcsd.o vlmcs.o
gmake vlmcsdmulti-NetBSD-x64 $REUSEOBJFLAGS CC=/usr/pkg/gcc49/bin/gcc CFLAGS="$CF" LDFLAGS="$LF" MULTI_NAME=vlmcsdmulti-NetBSD-x64
gmake allmulti $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=vlmcsd-NetBSD-x86 CLIENT_NAME=vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-NetBSD-x64-clang CLIENT_NAME=vlmcs-NetBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
rm *.o
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
cp -af vlmcsd-NetBSD-x86 /usr/local/sbin/vlmcsd
cp -af vlmcs-NetBSD-x86 /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/NetBSD/intel/

View file

@ -1,33 +0,0 @@
#!/usr/local/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CF45="-static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro"
LFCLANG="-Wl,-z,norelro"
gmake allmulti CAT=2 $MAKEFLAGS CC=egcc MULTI_NAME=vlmcsdmulti-OpenBSD-x64 PROGRAM_NAME=vlmcsd-OpenBSD-x64 CLIENT_NAME=vlmcs-OpenBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
#gmake allmulti $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-OpenBSD-x86 PROGRAM_NAME=vlmcsd-OpenBSD-x86 CLIENT_NAME=vlmcs-OpenBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-OpenBSD-x64-clang CLIENT_NAME=vlmcs-OpenBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
rm *.o
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
cp -f vlmcsd-OpenBSD-x64 /usr/local/sbin/vlmcsd
cp -f vlmcs-OpenBSD-x64 /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/OpenBSD/intel/

View file

@ -1,97 +0,0 @@
#!/bin/bash
export VERBOSE=3
export DNS_PARSER=OS
rm vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm vlmcsd vlmcs vlmcsdmulti 2>/dev/null
MAKEFLAGS="-j -B"
REUSEOBJFLAGS="-j"
CFGCC="-static-libgcc -mdynamic-no-pic -Os -flto=jobserver -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-mdynamic-no-pic -Os -flto -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFGCC42="-static-libgcc -mdynamic-no-pic -Os -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86 PROGRAM_NAME=vlmcsd-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x86 MULTI_NAME=vlmcsdmulti-MacOSX-x86 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS vlmcsd-MacOSX-x86-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x86-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64 PROGRAM_NAME=vlmcsd-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x64 MULTI_NAME=vlmcsdmulti-MacOSX-x64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
make $MAKEFLAGS vlmcsd-MacOSX-x64-threads THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x64-threads CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.0" && \
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.4" && \
#make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64-openssl-EXPERIMENTAL PROGRAM_NAME=vlmcsd-MacOSX-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes_soft CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.4" && \
#make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-7.1-armv7 PROGRAM_NAME=vlmcsd-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
#make $REUSEOBJFLAGS vlmcsdmulti-iOS-7.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-7.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" && \
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-9.1-armv7 PROGRAM_NAME=vlmcsd-iOS-9.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-iOS-9.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-9.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-9.1-armv8-aarch64 PROGRAM_NAME=vlmcsd-iOS-9.1-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-iOS-9.1-armv8-aarch64 MULTI_NAME=vlmcsdmulti-iOS-9.1-armv8-aarch64 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-m64 -arch arm64 -miphoneos-version-min=7.0 -isysroot ~/toolchains/iPhoneOS9.1.sdk" && \
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-6.1-armv7 PROGRAM_NAME=vlmcsd-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-iOS-6.1-armv7 MULTI_NAME=vlmcsdmulti-iOS-6.1-armv7 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS6.1.sdk -isysroot ~/toolchains/iPhoneOS6.1.sdk" && \
make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-5.1-armv7-clang3.4 PROGRAM_NAME=vlmcsd-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-iOS-5.1-armv7-clang3.4 MULTI_NAME=vlmcsdmulti-iOS-5.1-armv7-clang3.4 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-mthumb -m32 -arch armv7 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
#PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH clang --version
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-5.1-armv6-clang3.1 PROGRAM_NAME=vlmcsd-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
PATH=~/toolchains/iOS5.1-MacOS-Lion/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-5.1-armv6-clang3.1 MULTI_NAME=vlmcsdmulti-iOS-5.1-armv6-clang3.1 CC=clang CFLAGS="$CFCLANG" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS5.1.sdk -isysroot ~/toolchains/iPhoneOS5.1.sdk" && \
#PATH=~/toolchains/gcc4.2/usr/bin/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-4.1-armv6-llvm-gcc4.2 PROGRAM_NAME=vlmcsd-iOS-4.1-armv6-llvm-gcc4.2 CC=llvm-g++-4.2 CFLAGS="$CFGCC42" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS4.1.sdk -isysroot ~/toolchains/iPhoneOS4.1.sdk" && \
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
#PATH=~/toolchains/gcc4.2/usr/bin/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-4.1-armv6-llvm-gcc4.2 MULTI_NAME=vlmcsdmulti-iOS-4.1-armv6-llvm-gcc4.2 CC=llvm-g++-4.2 CFLAGS="$CFGCC42" PLATFORMFLAGS="-arch armv6 -miphoneos-version-min=1.0 --sysroot ~/toolchains/iPhoneOS4.1.sdk -isysroot ~/toolchains/iPhoneOS4.1.sdk" && \
#PATH=~/toolchains/gcc4.2/usr/bin:$PATH make $MAKEFLAGS CLIENT_NAME=vlmcs-iOS-4.1-armv7-clang PROGRAM_NAME=vlmcsd-iOS-4.1-armv7-llvm-clang CC=~/toolchains/gcc4.2/usr/bin/bin/clang CFLAGS="$CFGCC42" PLATFORMFLAGS="-mthumb -arch armv7 -miphoneos-version-min=4.1 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk" && \
#rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o && \
#PATH=~/toolchains/gcc4.2/usr/bin:$PATH make $REUSEOBJFLAGS vlmcsdmulti-iOS-4.1-armv7-llvm-clang MULTI_NAME=vlmcsdmulti-iOS-4.1-armv7-llvm-clang CC=~/toolchains/gcc4.2/usr/bin/bin/clang CFLAGS="$CFGCC42" PLATFORMFLAGS="-mthumb -arch armv7 -miphoneos-version-min=4.1 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk" && \
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -Bj PROGRAM_NAME=vlmcsd-MacOSX-ppc CLIENT_NAME=vlmcs-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
PATH=~/toolchains/gcc4.2/usr/bin:$PATH make -j vlmcsdmulti-MacOSX-ppc MULTI_NAME=vlmcsdmulti-MacOSX-ppc CC=gcc CFLAGS="$CFGCC42 -isysroot ~/toolchains/MacOSX10.5.sdk -arch ppc -mmacosx-version-min=10.0"
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x86-gcc PROGRAM_NAME=vlmcsd-MacOSX-x86-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x86-gcc MULTI_NAME=vlmcsdmulti-MacOSX-x86-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS vlmcsd-MacOSX-x86-threads-gcc THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x86-threads-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m32 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS CLIENT_NAME=vlmcs-MacOSX-x64-gcc PROGRAM_NAME=vlmcsd-MacOSX-x64-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.* && \
make $REUSEOBJFLAGS vlmcsdmulti-MacOSX-x64-gcc MULTI_NAME=vlmcsdmulti-MacOSX-x64-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
make $MAKEFLAGS vlmcsd-MacOSX-x64-threads-gcc THREADS=1 PROGRAM_NAME=vlmcsd-MacOSX-x64-threads-gcc CC=gcc-5 CFLAGS="$CFGCC" PLATFORMFLAGS="-m64 -march=core2 -mmacosx-version-min=10.11" && \
# Sign the iOS binaries
#ldid -S *iOS*
#strip vlmcs-* vlmcsd-* vlmcsdmulti-*
rm -f *.o *_all.*
rm -fr *.dSYM
sudo cp -p vlmcs-MacOSX-x86-gcc /usr/local/bin/vlmcs
sudo cp -p vlmcsd-MacOSX-x86-gcc /usr/local/bin/vlmcsd
sudo mkdir -p /usr/local/share/man/man8
sudo mkdir -p /usr/local/share/man/man1
sudo mkdir -p /usr/local/share/man/man7
sudo mkdir -p /usr/local/share/man/man5
sudo cp -p vlmcsd.8 /usr/local/share/man/man8
sudo cp -p vlmcs.1 vlmcsdmulti.1 /usr/local/share/man/man1
sudo cp -p vlmcsd.7 /usr/local/share/man/man7
sudo cp -p vlmcsd.ini.5 //usr/local/share/man/man5
# Copy the stuff to distribution server
scp -p vlmcsd-MacOSX-x* vlmcs-MacOSX-x* vlmcsdmulti-MacOSX-x* root@ubuntu64:x/binaries/MacOSX/intel
scp -p vlmcsd-MacOSX-ppc* vlmcs-MacOSX-ppc* vlmcsdmulti-MacOSX-ppc* root@ubuntu64:x/binaries/MacOSX/ppc
scp -p vlmcsd-iOS* vlmcs-iOS* vlmcsdmulti-iOS* root@ubuntu64:x/binaries/iOS/arm

View file

@ -1,57 +0,0 @@
#!/bin/sh
export VERBOSE=3
export CAT=2
if [ `uname -s` != "SunOS" ]; then
echo "This is no SunOS operating system."
exit 3
fi
SOLARIS_VERSION=`uname -v`
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
rm -f vlmcsdmulti vlmcsd vlmcs 2>/dev/null
MAKEFLAGS="-B -j`nproc`"
REUSEOBJFLAGS="-j`nproc`"
CF="-fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants -Wno-char-subscripts"
LF="-fwhole-program -Wl,-z,norelro -Wl,--hash-style=sysv -Wl,--build-id=none"
# 32 bit
if [ "$CAT" != "" ]; then
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcs-Solaris$SOLARIS_VERSION-x86 vlmcsd-Solaris$SOLARIS_VERSION-x86 vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
else
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
gmake $REUSEOBJFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x86 CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
fi
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd-Solaris$SOLARIS_VERSION-x86-threads PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x86-openssl1.0-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x86-openssl1.0-EXPERIMENTAL CC=gcc CFLAGS="$CF" LDFLAGS="$LF"
# 64 bit
LF="$LF -Wl,-melf_x86_64_sol2"
if [ "$CAT" != "" ]; then
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 vlmcs-Solaris$SOLARIS_VERSION-x64 vlmcsd-Solaris$SOLARIS_VERSION-x64 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
else
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64 PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
rm -f vlmcs.o vlmcsd.o vlmcsdmulti.o *_all.*
gmake $REUSEOBJFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 MULTI_NAME=vlmcsdmulti-Solaris$SOLARIS_VERSION-x64 CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
fi
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld vlmcsd-Solaris$SOLARIS_VERSION-x64-threads PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64-threads CC=gcc THREADS=1 CFLAGS="$CF" LDFLAGS="$LF -lpthread" PLATFORMFLAGS="-m64"
gmake $MAKEFLAGS LD_ALTEXEC=/usr/bin/gld CLIENT_NAME=vlmcs-Solaris$SOLARIS_VERSION-x64-openssl1.0-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-Solaris$SOLARIS_VERSION-x64-openssl1.0-EXPERIMENTAL CC=gcc CFLAGS="$CF" LDFLAGS="$LF" PLATFORMFLAGS="-m64"
rm -f *.o *_all.*
gstrip -s --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-*
#gstrip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-*
#sstrip -z vlmcs-* vlmcsd-*
# Copy stuff to distribution server
scp -p vlmcsd-* vlmcs-* vlmcsdmulti-* root@ubuntu64:x/binaries/Solaris/intel

View file

@ -1,79 +0,0 @@
#!/bin/bash
rm -f cygkms*.dll libkms*.dll vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* vlmcsd.exe vlmcs.exe vlmcsdmulti.exe 2> /dev/null
export CAT=2
export VERBOSE=3
NUMCPU=`cat /proc/cpuinfo | grep "processor" | wc -l`
CF="-Wno-missing-braces -fno-common -fno-exceptions -fno-non-call-exceptions -fno-stack-protector -fmerge-all-constants -fno-unwind-tables -fno-asynchronous-unwind-tables -pipe"
CFMSRPC="-Wno-missing-braces -Wno-unused-variable $CF" # -fno-common -fno-stack-protector -fmerge-all-constants -pipe"
PF32=""
PF64="-mpreferred-stack-boundary=4 -march=nocona -mtune=generic"
LFCYG32="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
LFWIN32="-fwhole-program -lws2_32 -Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
LFCYG64="-fwhole-program -Wl,--nxcompat,--dynamicbase,--tsaware"
LFWIN64="-fwhole-program -lws2_32 -Wl,--nxcompat,--dynamicbase,--tsaware"
MAKEFLAGS="-j$NUMCPU -B"
REUSEFLAGS="-j$NUMCPU"
make $MAKEFLAGS cygkms32.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms32.dll DNS_PARSER=internal CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS cygkms64.dll FEATURES=minimum THREADS=1 DLL_NAME=cygkms64.dll DNS_PARSER=internal CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
make $MAKEFLAGS all vlmcsdmulti-cygwin-x86 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x86 PROGRAM_NAME=vlmcsd-cygwin-x86 MULTI_NAME=vlmcsdmulti-cygwin-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS all vlmcsdmulti-cygwin-x64 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-x64 PROGRAM_NAME=vlmcsd-cygwin-x64 MULTI_NAME=vlmcsdmulti-cygwin-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x86 PROGRAM_NAME=vlmcsd-cygwin-msrpc-x86 MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CF -fasynchronous-unwind-tables" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
make $MAKEFLAGS MSRPC=1 THREADS=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x64 PROGRAM_NAME=vlmcsd-cygwin-msrpc-x64 MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
unset CAT
make $MAKEFLAGS vlmcsdmulti-cygwin-msrpc-x64 MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x64 CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
make $MAKEFLAGS vlmcsdmulti-cygwin-msrpc-x86 MSRPC=1 THREADS=1 DNS_PARSER=internal MULTI_NAME=vlmcsdmulti-cygwin-msrpc-x86 CC=i686-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC -flto=jobserver" PLATFORMFLAGS="$PF32" LDFLAGS="$LFCYG32"
export CAT=2
make $MAKEFLAGS THREADS=1 MSRPC=1 DNS_PARSER=internal CLIENT_NAME=vlmcs-cygwin-msrpc-x86-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=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=vlmcs-cygwin-msrpc-x64-openssl-EXPERIMENTAL CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-cygwin-x64-openssl-EXPERIMENTAL CC=x86_64-pc-cygwin-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
export CAT=2
make $MAKEFLAGS libkms32.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms32.dll CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF32" LDFLAGS="-static-libgcc $LFWIN32"
make $MAKEFLAGS libkms64.dll CRYPTO=windows FEATURES=minimum THREADS=1 DLL_NAME=libkms64.dll CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF -flto=jobserver -fvisibility=hidden" PLATFORMFLAGS="$PF64" LDFLAGS="-static-libgcc $LFWIN64"
make $MAKEFLAGS all vlmcsdmulti-Windows-x86 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x86 PROGRAM_NAME=vlmcsd-Windows-x86 MULTI_NAME=vlmcsdmulti-Windows-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF32" LDFLAGS="$LFWIN32"
make $MAKEFLAGS all vlmcsdmulti-Windows-x64 THREADS=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-x64 PROGRAM_NAME=vlmcsd-Windows-x64 MULTI_NAME=vlmcsdmulti-Windows-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CF" PLATFORMFLAGS="$PF64" LDFLAGS="$LFWIN64"
make -Bj MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x86 PROGRAM_NAME=vlmcsd-Windows-msrpc-x86 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
make $MAKEFLAGS THREADS=1 MSRPC=1 CRYPTO=windows CLIENT_NAME=vlmcs-Windows-msrpc-x64 PROGRAM_NAME=vlmcsd-Windows-msrpc-x64 MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
unset CAT
make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x86 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x86 CC=i686-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF32" LDFLAGS="-Wl,--nxcompat,--dynamicbase,--tsaware,--large-address-aware"
make $MAKEFLAGS vlmcsdmulti-Windows-msrpc-x64 THREADS=1 MSRPC=1 CRYPTO=windows MULTI_NAME=vlmcsdmulti-Windows-msrpc-x64 CC=x86_64-w64-MingW32-gcc.exe CFLAGS="$CFMSRPC" PLATFORMFLAGS="$PF64" LDFLAGS="$LFCYG64"
export CAT=2
rm -f *_all.* *.o 2> /dev/null &
echo ""
echo "Installing binaries"
cp -p vlmcs-cygwin-x64.exe /usr/local/bin/vlmcs &
cp -p vlmcsd-cygwin-x64.exe /usr/local/bin/vlmcsd &
cp -p cygkms64.dll /usr/local/bin/cygkms.dll &
cp -p libkms32.dll /cygdrive/c/nttools/x86 &
cp -p libkms64.dll /cygdrive/c/nttools/x64 &
cp -p vlmcsdmulti-Windows-x86.exe /cygdrive/c/nttools/x86/vlmcsdmulti.exe
cmd /C mklink c:\\nttools\\x86\\vlmcsd.exe vlmcsdmulti.exe 2> /dev/null &
cmd /C mklink c:\\nttools\\x86\\vlmcs.exe vlmcsdmulti.exe 2> /dev/null &
echo "Installing man pages"
mkdir -p /usr/share/man/man8
mkdir -p /usr/share/man/man1
mkdir -p /usr/share/man/man7
mkdir -p /usr/share/man/man5
cp -p vlmcsd.7 /usr/share/man/man7
cp -p vlmcsd.8 /usr/share/man/man8
cp -p vlmcsd.ini.5 /usr/share/man/man5
cp -p vlmcs.1 vlmcsdmulti.1 /usr/share/man/man1
bzip2 -f /usr/share/man/man5/vlmcsd.ini.5 /usr/share/man/man7/vlmcsd.7 /usr/share/man/man8/vlmcsd.8 /usr/share/man/man1/vlmcs.1 /usr/share/man/man1/vlmcsdmulti.1 &
# Copy stuff to distribution server
scp -p vlmcsd-* vlmcs-* vlmcsdmulti-* *.dll root@ubuntu64:x/binaries/Windows/intel

View file

@ -1,17 +0,0 @@
#!/bin/bash
#
# To use on x64 hosted native multilib compiler toolchain
#
rm vlmcsd-*
rm vlmcsd
MAKEFLAGS="-j -B"
make $MAKEFLAGS PROGRAM_NAME=vlmcsd-mingw64-x86 CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto -m32" "PLATFORMFLAGS=-march=i686 -mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
make $MAKEFLAGS PROGRAM_NAME=vlmcsd-mingw64-x64 CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto" "PLATFORMFLAGS=-mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
make $MAKEFLAGS CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-mingw64-x86-openssl CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto -m32" "PLATFORMFLAGS=-march=i686 -mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
make $MAKEFLAGS CRYPTO=openssl_with_aes PROGRAM_NAME=vlmcsd-mingw64-x64-openssl CC=x86_64-w64-mingw32-gcc.exe CFLAGS="-flto" "PLATFORMFLAGS=-mtune=generic" "LDFLAGS=-lcrypto -lz -lkernel32 -ladvapi32 -lws2_32 -lgdi32"
rm *.o

44
man/GNUmakefile Normal file
View file

@ -0,0 +1,44 @@
################################################################################
.PHONY: clean
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
%.pdf : %
ifeq ($(shell uname), Darwin)
groff -Tps -mandoc -c $< | pstopdf -i -o $@
else
groff -Tpdf -mandoc -c $< > $@
endif
%.html : %
groff -Thtml -mandoc -c $< > $@
%.unix.txt : %
groff -P -c -Tascii -mandoc -c $< | col -bx > $@
%.dos.txt : %.unix.txt
# unix2dos -n $< $@
# sed -e 's/$$/\r/' $< > $@
awk 'sub("$$", "\r")' $< > $@
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
pdfdocs : $(PDFDOCS)
dosdocs : $(DOSDOCS)
unixdocs : $(UNIXDOCS)
htmldocs : $(HTMLDOCS)
clean:
rm -f $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS)
help:
@echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."

View file

@ -1,5 +1,5 @@
.mso www.tmac
.TH VLMCS 1 "February 2015" "Hotbird64" "KMS Activation Manual"
.TH VLMCS 1 "November 2016" "Hotbird64" "KMS Activation Manual"
.LO 1
.SH NAME
@ -11,7 +11,7 @@ vlmcs \- a client for testing and/or charging KMS servers
\fItarget\fR can be one of the following:
.RS
.PP
\fIhostname\fR|\fIipaddress\fR[:\fItcp-port\fR] or to query a specific KMS server (example: vlmcs kms.example.com:1688).
\fIhostname\fR|\fIipaddress\fR[:\fItcp-port\fR] to query a specific KMS server (example: vlmcs kms.example.com:1688).
.br
\fR.\fIdomain\fR to automatically detect KMS servers via DNS for \fIdomain\fR (example: vlmcs .example.com). Please note the dot before \fIdomain\fR.
.br
@ -44,6 +44,9 @@ can also be used to "charge" a KMS server. A Microsoft KMS server sends correct
.IP "\fB-h\fR or \fB-?"
Show help.
.IP "\fB-V\fR"
Displays extended version information. This includes the compiler used to build vlmcs, the intended platform and flags (compile time options) to build vlmcs. If you have the source code of vlmcsd, you can type \fBmake help\fR (or \fBgmake help\fR on systems that do not use the GNU version of \fBmake\fR(1) by default) to see the meaning of those flags.
.IP \fB-x
Show valid
.IR application s
@ -72,11 +75,16 @@ to specify applications that are not listed with \fB-x\fR. The
.B -l
option is used as a shortcut for the most common applications.
.IP "\fB-K\fR \fIprotocol-version\fR"
Force a specific version of the KMS protocol. Valid versions are 4.0, 5.0 and 6.0. The default is to select a suitable version according to the \fIapplication\fR selected. You may use \fB-K\fR to send an incorrect protocol version to the KMS server and see how it behaves. Genuine KMS servers return HRESULT 0x8007000D if the KMS protocol is not 4.0, 5.0 or 6.0. Emulators should do the same. When sending a request with an incorrect protocol number, 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 sends a v4 request. If the major version is greater then 6, it sends a v6 request. In any case the \fIprotocol-version\fR as specified by \fB-K\fR is put in the version fields of the request.
.IP "\fB-4\fR, \fB-5\fR and \fB-6"
Force version 4, 5 or 6 of the KMS protocol. The default is to select a suitable
version according to the
.IR "application"
selected. Plese note that some products (e.g. Office 2013) may use different protocols with different versions of Windows.
Force version 4, 5 or 6 of the KMS protocol. These options are actually shortcuts of \fB-K 4.0\fR, \fB-K 5.0\fR and \fB-K 6.0\fR.
.IP "\fB-j\fR \fIfilename\fR"
Use KMS data file \fIfilename\fR. By default vlmcs contains product data that is recent when vlmcs was compiled. You may use a more recent KMS data file that contains additional products.
If vlmcsd has been compiled to use a default KMS data file, you may use \fB-j-\fR to ignore the default configuration file.
.IP "\fB-m"
Let the client pretend to be a virtual machine. Early versions of Microsoft's

304
man/vlmcsd-floppy.7 Normal file
View file

@ -0,0 +1,304 @@
.mso www.tmac
.TH "VLMCSD-FLOPPY" 7 "February 2019" "Hotbird64" "KMS Activation Manual"
.LO 8
.SH NAME
floppy144.vfd \- a bootable floppy disk with Linux and \fBvlmcsd\fR(8)
.SH DESCRIPTION
\fBfloppy144.vfd\fR is an image of a bootable floppy that contains a minimal version of Linux and \fBvlmcsd\fR(8). It requires only 16 MB of RAM. Its primary purpose is to run \fBvlmcsd\fR(8) in a small virtual machine which makes it easy to use \fBvlmcsd\fR(8) to activate the virtual machine's host computer 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 FAT12 filesystem. The floppy can be mounted to apply several customizations.
.SH SUPPORTED HYPERVISORS
The floppy image has been tested with the following hypervisors:
.IP
VMWare, VirtualBox, Hyper-V and QEMU
.RE
Others are likely to work.
.SH SETUP
Create a new virtual machine. Assign 16 MB of RAM. Add a floppy drive and attach \fBfloppy144.vfd\fR to this drive. Do not create a virtual hard disk. Setup the virtual machine to boot from a floppy drive (VirtualBox 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, enable the compatibility support mode (CSM) to allow a BIOS compatible boot. Set number of CPUs to 1. The Linux kernel is not capable of SMP. Remove IDE, SATA, SCSI and USB support if possible. The Linux kernel can't handle this and ignores any devices connected to these buses.
Setup an ethernet card. The following models are supported:
.IP
Intel PRO/1000
.br
AMD PCNET III
.br
AMD PCNET32
.br
VMWare vmxnet3 (paravirtualized driver used by VMWare)
.br
virtio (paravirtualized driver used by VirtualBox, QEMU, KVM and lguest)
.RE
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default. Selecting a paravirtualized driver slightly improves performance. In VirtualBox you can simply select virtio in the network configuration dialog. VMWare requires that you add or change the VMX file. Use 'ethernet0.virtualDev\ =\ "vmxnet3"' in your VMWare config file.
If you are using QEMU, you must also setup a TAP adapter. Port redirection does not work to activate your own computer.
.SH CONFIGURATION
\fBfloppy144.vfd\fR can be customized to fit your needs. This is done by editing the file syslinux.cfg on the floppy image. The floppy image must be mounted. Under Linux you can simply attach \fBfloppy144.vfd\fR to a 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.
.URL http://www.osforensics.com/tools/mount-disk-images.html OSFMount ""
OSFMount works under all Windows versions beginning with Windows XP up to Windows 10 (32- and 64-bit).
The default syslinux.cfg file looks like this:
.IP
.br
.SM
prompt 0
.br
.SM
TIMEOUT 50
.br
.SM
default dhcp
.br
.SM
LABEL dhcp
.br
.SM
\0\0KERNEL bzImage
.br
.SM
\0\0APPEND vga=773 quiet initrd=initrd KBD=us LISTEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd INETD=Y WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016 OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016 OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016 HWID=36:4F:46:3A:88:63:D3:5F
.SM
LABEL static
.br
.SM
\0\0KERNEL bzImage
.br
.SM
\0\0APPEND vga=773 quiet initrd=initrd KBD=fr LISTEN=[::]: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_GATEWAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd INETD=Y
.PP
There are two configurations in this files: \fIdhcp\fR (for configuring the IPv4 network via DHCP) and \fIstatic\fR (for a static IPv4 configuration). The kernel always boots the \fIdhcp\fR configuration without asking (lines 'prompt 0' and 'default dhcp'). You can simply change the default configuration to \fIstatic\fR and then customize the APPEND line in the \fIstatic\fR configuration. For more details how to customize the syslinux.cfg file see \fBsyslinux\fR(1).
Each APPPEND line contains one or more items seperated by spaces. \fBAll items are case-sensitive\fR. The following parameters can be customized:
.IP \fBvga=\fIvesa-video-mode\fR
Sets the VESA display mode for the virtual machine. The parameter is not optional. If you ommit it, you will not see anything on the screen. 773 means 1024x768 with 256 colors. See
.URL https://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers Wikipedia ""
for more video 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 (> 16 Million colors) only. All modes above 1280x1024 are non-VESA-standard and vary for all (virtual) graphic cards.
.IP \fBquiet\fR
This causes the kernel not display the its log during boot. You may omit \fBquiet\fR but it doesn't make much sense. The boot log is actually very verbose and scrolls away from screen quickly. If any errors occur during boot, they will be displayed even if \fBquiet\fR is present in the APPEND line. You may evaluate the complete boot log later by using the dmesg command or the menu on /dev/tty8.
.IP "\fBinitrd=\fIinitial-ram-disk-file\fR"
This defines the initial ram disk that the kernel will read. There is only one initial ram disk on the floppy thus leave \fIinitrd=initrd\fR as it is.
.IP "\fBKBD=\fIkeyboard-layout-name\fR"
This allows you to select the keyboard layout. \fIkeyboard-layout-name\fR is usually the ISO 3166-1 (top level domain) code for a country. A list of valid \fIkeyboard-layout-name\fRs can be accessed via the menu system on /dev/tty8 (press ALT-F8). Note, that this is a keyboard driver only. There is no Unicode font support in \fBfloppy144.vfd\fR (due to the fact that the kernel uses a generic VESA framebuffer device only). Characters beyond ASCII work for Western European languages only but not Eastern European, Greek, Cyrillic, Arabic, Hebrew, CJK and other languages. There is no need in \fBfloppy144.vfd\fR to enter any characters outside ASCII. The purpose of the keyboard maps are that you will find characters like dash, backslash, brackets, braces, etc. at the usual place on your keyboard.
.IP "\fBLISTEN=\fRPRIVATE[:\fItcp-port\fR] | \fIip-address\fR[:\fItcp-port\fR][,\fIip-address\fR[:\fItcp-port\fR]][,...]"
One or more combinations of IP addresses and optional TCP port seperated by commas that \fBvlmcsd\fR(8) should listen on or PRIVATE to listen on all private IP addresses only. The default port is 1688. If you use an explicit port number, append it to the IP address seperated by a colon. If you use a port number and the IP address contains colons, you must enclose the IP address in brackets. For example \fI192.168.0.2,[fd00::dead:beef]:5678\fR causes \fBvlmcsd\fR(8) to listen on 192.168.0.2 port 1688 and fd00::dead:beef port 5678.
.IP "\fBWINDOWS=\fIepid\fR"
Defines the ePID that is used for Windows activations. If you ommit this parameter, vlmcsd generates a random ePID when it is started.
.IP "\fBOFFICE2010=\fIepid\fR"
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"
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 "\fBOFFICE2019=\fIepid\fR"
Defines the ePID that is used for Office 2019 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"
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.
.IP "\fBTZ=\fIposix-time-zone-string\fR"
Set the time zone to \fIposix-time-zone-string\fR. It must conform to the
.URL http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html POSIX
specification. Simplified time zone strings like "Europe/London" or "America/Detroit" are not allowed. This has the very simple reason that there is no space on the floppy to store the time zone database.
The string \fICET-1CEST,M3.5.0,M10.5.0/3\fR (most countries in Europe) reads as follows:
.RS 7
.IP \fICET\fR 10
The standard (winter) time zone has the name CET.
.IP \fI-1\fR 10
The standard time zone is one hour east of UTC. Negative numbers are east of UTC. Positive numbers are west of UTC.
.IP \fICEST\fR 10
The daylight saving (summer) time zone has the name CEST.
.IP \fIM3.5.0\fR 10
Daylight saving time starts in the 3rd month (March) on the 5th (=last) occurence of weekday 0 (Sunday) at 2 o'clock (2 o'clock is a default value).
.IP \fIM10.5.0/3\fR 10
Daylight saving time ends in the 10th month (October) on the 5th (=last) occurence of weekday 0 (Sunday) at 3 o'clock.
.RE
.IP
If you don't have daylight saving time, things are easier. For Chinese Standard Time for example, just use \fICST-8\fR as the time zone string.
On a Linux desktop system, you can use a command like \fBstrings\ /usr/share/zoneinfo/America/New_York\ |\ tail\ -n1\fR. This should return \fIEST5EDT,M3.2.0,M11.1.0\fR. You can use the returned string for the \fBTZ=\fIposix-time-zone-string\fR parameter.
.IP "\fBIPV4_CONFIG=\fRDHCP | STATIC\fR"
This determines how you want to configure IPv4 networking. If you use \fBIPV4_CONFIG=\fRSTATIC, you must supply additional paramaters to the APPEND command line.
.IP "\fBIPV4_ADDRESS=\fIipv4-address\fR/\fICIDR-mask\fR"
Use \fIipv4-address\fR with netmask \fICIDR-mask\fR for static IPv4 configuration. The netmask must not be ommitted. For IPv4 address 192.168.12.17 with a netmask of 255.255.255.0 use \fI192.168.12.17/24\fR. For IPv4 address 10.4.0.8 with a netmask of 255.255.0.0 use 10.4.0.8/16. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
.IP "\fBIPV4_GATEWAY=\fIipv4-address\fR | NONE"
Use \fIipv4-address\fR as the default gateway. This is usually the IPv4 address of your router. You may specify NONE explicitly for no gateway. In this case your virtual machine is only visible on its local LAN. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
.IP "\fBIPV4_DNS1=\fIipv4-address\fR | NONE"
Use \fIipv4-address\fR as the primary name server. In home networks this is often the IPv4 address of your router. You may specify NONE explicitly. If you specified NONE for both \fBIPV4_DNS1=\fR and \fBIPV4_DNS2=\fR, your virtual machine cannot resolve host names to IP addresses. While \fBvlmcsd\fR(8) works perfectly without DNS servers, you must use IP addresses when referring to a host, e.g. for specifying an NTP server. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
.IP "\fBIPV4_DNS2=\fIipv4-address\fR | NONE"
Use \fIipv4-address\fR as the secondary name server. It serves as a backup if the primary name server is not available. Home networks often don't have a secondary name server. In this case set this to NONE. This paramater is ignored, if you used \fBIPV4_CONFIG=\fRDHCP.
.IP "\fBNTP_SERVER=\fIhost-name\fR | \fIipv4-address\fR | NONE"
This sets the name of a time server using the NTP protocol. If your virtualization environment reliably provides time, you can set this to NONE. Don't use a public time service like pool.ntp.org or time.nist.gov if you have a (at least somewhat reliable) NTP server in your LAN.
.IP "\fBHOST_NAME=\fIhost-name\fR"
Sets the local host name for your virtual machine. It can be a single name or a fully-qualified domain name FQDN. If you used \fBIPV4_CONFIG=\fRDHCP and your DHCP server returns a domain name, the 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 returned via DHCP. The host name is not important for the operation of \fBfloppy144.vfd\fR.
.IP "\fBROOT_PASSWORD=\fIpassword\fR"
Sets the password of the root user.
.IP "\fBUSER_NAME=\fIusername\fR"
Sets the name of for a general user with no special privileges. This user can login but can't do much.
.IP "\fBUSER_PASSWORD=\fIpassword\fR"
Sets the password for the user defined by \fBUSER_NAME=\fIusername\fR.
.IP "\fBGUEST_PASSWORD=\fIpassword\fR"
Sets the password for the pre-defined guest user. This user has the same priviliges (none) as the user defined by \fBUSER_NAME=\fIusername\fR.
.IP "\fBINETD=\fRY | N"
\fBINETD=\fRY specifies that \fBinetd\fR(8) should automatically be started. That means you can telnet and ftp to your virtual machine.
.IP "\fBVLMCSD_EXTRA_ARGS=\fR\fIcomma-seperated-argument-list\fR"
Allows you to specify additional command line options that will be passed to \fBvlmcsd\fR(8). Instead of spaces you use commas between arguments. Example: \fBVLMCSD_EXTRA_ARGS=\fR\-c1,-K3,-M1
.SH OPERATION
.SS Diskless System
The \fBfloppy144.vfd\fR virtual machine is a diskless system that works entirely from RAM. The file system is actually a RAM disk that is created from the \fBinitrd\fR(4) file on the floppy image.
Anything you'll do from inside the virtual machine, for instance editing a config file, will be lost when you reboot the machine. So, if you ever asked yourself if \fBrm -fr /\fR (root privileges required) really deletes all files from all mounted partitions, the \fBfloppy144.vfd\fR VM is the right place to test it (Yes, it does).
The VM uses a RAM disk, because the Linux kernel had to be stripped down to essential features to fit on a 1.44 MB floppy. It has no floppy driver, no disk file system drivers and no block layer (cannot use disks of any type).
.SS System startup
The kernel boots up very quickly and the init script (/sbin/init) waits 5 seconds. In these 5 seconds you can:
.IP
Press 'm' to manually enter the time zone and the IPv4 parameters. These will be queried interactively.
.br
Press 't' to manually enter the time zone only.
.br
Press 's' to escape to a shell.
.RE
If you don't want to 5 seconds for continuing the init process, you can press any other key to speed things up. At the end of the init script you should see that\fBvlmcsd\fR(8) has started. You should also see the IP addresses and all user names and passwords.
.SS Logging into the system
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 console on /dev/tty1, press ALT\-F1. If \fBinetd\fR(8) is running you can also use \fBtelnet\fR(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 support. The local terminals support US keyboard layout only. Please be aware that \fBtelnet\fR(1) is unencrypted and everything including passwords is transmitted in clear text. There is not enough space for an ssh server like \fBsshd\fR(8) or \fBdropbear\fR(8).
The floppy image only provides basic Unix commands. Type \fIbusybox\fR or \fIll /bin\fR to get a list. The only editor available is \fBvi\fR(1). If you don't like vi, you may transfer config files via \fBftp\fR(1) edit them with the editor of your choice and transfer them back to the \fBfloppy144.vfd\fR VM.
.SS The menu system
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 system information. It is mainly for users that do not have much experience with Unix commands.
.IP "\fB1) (Re)start vlmcsd\fR"
Starts or restarts \fBvlmcsd\fR(8). This is useful if you changed \fB/etc/vlmcsd.ini\fR(5).
.IP "\fB2) Stop vlmcsd\fR"
Stops \fBvlmcsd\fR(8).
.IP "\fB3) (Re)start inetd\fR"
Starts or restarts \fBinetd\fR(8). If \fBinetd\fR(8) is restarted, current clients connected via \fBtelnet\fR(1) or \fBftp\fR(1) will \fBnot\fR be dropped. They can continue their sessions. This is useful if you changed \fB/etc/inetd.conf\fR(5).
.IP "\fB4) Stop inet\fR"
Stops \fBinetd\fR(8). All clients connected via \fBtelnet\fR(1) or \fBftp\fR(1) will be dropped immediately.
.IP "\fB5) Change the time zone\fR"
Just in case you missed pressing 't' during system startup. This also restarts \fBvlmcsd\fR(8) if it was running to notify it that the time zone has changed. Restarting \fBvlmcsd\fR(8) allows currently connected clients to finish their activation.
.IP "\fBk) Change keyboard layout\fR"
This allows you to select a different keyboard layout.
.IP "\fB6) Show all kernel boot parameters\fR"
Shows all parameters passed to the kernel via syslinux.cfg. If you experience any unexpected behavior, you can use this to check if your APPEND line in syslinux.cfg is correct. The output is piped through \fBless(1)\fR. So press 'q' to return to the menu.
.IP "\fB7) Show boot log (dmesg)\fR"
Shows the boot log of the kernel. The output is piped through \fBless(1)\fR. So press 'q' to return to the menu.
.IP "\fB8) Show TCP/IP configuration\fR"
Shows the TCP/IP configuration, listening sockets and current TCP and UDP connections. Useful, if you problems with net connectivity. The output is piped through \fBless(1)\fR. So press 'q' to return to the menu.
.IP "\fB9) Show running processes\fR"
Shows all processes including memory and CPU usage. Display will updated every second. Press 'q' or CTRL-C to return to the menu.
.IP "\fBs) Shutdown\fR"
Shuts down the \fBfloppy144.vfd\fR virtual machine. Proper shutdown is not required. It is ok to use a hard power off in your virtualization program.
.IP "\fBr) Reboot\fR"
Reboots the \fBfloppy144.vfd\fR virtual machine. Proper reboot is not required. It is ok to use a hard reset in your virtualization program.
.SH PERMANENT CHANGES OF INITRD
If you want to change any file or script of the file system (e.g. the init script /sbin/init or /etc/vlmcsd.ini), you'll need to mount the floppy image, unpack the \fBinitrd\fR(4) file, make any modfications you like, create a new \fBinitrd\fR(4) file and copy it to the mounted floppy.
To unpack the \fBinitrd\fR(4) file you'll need \fBxz\fR(1) (or \fBlzma\fR(1) on older unix-like OSses) and \fBcpio\fR(1). These can be installed using your package manager on all major distros. It is ok to use the BSD version of \fBcpio\fR(1). No need to get the GNU version for BSD users.
Provided the floppy is mounted in /mnt/floppy do the following:
.IP "Create an empty directory"
mkdir ~/vlmcsd-floppy-initrd
.IP "cd into that directory"
cd ~/vlmcsd-floppy-initrd
.IP "Unpack initrd"
cat /mnt/floppy/initrd | unlzma | cpio -i
.RE
After applying your changes build a new \fBinitrd\fR(4) file:
.IP "cd into your directory"
cd ~/vlmcsd-floppy-initrd
.IP "Create the packed file"
find . | cpio -o -H newc | lzma > /mnt/floppy/initrd
.RE
Do not try to use 'lzma -9' to achive better compression. The kernel can't read the resulting file. While customizing the \fBinitrd\fR(4) file 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 and gids. These cannot be preserved when unpacking the \fBcpio\fR(1) archive to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniversary Update) and later, you must make sure to unpack the \fBinitrd\fR(4) file to a directory on VolFs (normally everything that is \fBnot\fR mounted under /mnt). The \fBinitrd\fR(4) file can be on a VolFs or DriveFs.
.SH FAQ
.SS On what distro is the floppy image based?
None. Besides the boot loader \fBldlinux.sys\fR, there are only three binaries: The Linux kernel \fBbzImage\fR, \fBbusybox\fR(1) and \fBvlmcsdmulti-x86-musl-static\fR. \fBbzImage\fR and \fBbusybox\fR(1) have been compiled with carefully selected configuration parameters not found in any distro. This was neccesary to fit everything on a 1.44 MB floppy.
.SS 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. Beginning with Linux 3.13 it requires much more memory (about 80 MB) to boot. The floppy image is regularly tested with newer kernels. Everything works except that you need to assign much more main memory to the virtual machine.
.SS Can the floppy be booted on bare metal?
Basically yes. However, only Intel Pro/1000 and AMD PCNET32 ethernet cards are supported by the kernel. In addition there is no USB support compiled into the kernel. That means you can only use an IBM AT or IBM PS/2 keyboard which are not available on newer hardware.
.SH FILES
\fBsyslinux.cfg\fR, \fBvlmcsd.ini\fR(5)
.SH BUGS
IPv6 cannot be configured with static or manual parameters.
.br
DHCPv6 is not supported.
.br
\'ip route add ...' does not work. Use 'route add ...' instead.
.SH AUTHOR
\fBfloppy144.vfd\fR has been created by Hotbird64
.SH CREDITS
Linus Torvalds et al. for the Linux kernel
.br
Erik Andersen et al. for the original uClibc
.br
Waldemar Brodkorb et al. for uClibc-ng
.br
Denys Vlasenko et al. for BusyBox
.br
H. Peter Anvin et al. for SYSLINUX
.SH SEE ALSO
\fBvlmcsd\fR(8), \fBvlmcsd.ini\fR(5), \fBinitrd\fR(4), \fBbusybox\fR(1), \fBsyslinux(1)\fR

View file

@ -1,4 +1,4 @@
.TH VLMCSD 7 "June 2014" "Hotbird64" "KMS Activation Manual"
.TH VLMCSD 7 "March 2016" "Hotbird64" "KMS Activation Manual"
.SH NAME
vlmcsd\ \-\ a guide to KMS activation using vlmcsd
@ -41,6 +41,14 @@ Office 2013: http://technet.microsoft.com/en-us/library/dn385360.aspx
.PP
These lists only include products that Microsoft sells to corporations via volume license contracts. For Windows there are inofficial GVLKs that work with consumer-only versions of Windows. Here is a list:
.PP
TX9XD\-98N7V\-6WMQ6\-BX7FG\-H8Q99 - Windows 10 Home
.br
3KHY7\-WNT83\-DGQKR\-F7HPR\-844BM - Windows 10 Home N
.br
7HNRX\-D7KGG\-3K4RQ\-4WPJ4\-YTDFH - Windows 10 Home Single Language
.br
PVMJN\-6DFY6\-9CCP6\-7BKTT\-D3WVR - Windows 10 Home Country Specific
.br
789NJ\-TQK6T\-6XTH8\-J39CJ\-J8D3P - Windows 8.1 Professional with Media Center
.br
M9Q9P\-WNJJT\-6PXPY\-DWX8H\-6XWKK - Windows 8.1 Core

View file

@ -1,5 +1,5 @@
.mso www.tmac
.TH VLMCSD 8 "September 2015" "Hotbird64" "KMS Activation Manual"
.TH VLMCSD 8 "February 2019" "Hotbird64" "KMS Activation Manual"
.LO 8
.SH NAME
@ -17,7 +17,17 @@ vlmcsd \- a fully Microsoft compatible KMS server
.PP
Although \fBvlmcsd\fR does neither require an activation key nor a payment to anyone, it is not meant to run illegal copies of Windows. Its purpose is to ensure that owners of legal copies can use their software without restrictions, e.g. if you buy a new computer or motherboard and your key will be refused activation from Microsoft servers due to hardware changes.
.PP
\fBvlmcsd\fR may be started via an internet superserver like \fBinetd\fR(8) or \fBxinetd\fR(8) as well as an advanced init system like \fBsystemd\fR(8) or \fBlaunchd\fR(8) using socket based activation. If \fBvlmcsd\fR detects that \fBstdin\fR(3) is a socket, it assumes that there is already a connected client on stdin that wants to be activated. All options that control setting up listening sockets will be ignored when in inetd mode.
\fBvlmcsd\fR may be started via an internet superserver like \fBinetd\fR(8) or \fBxinetd\fR(8) as well as an advanced init system like \fBsystemd\fR(8) or \fBlaunchd\fR(8) using socket based activation. If \fBvlmcsd\fR detects that \fBstdin\fR(3) is a socket, it assumes that there is already a connected client on stdin that wants to be activated.
All options that control setting up listening sockets will be ignored when in inetd mode. The sockets will be set up by your internet superserver. You also cannot limit the number of simultanous clients (option \fB-m\fR). You need to configure the limit in your internet superserver.
The followong features that require that vlmcsd is permanently loaded will not work if started from an internet superserver:
.IP
You cannot maintain a client list (option \fB-M1\fR)
.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-G\fR, \fB-0\fR, \fB-3\fR and \fB-6\fR) instead.
.SH OPTIONS
Since vlmcsd can be configured at compile time, some options may not be available on your system.
@ -27,6 +37,9 @@ All options that do no require an argument may be combined with a single dash, f
.IP "\fB-h\fR or \fB-?\fR"
Displays help.
.IP "\fB-V\fR"
Displays extended version information. This includes the compiler used to build vlmcsd, the intended platform and flags (compile time options) to build vlmcsd. If you have the source code of vlmcsd, you can type \fBmake help\fR (or \fBgmake help\fR on systems that do not use the GNU version of \fBmake\fR(1) by default) to see the meaning of those flags.
.IP "\fB-L\fR \fIipaddress\fR[:\fIport\fR]"
Instructs vlmcsd to listen on \fIipaddress\fR with optional \fIport\fR (default 1688). You can use this option more than once. If you do not specify \fB-L\fR at least once, IP addresses 0.0.0.0 (IPv4) and :: (IPv6) are used. If the IP address contains colons (IPv6) you must enclose the IP address in brackets if you specify the optional port, e.g. [2001:db8::dead:beef]:1688.
.PP
@ -36,14 +49,73 @@ If no port is specified, vlmcsd uses the default port according to a preceding \
.IP
If you specify a link local IPv6 address (fe80::/10, usually starting with fe80::), it must be followed by a percent sign (%) and a scope id (=network interface name or number) on most unixoid OSses including Linux, Android, MacOS X and iOS, e.g. fe80::1234:56ff:fe78:9abc\fB%eth0\fR or [fe80::1234:56ff:fe78:9abc\fB%2\fR]:1688. Windows (including cygwin) does not require a scope id unless the same link local address is used on more than one network interface. Windows does not accept a name and the scope id must be a number.
.IP "\fB-P\fR \fIport"
.IP "\fB-o \fIlevel\fR"
Sets the \fIlevel\fR of protection against activations from public IP addresses. The default is \fB-o0\fR for no protection.
\fB-o1\fR causes vlmcsd not to listen on all IP addresses but on private IP addresses only. IPv4 addresses in the 100.64.0.0/10 range (see RFC6598) are not treated as private since they can be reached from other users of your ISP. Private IPv4 addresses are 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 and 127.0.0.0/8. vlmcsd treats all IPv6 addresses not within 2000::/3 as private addresses.
If \fB-o1\fR is combined with \fB-L\fR, it will listen on all private IP addresses plus the ones specified by one or more \fB-L\fR statements. If \fB-o1\fR is combined with \fB-P\fR, only the last \fB-P\fR statement will be used.
Using \fB-o1\fR does not protect you if you enable NAT port forwarding on your router to your vlmcsd machine. It is identical to using multiple -L statements with all of your private IP addresses. What \fB-o1\fR does for you, is automatically enumerating your private IP addresses.
\fB-o2\fR does not affect the interfaces, vlmcsd is listening on. When a clients connects, vlmcsd immediately drops the connection if the client has a public IP address. Unlike \fB-o1\fR clients will be able to establish a TCP connection but it will be closed without a single byte sent over the connection. This protects against clients with public IP addresses even if NAT port forwarding is used. While \fB-o2\fR offers a higher level of protection than \fB-o1\fR, the client sees that the KMS TCP port (1688 by default) is actually accepting connections.
If vlmcsd is compiled to use MS RPC, \fB-o2\fR can only offer very poor protection. Control is passed from MS RPC to vlmcsd after the KMS protocol has already been negotiated. Thus a client can always verify that the KMS protocol is available even though it receives an RPC_S_ACCESS_DENIED error message. vlmcsd will issue a warning if \fB-o2\fR is used with MS RPC. \fBFor adaequate protection do not use a MS RPC build of vlmcsd with -o2\fR.
\fB-o3\fR combines \fB-o1\fR and \fB-o2\fR. vlmcsd listens on private interfaces only and if a public client manages to connect anyway due to NAT port forwarding, it will be immediately dropped.
If you use any form of TCP level port forwarding (e.g. \fBnc\fR(1), \fBnetcat\fR(1), \fBssh\fR(1) port forwarding or similar) to redirect KMS requests to vlmcsd, there will be no protection even if you use \fB-o2\fR or \fB-o3\fR. This is due to the simple fact that vlmcsd sees the IP address of the redirector and not the IP address of the client.
\fB-o1\fR (and thus \fB-o3\fR) is not (yet) available in some scenarios:
.RS 12
FreeBSD: There is a longtime unfixed
.URL https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881 bug ""
in the 32-bit ABI of the 64-bit kernel. If you have a 64-bit FreeBSD kernel, you must run the 64-bit version of vlmcsd if you use \fB-o1\fR or \fB-o3\fR. The 32-bit version causes undefined behavior up to crashing vlmcsd. Other BSDs (NetBSD, OpenBSD, Dragonfly and Mac OS X) work correctly.
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
.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.
.IP "\fB-4\fR and \fB-6\fR"
Used to control the use of IPv4 and IPv4 if you did not use -L. If you specify both \fB-4\fR and \fB-6\fR or none, vlmcsd uses both protocols. If you specify only one, that protocol will be used only. \fBThese options are deprecated and will be removed.\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.
.IP "\fB-I\fR"
This option is deprecated and does nothing. It is provided for compatibility with svn681 and earlier versions only. It will be removed in a future release.
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.
.IP "\fB-t\fR \fIseconds\fR"
Timeout the TCP connection with the client after \fIseconds\fR seconds. After sending an activation request. RPC keeps the TCP connection for a while. The default is 30 seconds. You may specify a shorter period to free ressources on your device faster. This is useful for devices with limited main memory or if you used \fB-m\fR to limit the concurrent clients that may request activation. Microsoft RPC clients disconnect after 30 seconds by default. Setting \fIseconds\fR to a greater value does not make much sense.
@ -70,6 +142,9 @@ type tail -f \fIfile\fR.
.IP
If you use the special \fIfilename\fR "syslog", vlmcsd uses \fBsyslog\fR(3) for logging. If your system has no syslog service (/dev/log) installed, logging output will go to /dev/console. Syslog logging is not available in the native Windows version. The Cygwin version does support syslog logging.
.IP "\fB-T0\fR and \fB-T1\fR"
Disable (\fB-T0\fR) or enable (\fB-T1\fR) the inclusion of date and time in each line of the log. The default is \fB-T1\fR. \fB-T0\fR is useful if you log to \fBstdout\fR(3) which is redirected to another logging mechanism that already includes date and time in its output, for instance \fBsystemd-journald\fR(8). If you log to \fBsyslog\fR(3), \fB-T1\fR is ignored and date and time will never be included in the output sent to \fBsyslog\fR(3).
.IP "\fB-D\fR"
Normally vlmcsd daemonizes and runs in background (except the native Windows version). If \fB-D\fR is specified, vlmcsd does not daemonize and runs in foreground. This is useful for testing and allows you to simply press <Ctrl-C> to exit vlmcsd.
.PP
@ -79,9 +154,6 @@ The native Windows version never daemonizes and always behaves as if \fB-D\fR ha
.IP "\fB-e\fR"
If specified, vlmcsd ignores \fB-l\fR and writes all logging output to \fBstdout\fR(3). This is mainly useful for testing and debugging and often combined with \fB-D\fR.
.IP "\fB-f\fR"
This flag combines \fB-D\fR and \fB-e\fR. So typing "vlmcsd -f" is identical to "vlmcsd -De". The purpose of \fB-f\fR is to provide compatibility with previous versions of vlmcsd. \fBThis option is deprecated and will be removed.\fR
.IP "\fB-v\fR"
Use verbose logging. Logs every parameter of the base request 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 debugging purposes. It only has an effect if some form of logging is used. Thus \fB-v\fR does not make sense if not used with \fB-l\fR, \fB-e\fR or \fB-f\fR.
@ -101,31 +173,21 @@ The actual security context switch is performed after the TCP sockets have been
.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).
.IP "\fB-w\fR \fIePID\fR"
Use \fIePID\fR as Windows ePID. If specified, \fB-r\fR is disregarded for Windows.
.IP "\fB-a\fR \fICSVLK\fR = \fIePID\fR [ / \fIHwId\fR ]"
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"
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/2016 ePID (including Project and Visio). If specified, \fB-r\fR is disregarded for Office 2013/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"
\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.
.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.
If vlmcsd has been compiled to use a default configuration file (often /etc/vlmcsd.ini), you may use \fB-i-\fR to ignore the default configuration file.
.IP "\fB-j\fR \fIfilename\fR"
Use KMS data file \fIfilename\fR. By default vlmcsd only contains the minimum product data that is required to perform all operations correctly. You may use a more complete KMS data file that contains all detailed product names. This is especially useful if you are logging KMS requests. If you don't log, there is no need to load an external KMS data file.
If vlmcsd has been compiled to use a default KMS data file, you may use \fB-j-\fR to ignore the default configuration file.
.IP "\fB-r0\fR, \fB-r1\fR (default) and \fB-r2\fR"
These options determine how ePIDs are generated if
@ -135,15 +197,15 @@ These options determine how ePIDs are generated if
.br
- the file specified by \fB-i\fR cannot be opened or
.br
- the file specified by \fB-i\fR does not contain the \fIapplication-guid\fR for the KMS request
- the file specified by \fB-i\fR does not contain an ePID for the KMS request
\fB-r0\fR means there are no random ePIDs. vlmcsd simply issues default ePIDs that are built into the binary at compile time. \fBPro:\fR behaves like real KMS server that also always issues the same ePID. \fBCon\fR: Microsoft may start blacklisting again and the default ePID may not work any longer.
\fB-r0\fR means there are no random ePIDs. vlmcsd simply issues default ePIDs that are built into the binary at compile time. \fBPro:\fR behaves like real KMS server that also always issues the same ePID. \fBCon:\fR Microsoft may start blacklisting again and the default ePID may not work any longer.
\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 identically to \fB-r2\fR. 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.
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. Use this mode with "care". However since Microsoft currently does not seem to do any verification of the ePID, you currently don't need to pay attention to ePIDs at all.
\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.
.IP "\fB-C\fR \fILCID\fR"
Do not randomize the locale id part of the ePID and use \fILCID\fR instead. The \fILCID\fR must be specified as a decimal number, e.g. 1049 for "Russian - Russia". This option has no effect if the ePID is not randomized at all, e.g. if it is selected from the command line or an ini file.
@ -154,6 +216,36 @@ 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.
.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"
Sets the whitelisting level to determine which products vlmcsd activates or refuses. The default is \fB-K0\fR.
.RS 12
\fB-K0\fR: activate all products with an unknown, retail or beta/preview KMS ID.
.br
\fB-K1\fR: activate products with a retail or beta/preview KMS ID but refuse to activate products with an unknown KMS ID.
.br
\fB-K2\fR: activate products with an unknown KMS ID but refuse products with a retail or beta/preview KMS ID.
.br
\fB-K3\fR: activate only products with a known volume license RTM KMS ID and refuse all others.
.RE
.IP ""
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 select \fB-K1\fR or \fB-K3\fR, vlmcsd also checks the Application ID for correctness. If Microsoft introduces a new KMS ID for a new product, you cannot activate it if you used \fB-K1\fR or \fB-K3\fR until a new version of vlmcsd is available.
.IP "\fB-c0\fR and \fB-c1\fR"
\fB-c1\fR causes vlmcsd to check if the client time differs no more than four hours from the system time. \fB-c0\fR (the default) disables this check. \fB-c1\fR is useful to prevent emulator detection. A client that tries to detect an emulator could simply send two subsequent request with two time stamps that differ more than four hours from each other. If both requests succeed, the server is an emulator. If you specify \fB-c1\fR on a system with no reliable time source, activations will fail. It is ok to set the correct system time after you started vlmcsd.
.IP "\fB-M0\fR and \fB-M1\fR"
Disables (\fB-M0\fR) or enables (\fB-M1\fR) maintaining a list of client machine IDs (CMIDs). The default is \fB-M0\fR. \fB-M1\fR is useful to prevent emulator detection. By maintaing a CMID list, vlmcsd reports current active clients exactly like a genuine KMS emulator. This includes bug compatibility to the extent that you can permanently kill a genuine KMS emulator by sending an "overcharge request" with a required client count of 376 or more and then request activation for 671 clients. vlmcsd can be reset from this condition by restarting it. If \fB-M0\fR is used, vlmcsd reports current active clients as good as possible. If no client sends an "overcharge request", it is not possible to detect vlmcsd as an emulator with \fB-M0\fR. \fB-M1\fR requires the allocation of a buffer that is about 50 kB in size. On hardware with few memory resources use it only if you really need it.
If you start vlmcsd from an internet superserver, \fB-M1\fR cannot be used. Since vlmcsd exits after each activation, it cannot maintain any state in memory.
.IP "\fB-E0\fR and \fB-E1\fR"
These options are ignored if you do not also specify \fB-M1\fR. If you use \fB-E0\fR (the default), vlmcsd starts up as a fully "charged" KMS server. Clients activate immediately. \fB-E1\fR lets you start up vlmcsd with an empty CMID list. Activation will start when the required minimum clients (25 for Windows Client OSses, 5 for Windows Server OSses and Office) have registered with the KMS server. As long as the minimum client count has not been reached, clients end up in HRESULT 0xC004F038 "The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator". You may use \fBvlmcs\fR(1) or another KMS client emulator to "charge" vlmcsd. \fB-E1\fR does not improve emulator detection prevention. It's primary purpose is to help developers of KMS clients to test "charging" a KMS server.
.IP "\fB-R\fR \fIrenewal-interval\fR"
Instructs clients to renew activation every \fIrenewal-interval\fR. The \fIrenewal-interval\fR is a number optionally immediately followed by a letter indicating the unit. Valid unit letters are s (seconds), m (minutes), h (hours), d (days) and w (weeks). If you do not specify a letter, minutes is assumed.
@ -214,21 +306,21 @@ 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.
.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
\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
\fBvlmcsd\fR can answer activation requests for the following products: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Office 2010, Project 2010, Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016.
\fBvlmcsd\fR can answer activation requests for the following products: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1809), 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, Office 2019, Project 2019, Visio 2019. 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
Office, Project and Visio must be volume license versions.
Windows Vista, Windows 7, Office, Project and Visio must be volume license versions.
.SH FILES
.IP "\fBvlmcsd.ini\fR(5)"
.SH EXAMPLES
.IP "\fBvlmcsd -f\fR"
.IP "\fBvlmcsd -De\fR"
Starts \fBvlmcsd\fR in foreground. Useful if you use it for the first time and want to see what's happening when a client requests activation.
.IP "\fBvlmcsd -l /var/log/vlmcsd.log\fR"
@ -243,14 +335,12 @@ Installs \fBvlmcsd\fR as a Windows service with low privileges and logs everythi
.SH BUGS
An ePID specified in an ini file must not contain spaces.
The maximum number of \fB-L\fR options in the command line or listen statements in the inifile is the platform default for \fIFD_SETSIZE\fR. This is 64 on Windows and 1024 on most Unixes.
.SH AUTHOR
Written by crony12, Hotbird64 and vityan666.
With contributions from DougQaid.
.SH CREDITS
Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
.SH SEE ALSO
\fBvlmcsd.ini\fR(5), \fBvlmcsd\fR(7), \fBvlmcs\fR(1), \fBvlmcsdmulti\fR(1)

206
man/vlmcsd.ini.5 Normal file
View file

@ -0,0 +1,206 @@
.TH VLMCSD.INI 5 "October 2018" "Hotbird64" "KMS Activation Manual"
.LO 8
.SH NAME
\fBvlmcsd.ini\fR \- vlmcsd KMS emulator configuration file
.SH SYNOPSIS
.B vlmcsd.ini
.SH DESCRIPTION
\fBvlmcsd.ini\fR (or simply called the "ini file") is a configuration file for \fBvlmcsd\fR(8). By default vlmcsd does not use a configuration file. It is completely optional and for advanced users only. You must use the \fB-i\fR option on the vlmcsd command line to use an ini file. There is no default name or default location for the ini file.
.PP
Everything, that can be configured in the ini file, may also be specified on the command line. Any configuration option specified on the command line takes precedence over the respective configuration line in the ini file.
.PP
\fBBenefits of a configuration file\fR
.PP
While you can use the configuration file to simply modify the default behavior of vlmcsd, it can also be used to change the configuration of vlmcsd after you sent a HUP \fBsignal\fR(7). Whenever you send SIGHUP, the configuration file will be re-read. Any changes you made to the ini file will be reflected after vlmcsd received the hangup signal.
.PP
\fBDifferences between command line and configuration file\fR
.PP
If you specify an illegal option or option argument on the command line, vlmcsd displays help and exits. If you specify an incorrect \fIkeyword\fR or \fIargument\fR in the ini file, vlmcsd displays a warning with some information, ignores the respective line and continues. This is intentional and prevents vlmcsd from aborting after a SIGHUP if the configuration was modified incorrectly.
.SH SYNTAX
vlmcsd.ini is a UTF-8 encoded text file with each line being in the format \fIkeyword\fR = \fIargument\fR. The \fIkeyword\fR is not case-sensitive. The \fIargument\fR is treated literally. It is neither required nor allowed to enclose the \fIargument\fR in any form of quote characters except when quote characters are part of the argument itself. Whitespace characters are ignored only
- at the beginning of a line
.br
- between the \fIkeyword\fR and '='
.br
- between '=' and the \fIargument\fR
Lines, that start with '#' or ';' are treated as comments. Empty lines are ignored as well. If a \fIkeyword\fR is repeated in another line, vlmcsd will use the \fIargument\fR of the last occurence of the \fIkeyword\fR. An exception to this is the Listen \fIkeyword\fR which can be specified multiple times and causes vlmcsd to listen on more than one IP address and/or port.
.PP
Some \fIargument\fRs 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", "Off" or "0" as an alias for FALSE. Binary arguments are case-insensitive.
.SH KEYWORDS
The following \fIkeyword\fRs are defined (not all keywords may be available depending on the operating system and the options used when \fBvlmcsd\fR(8) was compiled):
.IP "\fBListen\fR"
This defines on what combinations of IP addresses and ports vlmcsd should listen. \fBListen\fR can be specified more than once. The \fIargument\fR has the form \fIipaddress\fR[:\fIport\fR]. If you omit the \fIport\fR, the default port of 1688 is used. If the \fIipaddress\fR contains colons and a \fIport\fR is used, you must enclose the \fIipaddress\fR in brackets. The default is to listen to 0.0.0.0:1688 and [::]:1688 which means listen to all IPv4 and all IPv6 addresses. See the \fB-L\fR option in \fBvlmcsd\fR(8) for more info about the syntax. If you use \fB-L\fR or \fB-P\fR on the command line, all \fBListen\fR keywords in the ini file will be ignored. The \fBListen\fR keyword cannot be used if vlmcsd has been compiled to use Microsoft RPC (Windows and Cygwin only) or simple sockets.
Examples:
Listen = 192.168.1.123:1688
.br
Listen = 0.0.0.0:1234
.br
Listen = [fe80::1721:12ff:fe81:d36b%eth0]:1688
.IP "\fBPort\fR"
Can only be used if vlmcsd has been compiled to use simple sockets or on Windows and Cygwin if \fBvlmcsd\fR(8) has been compiled to use Microsoft RPC. Otherwise you must use \fBListen\fR instead. Causes vlmcsd to listen on that port instead of 1688.
.IP "\fBFreeBind\fR"
Can be TRUE or FALSE. If TRUE, you can use the \fBListen\fR keyword with IP addresses that are currently not defined on your system. \fBvlmcsd\fR(8) will start listening on these IP addresses as soon as they become available. This keyword is only available under Linux and FreeBSD because no other OS currently supports that feature. FreeBSD supports this only for IPv4 and requires the PRIV_NETINET_BINDANY privilege which is normally assigned to proccesses of the root user.
.IP "\fBPublicIPProtectionLevel\fR"
Set the level of protection against KMS activations from public IP addresses.
0 = No protection (default)
.br
1\ =\ Listen on private IP addresses only (plus those specified by one or more \fBListen\fR statements)
.br
2\ =\ Disconnect clients with public IP addresses without activating
.br
3\ =\ Combines 1 and 2
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"
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.
.IP "\fBUseBTFN\fR"
Can be TRUE or FALSE. Specifies whether you want to use bind time feature negotiation in RPC. See options \fB-b0\fR and \fB-b1\fR in \fBvlmcsd\fR(8). The default is TRUE.
.IP "\fBRandomizationLevel\fR"
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"
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"
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.
.IP "\fBConnectionTimeout\fR"
Used to control when the vlmcsd disconnects idle TPC connections. The default is 30 seconds. This is the same setting as \fB-t\fR on the command line.
.IP "\fBDisconnectClientsImmediately\fR"
Set this to TRUE to disconnect a client after it got an activation response regardless whether a timeout has occured or not. The default is FALSE. Setting this to TRUE is non-standard behavior. Use only if you are experiencing DoS or DDoS attacks. On the command line you control this behavior with options \fB-d\fR and \fB-k\fR.
.IP "\fBPidFile\fR"
Write a pid file. The \fIargument\fR is the full pathname of a pid file. The pid file contains is single line containing the process id of the vlmcsd process. It can be used to stop (SIGTERM) or restart (SIGHUP) vlmcsd. This directive can be overriden using \fB-p\fR on the command line.
.IP "\fBLogFile\fR"
Write a log file. The \fIargument\fR is the full pathname of a log file. On a unixoid OS and with Cygwin you can use the special filename 'syslog' to log to the syslog facility. This is the same as specifying \fB-l\fR on the command line.
.IP "\fBKmsData\fR"
Use a KMS data file. The \fIargument\fR is the full pathname of a KMS data file. By default vlmcsd only contains the minimum product data that is required to perform all operations correctly. You may use a more complete KMS data file that contains all detailed product names. This is especially useful if you are logging KMS requests. If you don't log, there is no need to load an external KMS data file.
You may use \fBKmsData\ =\ \-\fR to prevent the default KMS data file to be loaded.
.IP "\fBLogDateAndTime\fR"
Can be TRUE or FALSE. The default is TRUE. If set to FALSE, logging output does not include date and time. This is useful if you log to \fBstdout\fR(3) which is redirected to another logging mechanism that already includes date and time in its output, for instance \fBsystemd-journald\fR(8). If you log to \fBsyslog\fR(3), \fBLogDateAndTime\fR is ignored and date and time will never be included in the output sent to \fBsyslog\fR(3). Using the command line you control this setting with options \fB-T0\fR and \fB-T1\fR.
.IP "\fBLogVerbose\fR"
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 \fB-v\fR and \fB-q\fR in the command line to control this setting. \fBLogVerbose\fR has an effect only if you specify a log file or redirect logging to \fBstdout\fR(3).
.IP "\fBWhitelistingLevel\fR"
Can be 0, 1, 2 or 3. The default is 0. Sets the whitelisting level to determine which products vlmcsd activates or refuses.
.RS 12
\fB0\fR: activate all products with an unknown, retail or beta/preview KMS ID.
.br
\fB1\fR: activate products with a retail or beta/preview KMS ID but refuse to activate products with an unknown KMS ID.
.br
\fB2\fR: activate products with an unknown KMS ID but refuse products with a retail or beta/preview KMS ID.
.br
\fB3\fR: activate only products with a known volume license RTM KMS ID and refuse all others.
.RE
.IP ""
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 select \fB1\fR or \fB3\fR, vlmcsd also checks the Application ID for correctness. If Microsoft introduces a new KMS ID for a new product, you cannot activate it if you used \fB1\fR or \fB3\fR until a new version of vlmcsd is available.
.IP "\fBCheckClientTime\fR"
Can be TRUE or FALSE. The default is FALSE. If you set this to TRUE \fBvlmcsd\fR(8) checks if the client time differs no more than four hours from the system time. This is useful to prevent emulator detection. A client that tries to detect an emulator could simply send two subsequent request with two time stamps that 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 system with no reliable time source, activations will fail. It is ok to set the correct system time after you started \fBvlmcsd\fR(8).
.IP "\fBMaintainClients\fR"
Can be TRUE or FALSE (the default). Disables (FALSE) or enables (TRUE) maintaining a list of client machine IDs (CMIDs). TRUE is useful to prevent emulator detection. By maintaing a CMID list, \fBvlmcsd\fR(8) reports current active clients exactly like a genuine KMS emulator. This includes bug compatibility to the extent that you can permanently kill a genuine KMS emulator by sending an "overcharge request" with a required client count of 376 or more and then request activation for 671 clients. \fBvlmcsd\fR(8) can be reset from this condition by restarting it. If FALSE is used, \fBvlmcsd\fR(8) reports current active clients as good as possible. If no client sends an "overcharge request", it is not possible to detect \fBvlmcsd\fR(8) as an emulator with \fBMaintainClients\fR\~=\~FALSE. Maintaining clients requires the allocation of a buffer that is about 50 kB in size. On hardware with few memory resources use it only if you really need it.
If you start \fBvlmcsd\fR(8) from an internet superserver, this setting cannot be used. Since \fBvlmcsd\fR(8) exits after each activation, it cannot maintain any state in memory.
.IP "\fBStartEmpty\fR"
This setting is ignored if you do not also specify \fBMaintainClients\fR\~=\~TRUE. If you specify FALSE (the default), \fBvlmcsd\fR(8) starts up as a fully "charged" KMS server. Clients activate immediately. \fBStartEmpty\fR\~=\~TRUE lets you start up \fBvlmcsd\fR(8) with an empty CMID list. Activation will start when the required minimum clients (25 for Windows Client OSses, 5 for Windows Server OSses and Office) have registered with the KMS server. As long as the minimum client count has not been reached, clients end up in HRESULT 0xC004F038 "The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator". You may use \fBvlmcs\fR(1) or another KMS client emulator to "charge" \fBvlmcsd\fR(8). Setting this parameter to TRUE does not improve emulator detection prevention. It's primary purpose is to help developers of KMS clients to test "charging" a KMS server.
.IP "\fBActivationInterval\fR"
This is the same as specifying \fB-A\fR on the command line. See \fBvlmcsd\fR(8) for details. The default is 2 hours. Example: ActivationInterval\~=\~1h
.IP "\fBRenewalInterval\fR"
This is the same as specifying \fB-R\fR on the command line. See \fBvlmcsd\fR(8) for details. The default is 7 days. Example: RenewalInterval = 3d. Please note that the KMS client decides itself when to renew activation. Even though vlmcsd sends the renewal interval you specify, it is no more than some kind of recommendation to the client. Older KMS clients did follow the recommendation from a KMS server or emulator. Newer clients do not.
.IP "\fBUser\fR"
Run vlmcsd as another, preferrably less privileged, user. The \fIargument\fR can be a user name or a numeric user 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-u\fR in \fBvlmcsd\fR(8). This setting cannot be changed on the fly by sending SIGHUP to vlmcsd.
.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.
.IP "\fB<csvlk-name>\fR"
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.
.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.
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 know how these "valid" ePIDs look like exactly, do not use GUIDS in vlmcsd.ini. vlmcsd provides internal mechanisms to generate valid ePIDs.
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 run vlmcsd on Windows or cygwin because UTF-8 is not the default encoding for most editors.
If you are specifying an optional HWID it follows the same syntax as in the \fB\-H\fR option in \fBvlmcsd\fR(8) ecxept that you must not enclose a HWID in quotes even if it contains spaces.
.SH FILES
.IP "\fBvlmcsd.ini\fR(5)"
.SH AUTHOR
\fBvlmcsd\fR(8) was written by crony12, Hotbird64 and vityan666. With contributions from DougQaid.
.SH CREDITS
Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Ratiborus, ...
.SH SEE ALSO
\fBvlmcsd\fR(8), \fBvlmcsd\fR(7), \fBvlmcs\fR(1), \fBvlmcsdmulti\fR(1)

675
network.c
View file

@ -1,675 +0,0 @@
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#ifndef USE_MSRPC
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <string.h>
#ifndef _WIN32
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <netinet/in.h>
#endif // WIN32
#include "network.h"
#include "endian.h"
#include "output.h"
#include "helpers.h"
#include "shared_globals.h"
#include "rpc.h"
#ifndef _WIN32
typedef ssize_t (*sendrecv_t)(int, void*, size_t, int);
#else
typedef int (WINAPI *sendrecv_t)(SOCKET, void*, int, int);
#endif
// Send or receive a fixed number of bytes regardless if received in one or more chunks
int_fast8_t sendrecv(SOCKET sock, BYTE *data, int len, int_fast8_t do_send)
{
int n;
sendrecv_t f = do_send
? (sendrecv_t) send
: (sendrecv_t) recv;
do
{
n = f(sock, data, len, 0);
}
while (
( n < 0 && socket_errno == VLMCSD_EINTR ) || ( n > 0 && ( data += n, (len -= n) > 0 ) ));
return ! len;
}
static int_fast8_t ip2str(char *restrict result, const size_t resultLength, const struct sockaddr *const restrict socketAddress, const socklen_t socketLength)
{
static const char *const fIPv4 = "%s:%s";
static const char *const fIPv6 = "[%s]:%s";
char ipAddress[64], portNumber[8];
if (getnameinfo
(
socketAddress,
socketLength,
ipAddress,
sizeof(ipAddress),
portNumber,
sizeof(portNumber),
NI_NUMERICHOST | NI_NUMERICSERV
))
{
return FALSE;
}
if ((unsigned int)snprintf(result, resultLength, socketAddress->sa_family == AF_INET6 ? fIPv6 : fIPv4, ipAddress, portNumber) > resultLength) return FALSE;
return TRUE;
}
static int_fast8_t getSocketList(struct addrinfo **saList, const char *const addr, const int flags, const int AddressFamily)
{
int status;
char *szHost, *szPort;
size_t len = strlen(addr) + 1;
// Don't alloca too much
if (len > 264) return FALSE;
char *addrcopy = (char*)alloca(len);
memcpy(addrcopy, addr, len);
parseAddress(addrcopy, &szHost, &szPort);
struct addrinfo hints;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AddressFamily;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = flags;
if ((status = getaddrinfo(szHost, szPort, &hints, saList)))
{
printerrorf("Warning: %s: %s\n", addr, gai_strerror(status));
return FALSE;
}
return TRUE;
}
static int_fast8_t setBlockingEnabled(SOCKET fd, int_fast8_t blocking)
{
if (fd == INVALID_SOCKET) return FALSE;
#ifdef _WIN32
unsigned long mode = blocking ? 0 : 1;
return (ioctlsocket(fd, FIONBIO, &mode) == 0) ? TRUE : FALSE;
#else // POSIX
int flags = fcntl(fd, F_GETFL, 0);
if (flags < 0) return FALSE;
flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK);
return (fcntl(fd, F_SETFL, flags) == 0) ? TRUE : FALSE;
#endif // POSIX
}
int_fast8_t isDisconnected(const SOCKET s)
{
char buffer[1];
if (!setBlockingEnabled(s, FALSE)) return TRUE;
int n = recv(s, buffer, 1, MSG_PEEK);
if (!setBlockingEnabled(s, TRUE)) return TRUE;
if (n == 0) return TRUE;
return FALSE;
}
// Connect to TCP address addr (e.g. "kms.example.com:1688") and return an
// open socket for the connection if successful or INVALID_SOCKET otherwise
SOCKET connectToAddress(const char *const addr, const int AddressFamily, int_fast8_t showHostName)
{
struct addrinfo *saList, *sa;
SOCKET s = INVALID_SOCKET;
char szAddr[128];
if (!getSocketList(&saList, addr, 0, AddressFamily)) return INVALID_SOCKET;
for (sa = saList; sa; sa = sa->ai_next)
{
// struct sockaddr_in* addr4 = (struct sockaddr_in*)sa->ai_addr;
// struct sockaddr_in6* addr6 = (struct sockaddr_in6*)sa->ai_addr;
if (ip2str(szAddr, sizeof(szAddr), sa->ai_addr, sa->ai_addrlen))
{
if (showHostName)
printf("Connecting to %s (%s) ... ", addr, szAddr);
else
printf("Connecting to %s ... ", szAddr);
fflush(stdout);
}
s = socket(sa->ai_family, SOCK_STREAM, IPPROTO_TCP);
# if !defined(NO_TIMEOUT) && !__minix__
# ifndef _WIN32 // Standard Posix timeout structure
struct timeval to;
to.tv_sec = 10;
to.tv_usec = 0;
# else // Windows requires a DWORD with milliseconds
DWORD to = 10000;
# endif // _WIN32
setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (sockopt_t)&to, sizeof(to));
setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, (sockopt_t)&to, sizeof(to));
# endif // !defined(NO_TIMEOUT) && !__minix__
if (!connect(s, sa->ai_addr, sa->ai_addrlen))
{
printf("successful\n");
break;
}
errorout("%s\n", socket_errno == VLMCSD_EINPROGRESS ? "Timed out" : vlmcsd_strerror(socket_errno));
socketclose(s);
s = INVALID_SOCKET;
}
freeaddrinfo(saList);
return s;
}
#ifndef NO_SOCKETS
// Create a Listening socket for addrinfo sa and return socket s
// szHost and szPort are for logging only
static int listenOnAddress(const struct addrinfo *const ai, SOCKET *s)
{
int error;
char ipstr[64];
ip2str(ipstr, sizeof(ipstr), ai->ai_addr, ai->ai_addrlen);
//*s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
*s = socket(ai->ai_family, SOCK_STREAM, IPPROTO_TCP);
if (*s == INVALID_SOCKET)
{
error = socket_errno;
printerrorf("Warning: %s error. %s\n", ai->ai_family == AF_INET6 ? cIPv6 : cIPv4, vlmcsd_strerror(error));
return error;
}
# if !defined(_WIN32) && !defined(NO_SIGHUP)
int flags = fcntl(*s, F_GETFD, 0);
if (flags != -1)
{
flags |= FD_CLOEXEC;
fcntl(*s, F_SETFD, flags);
}
# ifdef _PEDANTIC
else
{
printerrorf("Warning: Could not set FD_CLOEXEC flag on %s: %s\n", ipstr, vlmcsd_strerror(errno));
}
# endif // _PEDANTIC
# endif // !defined(_WIN32) && !defined(NO_SIGHUP)
BOOL socketOption = TRUE;
// fix for lame tomato toolchain
# ifndef IPV6_V6ONLY
# ifdef __linux__
# define IPV6_V6ONLY (26)
# endif // __linux__
# endif // IPV6_V6ONLY
# ifdef IPV6_V6ONLY
if (ai->ai_family == AF_INET6) setsockopt(*s, IPPROTO_IPV6, IPV6_V6ONLY, (sockopt_t)&socketOption, sizeof(socketOption));
# endif
# ifndef _WIN32
setsockopt(*s, SOL_SOCKET, SO_REUSEADDR, (sockopt_t)&socketOption, sizeof(socketOption));
# endif
if (bind(*s, ai->ai_addr, ai->ai_addrlen) || listen(*s, SOMAXCONN))
{
error = socket_errno;
printerrorf("Warning: %s: %s\n", ipstr, vlmcsd_strerror(error));
socketclose(*s);
return error;
}
# ifndef NO_LOG
logger("Listening on %s\n", ipstr);
# endif
return 0;
}
// Adds a listening socket for an address string,
// e.g. 127.0.0.1:1688 or [2001:db8:dead:beef::1]:1688
BOOL addListeningSocket(const char *const addr)
{
struct addrinfo *aiList, *ai;
int result = FALSE;
SOCKET *s = SocketList + numsockets;
if (getSocketList(&aiList, addr, AI_PASSIVE | AI_NUMERICHOST, AF_UNSPEC))
{
for (ai = aiList; ai; ai = ai->ai_next)
{
// struct sockaddr_in* addr4 = (struct sockaddr_in*)sa->ai_addr;
// struct sockaddr_in6* addr6 = (struct sockaddr_in6*)sa->ai_addr;
if (numsockets >= FD_SETSIZE)
{
#ifdef _PEDANTIC // Do not report this error in normal builds to keep file size low
printerrorf("Warning: Cannot listen on %s. Your OS only supports %u listening sockets in an FD_SET.\n", addr, FD_SETSIZE);
#endif
break;
}
if (!listenOnAddress(ai, s))
{
numsockets++;
result = TRUE;
}
}
freeaddrinfo(aiList);
}
return result;
}
// Just create some dummy sockets to see if we have a specific protocol (IPv4 or IPv6)
__pure int_fast8_t checkProtocolStack(const int addressfamily)
{
SOCKET s; // = INVALID_SOCKET;
s = socket(addressfamily, SOCK_STREAM, 0);
int_fast8_t success = (s != INVALID_SOCKET);
socketclose(s);
return success;
}
// Build an fd_set of all listening socket then use select to wait for an incoming connection
static SOCKET network_accept_any()
{
fd_set ListeningSocketsList;
SOCKET maxSocket, sock;
int i;
int status;
FD_ZERO(&ListeningSocketsList);
maxSocket = 0;
for (i = 0; i < numsockets; i++)
{
FD_SET(SocketList[i], &ListeningSocketsList);
if (SocketList[i] > maxSocket) maxSocket = SocketList[i];
}
status = select(maxSocket + 1, &ListeningSocketsList, NULL, NULL, NULL);
if (status < 0) return INVALID_SOCKET;
sock = INVALID_SOCKET;
for (i = 0; i < numsockets; i++)
{
if (FD_ISSET(SocketList[i], &ListeningSocketsList))
{
sock = SocketList[i];
break;
}
}
if (sock == INVALID_SOCKET)
return INVALID_SOCKET;
else
return accept(sock, NULL, NULL);
}
void closeAllListeningSockets()
{
int i;
for (i = 0; i < numsockets; i++)
{
shutdown(SocketList[i], VLMCSD_SHUT_RDWR);
socketclose(SocketList[i]);
}
}
#endif // NO_SOCKETS
static void serveClient(const SOCKET s_client, const DWORD RpcAssocGroup)
{
# if !defined(NO_TIMEOUT) && !__minix__
# ifndef _WIN32 // Standard Posix timeout structure
struct timeval to;
to.tv_sec = ServerTimeout;
to.tv_usec = 0;
#else // Windows requires a DWORD with milliseconds
DWORD to = ServerTimeout * 1000;
# endif // _WIN32
# if !defined(NO_LOG) && defined(_PEDANTIC)
int result =
setsockopt(s_client, SOL_SOCKET, SO_RCVTIMEO, (sockopt_t)&to, sizeof(to)) ||
setsockopt(s_client, SOL_SOCKET, SO_SNDTIMEO, (sockopt_t)&to, sizeof(to));
if (result) logger("Warning: Set timeout failed: %s\n", vlmcsd_strerror(socket_errno));
# else // !(!defined(NO_LOG) && defined(_PEDANTIC))
setsockopt(s_client, SOL_SOCKET, SO_RCVTIMEO, (sockopt_t)&to, sizeof(to));
setsockopt(s_client, SOL_SOCKET, SO_SNDTIMEO, (sockopt_t)&to, sizeof(to));
# endif // !(!defined(NO_LOG) && defined(_PEDANTIC))
# endif // !defined(NO_TIMEOUT) && !__minix__
char ipstr[64];
socklen_t len;
struct sockaddr_storage addr;
len = sizeof addr;
if (getpeername(s_client, (struct sockaddr*)&addr, &len) ||
!ip2str(ipstr, sizeof(ipstr), (struct sockaddr*)&addr, len))
{
# if !defined(NO_LOG) && defined(_PEDANTIC)
logger("Fatal: Cannot determine client's IP address: %s\n", vlmcsd_strerror(errno));
# endif // !defined(NO_LOG) && defined(_PEDANTIC)
socketclose(s_client);
return;
}
# ifndef NO_LOG
const char *const connection_type = addr.ss_family == AF_INET6 ? cIPv6 : cIPv4;
static const char *const cAccepted = "accepted";
static const char *const cClosed = "closed";
static const char *const fIP = "%s connection %s: %s.\n";
logger(fIP, connection_type, cAccepted, ipstr);
#endif // NO_LOG
rpcServer(s_client, RpcAssocGroup, ipstr);
# ifndef NO_LOG
logger(fIP, connection_type, cClosed, ipstr);
# endif // NO_LOG
socketclose(s_client);
}
#ifndef NO_SOCKETS
static void post_sem(void)
{
#if !defined(NO_LIMIT) && !__minix__
if (!InetdMode && MaxTasks != SEM_VALUE_MAX)
{
semaphore_post(Semaphore);
}
#endif // !defined(NO_LIMIT) && !__minix__
}
static void wait_sem(void)
{
#if !defined(NO_LIMIT) && !__minix__
if (!InetdMode && MaxTasks != SEM_VALUE_MAX)
{
semaphore_wait(Semaphore);
}
#endif // !defined(NO_LIMIT) && !__minix__
}
#endif // NO_SOCKETS
#if defined(USE_THREADS) && !defined(NO_SOCKETS)
#if defined(_WIN32) || defined(__CYGWIN__) // Win32 Threads
static DWORD WINAPI serveClientThreadProc(PCLDATA clData)
#else // Posix threads
static void *serveClientThreadProc (PCLDATA clData)
#endif // Thread proc is identical in WIN32 and Posix threads
{
serveClient(clData->socket, clData->RpcAssocGroup);
free(clData);
post_sem();
return 0;
}
#endif // USE_THREADS
#ifndef NO_SOCKETS
#if defined(USE_THREADS) && (defined(_WIN32) || defined(__CYGWIN__)) // Windows Threads
static int serveClientAsyncWinThreads(const PCLDATA thr_CLData)
{
wait_sem();
HANDLE h = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)serveClientThreadProc, thr_CLData, 0, NULL);
if (h)
CloseHandle(h);
else
{
socketclose(thr_CLData->socket);
free(thr_CLData);
post_sem();
return GetLastError();
}
return NO_ERROR;
}
#endif // defined(USE_THREADS) && defined(_WIN32) // Windows Threads
#if defined(USE_THREADS) && !defined(_WIN32) && !defined(__CYGWIN__) // Posix Threads
static int ServeClientAsyncPosixThreads(const PCLDATA thr_CLData)
{
pthread_t p_thr;
pthread_attr_t attr;
wait_sem();
// Must set detached state to avoid memory leak
if (pthread_attr_init(&attr) ||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) ||
pthread_create(&p_thr, &attr, (void * (*)(void *))serveClientThreadProc, thr_CLData))
{
socketclose(thr_CLData->socket);
free(thr_CLData);
post_sem();
return !0;
}
return 0;
}
#endif // defined(USE_THREADS) && !defined(_WIN32) // Posix Threads
#ifndef USE_THREADS // fork() implementation
static void ChildSignalHandler(const int signal)
{
if (signal == SIGHUP) return;
post_sem();
#ifndef NO_LOG
logger("Warning: Child killed/crashed by %s\n", strsignal(signal));
#endif // NO_LOG
exit(!0);
}
static int ServeClientAsyncFork(const SOCKET s_client, const DWORD RpcAssocGroup)
{
int pid;
wait_sem();
if ((pid = fork()) < 0)
{
return errno;
}
else if ( pid )
{
// Parent process
socketclose(s_client);
return 0;
}
else
{
// Child process
// Setup a Child Handler for most common termination signals
struct sigaction sa;
sa.sa_flags = 0;
sa.sa_handler = ChildSignalHandler;
static int signallist[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV, SIGILL, SIGFPE, SIGBUS };
if (!sigemptyset(&sa.sa_mask))
{
uint_fast8_t i;
for (i = 0; i < _countof(signallist); i++)
{
sigaction(signallist[i], &sa, NULL);
}
}
serveClient(s_client, RpcAssocGroup);
post_sem();
exit(0);
}
}
#endif
int serveClientAsync(const SOCKET s_client, const DWORD RpcAssocGroup)
{
#ifndef USE_THREADS // fork() implementation
return ServeClientAsyncFork(s_client, RpcAssocGroup);
#else // threads implementation
PCLDATA thr_CLData = (PCLDATA)vlmcsd_malloc(sizeof(CLDATA));
thr_CLData->socket = s_client;
thr_CLData->RpcAssocGroup = RpcAssocGroup;
#if defined(_WIN32) || defined (__CYGWIN__) // Windows threads
return serveClientAsyncWinThreads(thr_CLData);
#else // Posix Threads
return ServeClientAsyncPosixThreads(thr_CLData);
#endif // Posix Threads
#endif // USE_THREADS
}
#endif // NO_SOCKETS
int runServer()
{
DWORD RpcAssocGroup = rand32();
// If compiled for inetd-only mode just serve the stdin socket
#ifdef NO_SOCKETS
serveClient(STDIN_FILENO, RpcAssocGroup);
return 0;
#else
// In inetd mode just handle the stdin socket
if (InetdMode)
{
serveClient(STDIN_FILENO, RpcAssocGroup);
return 0;
}
// Standalone mode
for (;;)
{
int error;
SOCKET s_client;
if ( (s_client = network_accept_any()) == INVALID_SOCKET )
{
error = socket_errno;
if (error == VLMCSD_EINTR || error == VLMCSD_ECONNABORTED) continue;
#ifdef _NTSERVICE
if (ServiceShutdown) return 0;
#endif
#ifndef NO_LOG
logger("Fatal: %s\n",vlmcsd_strerror(error));
#endif
return error;
}
RpcAssocGroup++;
serveClientAsync(s_client, RpcAssocGroup);
}
#endif // NO_SOCKETS
return 0;
}
#endif // USE_MSRPC

View file

@ -1,346 +0,0 @@
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#include "ntservice.h"
#include "shared_globals.h"
#include "vlmcsd.h"
#include "output.h"
#include "helpers.h"
#ifdef _NTSERVICE
SERVICE_STATUS gSvcStatus;
SERVICE_STATUS_HANDLE gSvcStatusHandle;
static VOID WINAPI ServiceCtrlHandler(const DWORD dwCtrl)
{
// Handle the requested control code.
switch(dwCtrl)
{
case SERVICE_CONTROL_STOP:
case SERVICE_CONTROL_SHUTDOWN:
ServiceShutdown = TRUE;
ReportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
// Remove PID file and free ressources
cleanup();
# ifdef USE_MSRPC
ReportServiceStatus(SERVICE_STOPPED, NO_ERROR, 0);
# endif // !USE_MSRPC
return;
/*case SERVICE_CONTROL_INTERROGATE:
break;*/
default:
break;
}
}
static VOID WINAPI ServiceMain(const int argc_unused, CARGV argv_unused)
{
// Register the handler function for the service
gSvcStatusHandle = RegisterServiceCtrlHandler(
NT_SERVICE_NAME,
ServiceCtrlHandler
);
if(!gSvcStatusHandle)
{
//ServiceReportEvent(RegisterServiceCtrlHandler);
return;
}
// These SERVICE_STATUS members remain as set here
gSvcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
gSvcStatus.dwServiceSpecificExitCode = 0;
// Run the actual program
ReportServiceStatus(SERVICE_STOPPED, newmain(), 3000);
}
SERVICE_TABLE_ENTRY NTServiceDispatchTable[] = {
{
(LPSTR)NT_SERVICE_NAME,
(LPSERVICE_MAIN_FUNCTION) ServiceMain
},
{
NULL,
NULL
}
};
VOID ReportServiceStatus(const DWORD dwCurrentState, const DWORD dwWin32ExitCode, const DWORD dwWaitHint)
{
static DWORD dwCheckPoint = 1;
// Fill in the SERVICE_STATUS structure.
gSvcStatus.dwCurrentState = dwCurrentState;
gSvcStatus.dwWin32ExitCode = dwWin32ExitCode;
gSvcStatus.dwWaitHint = dwWaitHint;
if (dwCurrentState == SERVICE_START_PENDING)
gSvcStatus.dwControlsAccepted = 0;
else
gSvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
if ( (dwCurrentState == SERVICE_RUNNING) ||
(dwCurrentState == SERVICE_STOPPED) )
gSvcStatus.dwCheckPoint = 0;
else
gSvcStatus.dwCheckPoint = dwCheckPoint++;
// Report the status of the service to the SCM.
SetServiceStatus(gSvcStatusHandle, &gSvcStatus);
}
/*VOID ServiceReportEvent(char *szFunction)
{
HANDLE hEventSource;
const char *eventStrings[2];
TCHAR Buffer[80];
hEventSource = RegisterEventSource(NULL, NT_SERVICE_NAME);
if (hEventSource)
{
snprintf(Buffer, 80, "%s failed with %d", szFunction, GetLastError());
eventStrings[0] = NT_SERVICE_NAME;
eventStrings[1] = Buffer;
ReportEvent(hEventSource, // event log handle
EVENTLOG_ERROR_TYPE, // event type
0, // event category
00, // event identifier
NULL, // no security identifier
2, // size of lpszStrings array
0, // no binary data
eventStrings, // array of strings
NULL); // no binary data
DeregisterEventSource(hEventSource);
}
}*/
//Returns 0=Error, 1=Success, 2=Doesn't exist
static uint_fast8_t OpenAndRemoveService(DWORD *dwPreviousState, SC_HANDLE *schSCManager)
{
SERVICE_STATUS status;
uint_fast8_t i;
SC_HANDLE installedService;
uint_fast8_t result = 1;
BOOL closeManager = FALSE;
// Allow NULL for both Arguments
if (!dwPreviousState) dwPreviousState = (DWORD*)alloca(sizeof(*dwPreviousState));
if (!schSCManager)
{
schSCManager = (SC_HANDLE*)alloca(sizeof(*schSCManager));
closeManager = TRUE;
}
*schSCManager = OpenSCManager(
NULL, // local computer
NULL, // ServicesActive database
SC_MANAGER_ALL_ACCESS); // full access rights
if (!*schSCManager) return 0;
if (!(installedService = OpenService(*schSCManager, NT_SERVICE_NAME, SERVICE_ALL_ACCESS)))
{
result = 2;
}
else
{
*dwPreviousState = SERVICE_STOPPED;
if (QueryServiceStatus(installedService, &status)) *dwPreviousState = status.dwCurrentState;
ControlService(installedService, SERVICE_CONTROL_STOP, &status);
for (i = 0; i < 10; i++)
{
QueryServiceStatus(installedService, &status);
// Give it 100 ms after it reported SERVICE_STOPPED. Subsequent CreateService will fail otherwise
Sleep(100);
if (status.dwCurrentState == SERVICE_STOPPED) break;
}
if (!DeleteService(installedService)) result = 0;
CloseServiceHandle(installedService);
}
if (closeManager) CloseServiceHandle(*schSCManager);
return result;
}
static VOID ServiceInstaller(const char *restrict ServiceUser, const char *const ServicePassword)
{
SC_HANDLE schSCManager;
SC_HANDLE schService;
char szPath[MAX_PATH] = "\"";
if (!GetModuleFileName(NULL, szPath + sizeof(char), MAX_PATH - 1))
{
errorout("Cannot install service (%d)\n", (uint32_t)GetLastError());
return;
}
strcat(szPath,"\"");
int i;
for (i = 1; i < global_argc; i ++)
{
// Strip unneccessary parameters, especially the password
if (!strcmp(global_argv[i], "-s")) continue;
if (!strcmp(global_argv[i], "-W") ||
!strcmp(global_argv[i], "-U"))
{
i++;
continue;
}
strcat(szPath, " ");
if (strchr(global_argv[i], ' '))
{
strcat(szPath, "\"");
strcat(szPath, global_argv[i]);
strcat(szPath, "\"");
}
else
strcat(szPath, global_argv[i]);
}
// Get a handle to the SCM database.
SERVICE_STATUS status;
DWORD dwPreviousState;
if (!OpenAndRemoveService(&dwPreviousState, &schSCManager))
{
errorout("Service removal failed (%d)\n", (uint32_t)GetLastError());
return;
}
char *tempUser = NULL;
if (ServiceUser)
{
// Shortcuts for some well known users
if (!strcasecmp(ServiceUser, "/l")) ServiceUser="NT AUTHORITY\\LocalService";
if (!strcasecmp(ServiceUser, "/n")) ServiceUser="NT AUTHORITY\\NetworkService";
// Allow Local Users without .\ , e.g. "johndoe" instead of ".\johndoe"
if (!strchr(ServiceUser, '\\'))
{
tempUser = (char*)vlmcsd_malloc(strlen(ServiceUser) + 3);
strcpy(tempUser, ".\\");
strcat(tempUser, ServiceUser);
ServiceUser = tempUser;
}
}
schService = CreateService(
schSCManager, // SCM database
NT_SERVICE_NAME, // name of service
NT_SERVICE_DISPLAY_NAME, // service name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
szPath, // path to service's binary
NULL, // no load ordering group
NULL, // no tag identifier
"tcpip\0", // depends on TCP/IP
ServiceUser, // LocalSystem account
ServicePassword); // no password
# if __clang__ && (__CYGWIN__ || __MINGW64__ )
// Workaround for clang not understanding some GCC asm syntax used in <w32api/psdk_inc/intrin-impl.h>
ZeroMemory((char*)ServicePassword, strlen(ServicePassword));
# else
SecureZeroMemory((char*)ServicePassword, strlen(ServicePassword));
# endif
if (tempUser) free(tempUser);
if (schService == NULL)
{
errorout("CreateService failed (%u)\n", (uint32_t)GetLastError());
CloseServiceHandle(schSCManager);
return;
}
else
{
errorout("Service installed successfully\n");
if (dwPreviousState == SERVICE_RUNNING)
{
printf("Restarting " NT_SERVICE_NAME " service => ");
status.dwCurrentState = SERVICE_STOPPED;
if (StartService(schService, 0, NULL))
{
for (i = 0; i < 10; i++)
{
if (!QueryServiceStatus(schService, &status) || status.dwCurrentState != SERVICE_START_PENDING) break;
Sleep(100);
}
if (status.dwCurrentState == SERVICE_RUNNING)
printf("Success\n");
else if (status.dwCurrentState == SERVICE_START_PENDING)
printf("Not ready within a second\n");
else
errorout("Error\n");
}
else
errorout("Error %u\n", (uint32_t)GetLastError());
}
}
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
}
int NtServiceInstallation(const int_fast8_t installService, const char *restrict ServiceUser, const char *const ServicePassword)
{
if (IsNTService) return 0;
if (installService == 1) // Install
{
ServiceInstaller(ServiceUser, ServicePassword);
return(0);
}
if (installService == 2) // Remove
{
switch(OpenAndRemoveService(NULL, NULL))
{
case 0:
errorout("Error removing service %s\n", NT_SERVICE_NAME);
return(!0);
case 1:
printf("Service %s removed successfully\n", NT_SERVICE_NAME);
return(0);
default:
errorout("Service %s does not exist.\n", NT_SERVICE_NAME);
return(!0);
}
}
// Do nothing
return(0);
}
#endif // _NTSERVICE

240
output.c
View file

@ -1,240 +0,0 @@
#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#endif // _DEFAULT_SOURCE
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#include "output.h"
#include "shared_globals.h"
#include "endian.h"
#include "helpers.h"
#ifndef NO_LOG
static void vlogger(const char *message, va_list args)
{
FILE *log;
#ifdef _NTSERVICE
if (!IsNTService && logstdout) log = stdout;
#else
if (logstdout) log = stdout;
#endif
else
{
if (fn_log == NULL) return;
#ifndef _WIN32
if (!strcmp(fn_log, "syslog"))
{
openlog("vlmcsd", LOG_CONS | LOG_PID, LOG_USER);
////PORTABILITY: vsyslog is not in Posix but virtually all Unixes have it
vsyslog(LOG_INFO, message, args);
closelog();
return;
}
#endif // _WIN32
log = fopen(fn_log, "a");
if ( !log ) return;
}
time_t now = time(0);
#ifdef USE_THREADS
char mbstr[2048];
#else
char mbstr[24];
#endif
strftime(mbstr, sizeof(mbstr), "%Y-%m-%d %X", localtime(&now));
#ifndef USE_THREADS
fprintf(log, "%s: ", mbstr);
vfprintf(log, message, args);
fflush(log);
#else // USE_THREADS
// We write everything to a string before we really log inside the critical section
// so formatting the output can be concurrent
strcat(mbstr, ": ");
int len = strlen(mbstr);
vsnprintf(mbstr + len, sizeof(mbstr) - len, message, args);
lock_mutex(&logmutex);
fputs(mbstr, log);
fflush(log);
unlock_mutex(&logmutex);
#endif // USE_THREADS
if (log != stdout) fclose(log);
}
// Always sends to log output
int logger(const char *const fmt, ...)
{
va_list args;
va_start(args, fmt);
vlogger(fmt, args);
va_end(args);
return 0;
}
#endif //NO_LOG
// Output to stderr if it is available or to log otherwise (e.g. if running as daemon/service)
void printerrorf(const char *const fmt, ...)
{
va_list arglist;
va_start(arglist, fmt);
#ifndef NO_LOG
#ifdef _NTSERVICE
if (InetdMode || IsNTService)
#else // !_NTSERVICE
if (InetdMode)
#endif // NTSERVIICE
vlogger(fmt, arglist);
else
#endif //NO_LOG
{
vfprintf(stderr, fmt, arglist);
fflush(stderr);
}
va_end(arglist);
}
// Always output to stderr
int errorout(const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
int i = vfprintf(stderr, fmt, args);
va_end(args);
fflush(stderr);
return i;
}
static const char *LicenseStatusText[] =
{
"Unlicensed", "Licensed", "OOB grace", "OOT grace", "Non-Genuine", "Notification", "Extended grace"
};
void uuid2StringLE(const GUID *const guid, char *const string)
{
sprintf(string,
#ifdef _WIN32
"%08x-%04x-%04x-%04x-%012I64x",
#else
"%08x-%04x-%04x-%04x-%012llx",
#endif
(unsigned int)LE32( guid->Data1 ),
(unsigned int)LE16( guid->Data2 ),
(unsigned int)LE16( guid->Data3 ),
(unsigned int)BE16( *(uint16_t*)guid->Data4 ),
(unsigned long long)BE64(*(uint64_t*)(guid->Data4)) & 0xffffffffffffLL
);
}
void logRequestVerbose(const REQUEST *const Request, const PRINTFUNC p)
{
char guidBuffer[GUID_STRING_LENGTH + 1];
char WorkstationBuffer[3 * WORKSTATION_NAME_BUFFER];
const char *productName;
ProdListIndex_t index;
p("Protocol version : %u.%u\n", LE16(Request->MajorVer), LE16(Request->MinorVer));
p("Client is a virtual machine : %s\n", LE32(Request->VMInfo) ? "Yes" : "No");
p("Licensing status : %u (%s)\n", (uint32_t)LE32(Request->LicenseStatus), LE32(Request->LicenseStatus) < _countof(LicenseStatusText) ? LicenseStatusText[LE32(Request->LicenseStatus)] : "Unknown");
p("Remaining time (0 = forever) : %i minutes\n", (uint32_t)LE32(Request->BindingExpiration));
uuid2StringLE(&Request->AppID, guidBuffer);
productName = getProductNameLE(&Request->AppID, AppList, &index);
p("Application ID : %s (%s)\n", guidBuffer, productName);
uuid2StringLE(&Request->ActID, guidBuffer);
#ifndef NO_EXTENDED_PRODUCT_LIST
productName = getProductNameLE(&Request->ActID, ExtendedProductList, &index);
#else
productName = "Unknown";
#endif
p("Activation ID (Product) : %s (%s)\n", guidBuffer, productName);
uuid2StringLE(&Request->KMSID, guidBuffer);
#ifndef NO_BASIC_PRODUCT_LIST
productName = getProductNameLE(&Request->KMSID, ProductList, &index);
#else
productName = "Unknown";
#endif
p("Key Management Service ID : %s (%s)\n", guidBuffer, productName);
uuid2StringLE(&Request->CMID, guidBuffer);
p("Client machine ID : %s\n", guidBuffer);
uuid2StringLE(&Request->CMID_prev, guidBuffer);
p("Previous client machine ID : %s\n", guidBuffer);
char mbstr[64];
time_t st;
st = fileTimeToUnixTime(&Request->ClientTime);
strftime(mbstr, sizeof(mbstr), "%Y-%m-%d %X", gmtime(&st));
p("Client request timestamp (UTC) : %s\n", mbstr);
ucs2_to_utf8(Request->WorkstationName, WorkstationBuffer, WORKSTATION_NAME_BUFFER, sizeof(WorkstationBuffer));
p("Workstation name : %s\n", WorkstationBuffer);
p("N count policy (minimum clients): %u\n", (uint32_t)LE32(Request->N_Policy));
}
void logResponseVerbose(const char *const ePID, const BYTE *const hwid, const RESPONSE *const response, const PRINTFUNC p)
{
char guidBuffer[GUID_STRING_LENGTH + 1];
//SYSTEMTIME st;
p("Protocol version : %u.%u\n", (uint32_t)LE16(response->MajorVer), (uint32_t)LE16(response->MinorVer));
p("KMS host extended PID : %s\n", ePID);
if (LE16(response->MajorVer) > 5)
# ifndef _WIN32
p("KMS host Hardware ID : %016llX\n", (unsigned long long)BE64(*(uint64_t*)hwid));
# else // _WIN32
p("KMS host Hardware ID : %016I64X\n", (unsigned long long)BE64(*(uint64_t*)hwid));
# endif // WIN32
uuid2StringLE(&response->CMID, guidBuffer);
p("Client machine ID : %s\n", guidBuffer);
char mbstr[64];
time_t st;
st = fileTimeToUnixTime(&response->ClientTime);
strftime(mbstr, sizeof(mbstr), "%Y-%m-%d %X", gmtime(&st));
p("Client request timestamp (UTC) : %s\n", mbstr);
p("KMS host current active clients : %u\n", (uint32_t)LE32(response->Count));
p("Renewal interval policy : %u\n", (uint32_t)LE32(response->VLRenewalInterval));
p("Activation interval policy : %u\n", (uint32_t)LE32(response->VLActivationInterval));
}

1113
rpc.c

File diff suppressed because it is too large Load diff

178
rpc.h
View file

@ -1,178 +0,0 @@
#ifndef __rpc_h
#define __rpc_h
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#include "types.h"
typedef struct {
BYTE VersionMajor;
BYTE VersionMinor;
BYTE PacketType;
BYTE PacketFlags;
DWORD DataRepresentation;
WORD FragLength;
WORD AuthLength;
DWORD CallId;
} /*__packed*/ RPC_HEADER;
typedef struct {
WORD MaxXmitFrag;
WORD MaxRecvFrag;
DWORD AssocGroup;
DWORD NumCtxItems;
struct {
WORD ContextId;
WORD NumTransItems;
GUID InterfaceUUID;
WORD InterfaceVerMajor;
WORD InterfaceVerMinor;
GUID TransferSyntax;
DWORD SyntaxVersion;
} CtxItems[1];
} /*__packed*/ RPC_BIND_REQUEST;
typedef struct {
WORD MaxXmitFrag;
WORD MaxRecvFrag;
DWORD AssocGroup;
WORD SecondaryAddressLength;
BYTE SecondaryAddress[6];
DWORD NumResults;
struct {
WORD AckResult;
WORD AckReason;
GUID TransferSyntax;
DWORD SyntaxVersion;
} Results[0];
} /*__packed*/ RPC_BIND_RESPONSE;
typedef struct {
DWORD AllocHint;
WORD ContextId;
WORD Opnum;
struct {
DWORD DataLength;
DWORD DataSizeIs;
} Ndr;
BYTE Data[0];
} /*__packed*/ RPC_REQUEST;
typedef struct {
DWORD AllocHint;
WORD ContextId;
BYTE CancelCount;
BYTE Pad1;
struct {
DWORD DataLength;
DWORD DataSizeIs1;
DWORD DataSizeIs2;
} Ndr;
BYTE Data[0];
} /*__packed*/ RPC_RESPONSE;
typedef struct {
DWORD AllocHint;
WORD ContextId;
WORD Opnum;
union {
struct {
DWORD DataLength;
DWORD DataSizeIs;
BYTE Data[0];
} Ndr;
struct {
uint64_t DataLength;
uint64_t DataSizeIs;
BYTE Data[0];
} Ndr64;
};
} /*__packed*/ RPC_REQUEST64;
typedef struct {
DWORD AllocHint;
WORD ContextId;
BYTE CancelCount;
BYTE Pad1;
union {
struct {
DWORD DataLength;
DWORD DataSizeMax;
union
{
DWORD DataSizeIs;
DWORD status;
};
BYTE Data[0];
} Ndr;
struct {
uint64_t DataLength;
uint64_t DataSizeMax;
union
{
uint64_t DataSizeIs;
DWORD status;
};
BYTE Data[0];
} Ndr64;
};
} /*__packed*/ RPC_RESPONSE64;
typedef SOCKET RpcCtx;
typedef int RpcStatus;
#define INVALID_NDR_CTX ((WORD)~0)
#define RPC_BIND_ACCEPT (0)
#define RPC_BIND_NACK (LE16(2))
#define RPC_BIND_ACK (LE16(3))
#define RPC_SYNTAX_UNSUPPORTED (LE16(2))
#define RPC_ABSTRACTSYNTAX_UNSUPPORTED (LE16(1))
#define RPC_BTFN_SEC_CONTEXT_MULTIPLEX (LE16(1))
#define RPC_BTFN_KEEP_ORPHAN (LE16(2))
#define INVALID_RPCCTX INVALID_SOCKET
#define closeRpc socketclose
#define RPC_PT_REQUEST 0
#define RPC_PT_RESPONSE 2
#define RPC_PT_BIND_REQ 11
#define RPC_PT_BIND_ACK 12
#define RPC_PT_ALTERCONTEXT_REQ 14
#define RPC_PT_ALTERCONTEXT_ACK 15
#define RPC_PF_FIRST 1
#define RPC_PF_LAST 2
#define RPC_PF_CANCEL_PENDING 4
#define RPC_PF_RESERVED 8
#define RPC_PF_MULTIPLEX 16
#define RPC_PF_NOT_EXEC 32
#define RPC_PF_MAYBE 64
#define RPC_PF_OBJECT 128
typedef union _RPC_FLAGS
{
DWORD mask;
struct {
uint32_t FlagsBTFN : 16;
BOOL HasNDR32 : 1;
BOOL HasNDR64 : 1;
BOOL HasBTFN : 1;
};
} RPC_FLAGS, *PRPC_FLAGS;
extern RPC_FLAGS RpcFlags;
void rpcServer(const RpcCtx socket, const DWORD RpcAssocGroup, const char* const ipstr);
RpcStatus rpcBindClient(const RpcCtx sock, const int_fast8_t verbose);
RpcStatus rpcSendRequest(const RpcCtx socket, const BYTE *const KmsRequest, const size_t requestSize, BYTE **KmsResponse, size_t *const responseSize);
#endif // __rpc_h

653
src/GNUmakefile Normal file
View file

@ -0,0 +1,653 @@
################################################################################
.PHONY: clean
PROGRAM_NAME ?= ../bin/vlmcsd
CLIENT_NAME ?= ../bin/vlmcs
MULTI_NAME ?= ../bin/vlmcsdmulti
OBJ_NAME ?= ../build/libkms-static.o
A_NAME ?= ../lib/libkms.a
CONFIG ?= config.h
COMPILER_LANGUAGE ?= c
BASE_PROGRAM_NAME=$(notdir $(PROGRAM_NAME))
BASE_CLIENT_NAME=$(notdir $(CLIENT_NAME))
BASE_MULTI_NAME=$(notdir $(MULTI_NAME))
BASE_DLL_NAME=$(notdir $(DLL_NAME))
BASE_A_NAME=$(notdir $(A_NAME))
ifeq (1,$(FROM_PARENT))
CLIENT_NAME_TEST=$(patsubst /%,/,$(CLIENT_NAME))
MULTI_NAME_TEST=$(patsubst /%,/,$(MULTI_NAME))
DLL_NAME_TEST=$(patsubst /%,/,$(DLL_NAME))
A_NAME_TEST=$(patsubst /%,/,$(A_NAME))
PROGRAM_NAME_TEST=$(patsubst /%,/,$(PROGRAM_NAME))
ifneq (/,$(PROGRAM_NAME_TEST))
PROGRAM_PREFIX=../
endif
ifneq (/,$(CLIENT_NAME_TEST))
CLIENT_PREFIX=../
endif
ifneq (/,$(MULTI_NAME_TEST))
MULTI_PREFIX=../
endif
ifneq (/,$(DLL_NAME_TEST))
DLL_PREFIX=../
endif
ifneq (/,$(A_NAME_TEST))
A_PREFIX=../
endif
endif
REAL_PROGRAM_NAME=$(PROGRAM_PREFIX)$(PROGRAM_NAME)
REAL_CLIENT_NAME=$(CLIENT_PREFIX)$(CLIENT_NAME)
REAL_MULTI_NAME=$(MULTI_PREFIX)$(MULTI_NAME)
REAL_DLL_NAME=$(DLL_PREFIX)$(DLL_NAME)
REAL_A_NAME=$(A_PREFIX)$(A_NAME)
# crypto library to use for standard algos, could save ~1-2kb ;)
# can be either 'openssl', 'polarssl' or anything other for internal impl
CRYPTO ?= internal
# use DNS_PARSER=internal if your OS doesn't supply the DNS parser routines
DNS_PARSER ?= OS
# You should supply your own version string here
VLMCSD_VERSION ?= $(shell test -d ../.git && git describe)
FEATURES ?= full
VERBOSE ?= NO
################################################################################
CC ?= gcc
TARGETPLATFORM := $(shell LANG=en_US.UTF-8 $(CC) -v 2>&1 | grep '^Target: ' | cut -f 2 -d ' ')
ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
DARWIN := 1
UNIX := 1
endif
ifneq (,$(findstring android,$(TARGETPLATFORM)))
ANDROID := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring minix,$(TARGETPLATFORM)))
MINIX := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring mingw,$(TARGETPLATFORM)))
MINGW := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring cygwin,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring cygnus,$(TARGETPLATFORM)))
CYGWIN := 1
WIN := 1
PE := 1
endif
ifneq (,$(findstring freebsd,$(TARGETPLATFORM)))
FREEBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring netbsd,$(TARGETPLATFORM)))
NETBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring openbsd,$(TARGETPLATFORM)))
OPENBSD := 1
UNIX := 1
BSD := 1
ELF := 1
endif
ifneq (,$(findstring solaris,$(TARGETPLATFORM)))
SOLARIS := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring linux,$(TARGETPLATFORM)))
LINUX := 1
UNIX := 1
ELF := 1
endif
ifneq (,$(findstring gnu,$(TARGETPLATFORM)))
ifeq (,$(findstring linux,$(TARGETPLATFORM)))
UNIX := 1
HURD := 1
ELF := 1
endif
endif
ifeq ($(CYGWIN),1)
DLL_NAME ?= ../lib/cygkms.dll
else ifeq ($(WIN),1)
DLL_NAME ?= ../lib/libkms.dll
else ifeq ($(DARWIN),1)
DLL_NAME ?= ../lib/libkms.dylib
else
DLL_NAME ?= ../lib/libkms.so
endif
BASECFLAGS = -DVLMCSD_COMPILER=\"$(notdir $(CC))\" -DVLMCSD_PLATFORM=\"$(TARGETPLATFORM)\" -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
BASELDFLAGS =
STRIPFLAGS =
CLIENTLDFLAGS =
SERVERLDFLAGS =
ifndef SAFE_MODE
BASECFLAGS += -fvisibility=hidden -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants
ifeq ($(ELF),1)
BASELDFLAGS += -Wl,-z,norelro
endif
ifneq (,$(findstring gcc,$(notdir $(CC))))
BASECFLAGS += -flto
endif
endif
ifeq ($(ELF), 1)
PICFLAGS += -fPIC
endif
ifeq ($(NOLIBS),1)
NOLRESOLV=1
NOLPTHREAD=1
endif
ifneq ($(NOLIBS),1)
ifeq ($(MINGW),1)
BASELDFLAGS += -lws2_32 -liphlpapi -lshlwapi
endif
endif
ifneq ($(NOLIBS),1)
ifeq ($(CYGWIN),1)
BASELDFLAGS += -liphlpapi
endif
endif
ifneq ($(NO_DNS),1)
ifneq ($(ANDROID),1)
ifneq ($(NOLRESOLV),1)
ifeq ($(MINGW),1)
CLIENTLDFLAGS += -ldnsapi
endif
ifeq ($(LINUX),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(HURD),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(DARWIN),1)
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(CYGWIN),1)
DNS_PARSER := internal
CLIENTLDFLAGS += -lresolv
endif
ifeq ($(OPENBSD),1)
DNS_PARSER := internal
endif
ifeq ($(SOLARIS),1)
CLIENTLDFLAGS += -lresolv
endif
endif
endif
else
BASECFLAGS += -DNO_DNS
endif
ifneq ($(CAT),2)
BASECFLAGS += "-Wall"
endif
ifeq ($(DARWIN), 1)
STRIPFLAGS += -Wl,-S -Wl,-x
BASECFLAGS += -Wno-deprecated-declarations
else ifeq ($(shell uname), SunOS)
STRIPFLAGS += -s
ifeq ($(notdir $(LD_ALTEXEC)),gld)
BASELDFLAGS += -Wl,--gc-sections
endif
BASELDFLAGS += -lsocket
else
ifneq ($(CC),tcc)
BASELDFLAGS += -Wl,--gc-sections
endif
STRIPFLAGS += -s
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 -DNO_TAP -UNO_SOCKETS -USIMPLE_RPC
ifeq ($(FEATURES), embedded)
BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), autostart)
BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
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_TAP -DNO_CLIENT_LIST -DUNSAFE_DATA_LOAD -DNO_EXTERNAL_DATA -UFULL_INTERNAL_DATA -U_PEDANTIC
else ifeq ($(FEATURES), most)
BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
else ifeq ($(FEATURES), inetd)
BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT -DNO_VERSION_INFORMATION
else ifeq ($(FEATURES), fixedepids)
BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
endif
ifdef INI
BASECFLAGS += -DINI_FILE=\"$(INI)\"
endif
ifdef DATA
BASECFLAGS += -DDATA_FILE=\"$(DATA)\"
endif
ifeq ($(NO_GETIFADDRS), 1)
BASECFLAGS += -DNO_GETIFADDRS
endif
ifeq ($(THREADS), 1)
BASECFLAGS += -DUSE_THREADS
endif
ifeq ($(CHILD_HANDLER), 1)
BASECFLAGS += -DCHILD_HANDLER
endif
ifeq ($(NO_TIMEOUT), 1)
BASECFLAGS += -DNO_TIMEOUT
endif
ifdef WINDOWS
BASECFLAGS += -DEPID_WINDOWS=\"$(WINDOWS)\"
endif
ifdef OFFICE2010
BASECFLAGS += -DEPID_OFFICE2010=\"$(OFFICE2010)\"
endif
ifdef OFFICE2013
BASECFLAGS += -DEPID_OFFICE2013=\"$(OFFICE2013)\"
endif
ifdef OFFICE2016
BASECFLAGS += -DEPID_OFFICE2016=\"$(OFFICE2016)\"
endif
ifdef HWID
BASECFLAGS += -DHWID=$(HWID)
endif
ifdef TERMINAL_WIDTH
BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH) -DDISPLAY_WIDTH=\"$(TERMINAL_WIDTH)\"
endif
ifeq ($(NOPROCFS), 1)
BASECFLAGS += -DNO_PROCFS
endif
ifeq ($(AUXV), 1)
BASECFLAGS += -DUSE_AUXV
endif
ifneq ($(ANDROID), 1)
ifneq ($(MINIX), 1)
ifneq ($(NOLPTHREAD), 1)
ifneq ($(DARWIN), 1)
ifeq ($(THREADS), 1)
SERVERLDFLAGS += -lpthread
endif
ifeq (,$(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)))
SERVERLDFLAGS += -lpthread
endif
endif
endif
endif
endif
$(REAL_MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
all: $(REAL_CLIENT_NAME) $(REAL_PROGRAM_NAME)
allmulti: $(REAL_CLIENT_NAME) $(REAL_PROGRAM_NAME) $(REAL_MULTI_NAME)
vlmcsd: $(REAL_PROGRAM_NAME)
+@true
vlmcs: $(REAL_CLIENT_NAME)
+@true
vlmcsdmulti: $(REAL_MULTI_NAME)
+@true
libkms: $(REAL_DLL_NAME)
+@true
libkms-static: $(REAL_A_NAME)
ifneq ($(strip $(VLMCSD_VERSION)),)
BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\"
endif
ifdef CAT
BASECFLAGS += -DONE_FILE
endif
SRCS = crypto.c kms.c endian.c output.c shared_globals.c helpers.c
HEADERS = $(CONFIG) types.h rpc.h vlmcsd.h endian.h crypto.h kms.h network.h output.h shared_globals.h vlmcs.h helpers.h kmsdata.h
DEPS = $(patsubst %,../build/%,$(MULTI_SRCS:.c=.d))
VLMCSD_SRCS = vlmcsd.c kmsdata.c $(SRCS)
VLMCSD_OBJS = $(patsubst %,../build/%,$(VLMCSD_SRCS:.c=.o))
VLMCS_SRCS = vlmcs.c kmsdata-full.c $(SRCS)
VLMCS_OBJS = $(patsubst %,../build/%,$(VLMCS_SRCS:.c=.o))
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c kmsdata-full.c $(SRCS)
MULTI_OBJS = $(patsubst %,../build/%,$(SRCS:.c=.o)) ../build/kmsdata-full.o ../build/vlmcsd-m.o ../build/vlmcs-m.o ../build/vlmcsdmulti-m.o
DLL_SRCS = libkms.c vlmcs.c $(SRCS)
DLL_OBJS = $(patsubst %,../build/%,$(DLL_SRCS:.c=-l.o))
A_OBJS = $(patsubst %,../build/%,$(DLL_SRCS:.c=-a.o))
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
HTMLDOCS = $(PDFDOCS:.pdf=.html)
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
ifneq ($(NO_DNS),1)
VLMCS_SRCS += dns_srv.c
MULTI_SRCS += dns_srv.c
MULTI_OBJS += ../build/dns_srv.o
ifeq ($(DNS_PARSER),internal)
ifneq ($(MINGW),1)
VLMCS_SRCS += ns_parse.c ns_name.c
MULTI_SRCS += ns_parse.c ns_name.c
MULTI_OBJS += ../build/ns_parse.o ../build/ns_name.o
BASECFLAGS += "-DDNS_PARSER_INTERNAL"
endif
endif
endif
ifeq ($(MSRPC),1)
VLMCSD_SRCS += msrpc-server.c
VLMCS_SRCS += msrpc-client.c
MULTI_SRCS += msrpc-server.c msrpc-client.c
MULTI_OBJS += ../build/msrpc-server-m.o ../build/msrpc-client-m.o
DLL_SRCS += msrpc-server.c
BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
BASELDFLAGS += -lrpcrt4
else
SRCS += network.c rpc.c
endif
ifeq ($(GETIFADDRS),musl)
ifneq ($(NO_GETIFADDRS),1)
BASECFLAGS += -DGETIFADDRS_MUSL
VLMCSD_SRCS += getifaddrs-musl.c
MULTI_SRCS += getifaddrs-musl.c
VLMCS_SRCS += getifaddrs-musl.c
DLL_SRCS += getifaddrs-musl.c
MULTI_OBJS += ../build/getifaddrs-musl.o
endif
endif
ifeq ($(ANDROID),1)
ifneq ($(NO_GETIFADDRS),1)
VLMCSD_SRCS += ifaddrs-android.c
MULTI_SRCS += ifaddrs-android.c
DLL_SRCS += ifaddrs-android.c
MULTI_OBJS += ../build/ifaddrs-android.o
endif
endif
ifeq "$(WIN)" "1"
VLMCSD_SRCS += ntservice.c wintap.c
MULTI_SRCS += ntservice.c wintap.c
MULTI_OBJS += ../build/ntservice.o ../build/wintap.o
endif
ifeq ($(CRYPTO), openssl_with_aes)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl_with_aes_soft)
BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL -D_OPENSSL_SOFTWARE
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), openssl)
BASECFLAGS += -D_CRYPTO_OPENSSL
BASELDFLAGS += -lcrypto
SRCS += crypto_openssl.c
else ifeq ($(CRYPTO), polarssl)
BASECFLAGS += -D_CRYPTO_POLARSSL
BASELDFLAGS += -lpolarssl
else ifeq ($(CRYPTO), windows)
BASECFLAGS += -D_CRYPTO_WINDOWS
SRCS += crypto_windows.c
else
BASECFLAGS += -D_CRYPTO_INTERNAL
SRCS += crypto_internal.c
endif
ifneq ($(STRIP),0)
BASELDFLAGS += $(STRIPFLAGS)
endif
ifeq ($(OPENSSL_HMAC),0)
BASECFLAGS += -D_OPENSSL_NO_HMAC
endif
ifeq ($(DEPENDENCIES),2)
BASECFLAGS += -MMD
endif
ifeq ($(VERBOSE),3)
COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
ARCHIVER := $(shell printf "%-40s" $(notdir $(AR)))
endif
ARCMD := AR
ifdef CAT
LDCMD := CC/LD
else
LDCMD := LD
endif
-include $(MULTI_SRCS:.c=.d)
../build/%.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $< -o $@
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $< -o $@
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
endif
../build/%-m.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $< -MT $@
endif
endif
../build/%-a.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
endif
../build/%-l.o: %.c
ifeq ($(VERBOSE),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
else
+@echo "$(COMPILER) CC $(notdir $@) <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
ifeq ($(DEPENDENCIES),1)
+@echo "$(COMPILER) DEP $*.d <- $<"
+@$(CC) -x$(COMPILER_LANGUAGE) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
endif
endif
ifdef CAT
BUILDCOMMAND = cat $^ | $(CC) -x$(COMPILER_LANGUAGE) -o $@ -
VLMCSD_PREREQUISITES = $(VLMCSD_SRCS)
VLMCS_PREREQUISITES = $(VLMCS_SRCS)
MULTI_PREREQUISITES = $(MULTI_SRCS)
DLL_PREREQUISITES = $(DLL_SRCS)
OBJ_PREREQUISITES = $(DLL_SRCS)
A_PREREQUISITES = $(DLL_SRCS)
else
BUILDCOMMAND = $(CC) -o $@ $^
VLMCSD_PREREQUISITES = $(VLMCSD_OBJS)
VLMCS_PREREQUISITES = $(VLMCS_OBJS)
MULTI_PREREQUISITES = $(MULTI_OBJS)
DLL_PREREQUISITES = $(DLL_OBJS)
OBJ_PREREQUISITES = $(A_OBJS)
A_PREREQUISITES = $(A_OBJS)
endif
ifeq ($(VERBOSE),1)
BUILDCOMMANDPREFIX = +
else
BUILDCOMMANDPREFIX = +@
endif
INFOCOMMAND = +@echo "$(COMPILER) $(LDCMD) $@ <- $(notdir $^)"
ARINFOCOMMAND = +@echo "$(ARCHIVER) $(ARCMD) $@ <. $(notdir $^)"
VLMCSD_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS)
VLMCS_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS)
MULTI_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS) $(SERVERLDFLAGS)
DLL_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PICFLAGS) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -shared -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
OBJ_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
$(REAL_PROGRAM_NAME): $(VLMCSD_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(VLMCSD_COMMAND)
$(REAL_CLIENT_NAME): $(VLMCS_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(VLMCS_COMMAND)
$(REAL_MULTI_NAME): $(MULTI_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(MULTI_COMMAND)
$(REAL_DLL_NAME): $(DLL_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(DLL_COMMAND)
ifndef CAT
$(OBJ_NAME):
+@echo Cannot make $@ without CAT defined. Please create $(A_NAME)
else
$(OBJ_NAME): $(OBJ_PREREQUISITES)
ifneq ($(VERBOSE),1)
$(INFOCOMMAND)
endif
$(OBJ_COMMAND)
endif
ifdef CAT
$(REAL_A_NAME): $(OBJ_NAME)
else
$(REAL_A_NAME): BASECFLAGS += -fvisibility=hidden -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
$(REAL_A_NAME): $(A_OBJS)
endif
ifneq ($(VERBOSE),1)
$(ARINFOCOMMAND)
endif
+@rm -f $@
$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
clean:
rm -f $(REAL_PROGRAM_NAME) $(REAL_MULTI_NAME) $(REAL_DLL_NAME) $(REAL_CLIENT_NAME) $(OBJ_NAME) $(REAL_A_NAME) ../bin/* ../build/* *.d
dnsclean:
rm -f ../build/dns_srv.o
help:
@echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."

View file

@ -41,6 +41,8 @@
#define TRANSMIT_AS_TABLE_SIZE 0
#define WIRE_MARSHAL_TABLE_SIZE 0
#if !MULTI_CALL_BINARY
typedef struct _KMSServer_MIDL_TYPE_FORMAT_STRING
{
short Pad;
@ -68,6 +70,8 @@ extern const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString;
extern const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString;
extern const KMSServer_MIDL_EXPR_FORMAT_STRING KMSServer__MIDL_ExprFormatString;
#endif // !MULTI_CALL_BINARY
#define GENERIC_BINDING_TABLE_SIZE 0
@ -231,8 +235,6 @@ int RequestActivation(
}
};
#endif // !MULTI_CALL_BINARY
static const unsigned short KMSServer_FormatStringOffsetTable[] =
{
0
@ -241,7 +243,6 @@ static const unsigned short KMSServer_FormatStringOffsetTable[] =
//typedef void *(__RPC_API midl_user_allocate_t)(size_t);
typedef void *(__RPC_API *midl_allocate_t)(size_t);
#if !MULTI_CALL_BINARY
/*static*/ const MIDL_STUB_DESC KMSServer_StubDesc =
{
(void *)& KMSServer___RpcClientInterface,

View file

@ -33,6 +33,8 @@
#include "KMSServer_h.h"
#if !MULTI_CALL_BINARY
#define TYPE_FORMAT_STRING_SIZE 43
#define PROC_FORMAT_STRING_SIZE 61
#define EXPR_FORMAT_STRING_SIZE 1
@ -70,6 +72,8 @@ extern const KMSServer_MIDL_TYPE_FORMAT_STRING KMSServer__MIDL_TypeFormatString;
extern const KMSServer_MIDL_PROC_FORMAT_STRING KMSServer__MIDL_ProcFormatString;
extern const KMSServer_MIDL_EXPR_FORMAT_STRING KMSServer__MIDL_ExprFormatString;
#endif // !MULTI_CALL_BINARY
#define GENERIC_BINDING_TABLE_SIZE 0
@ -233,14 +237,12 @@ int RequestActivation(
}
};
#endif //!MULTI_CALL_BINARY
static const unsigned short KMSServer_FormatStringOffsetTable[] =
{
0
};
#endif //!MULTI_CALL_BINARY
#endif /* defined(_M_AMD64)*/
@ -276,6 +278,8 @@ static const unsigned short KMSServer_FormatStringOffsetTable[] =
#include "ndr64types.h"
#include "pshpack8.h"
#if !MULTI_CALL_BINARY
typedef
struct
{
@ -363,7 +367,6 @@ NDR64_FORMAT_UINT32
__midl_frag1_t;
extern const __midl_frag1_t __midl_frag1;
#if !MULTI_CALL_BINARY
/*static*/ const __midl_frag13_t __midl_frag13 =
{
/* */
@ -652,6 +655,7 @@ extern const __midl_frag1_t __midl_frag1;
#include "poppack.h"
#if !MULTI_CALL_BINARY
static const FormatInfoRef KMSServer_Ndr64ProcTable[] =
{
@ -661,7 +665,6 @@ static const FormatInfoRef KMSServer_Ndr64ProcTable[] =
//typedef void *__RPC_USER MIDL_user_allocate_t(SIZE_T)
typedef void *(__RPC_API *midl_allocate_t)(size_t);
#if !MULTI_CALL_BINARY
/*static*/ const MIDL_STUB_DESC KMSServer_StubDesc =
{
(void *)& KMSServer___RpcClientInterface,
@ -685,7 +688,6 @@ typedef void *(__RPC_API *midl_allocate_t)(size_t);
(void *)& KMSServer_ProxyInfo, /* proxy/server info */
0
};
#endif // !MULTI_CALL_BINARY
static const MIDL_SYNTAX_INFO KMSServer_SyntaxInfo [ 2 ] =
{
@ -711,6 +713,8 @@ static const MIDL_SYNTAX_INFO KMSServer_SyntaxInfo [ 2 ] =
}
};
#endif // !MULTI_CALL_BINARY
/*static*/ const MIDL_STUBLESS_PROXY_INFO KMSServer_ProxyInfo =
{
&KMSServer_StubDesc,

View file

@ -18,6 +18,10 @@
*/
/* @@MIDL_FILE_HEADING( ) */
#if _WIN32
#include "winsock2.h"
#endif
#pragma warning( disable: 4049 ) /* more than 64k source lines */

View file

@ -12,17 +12,17 @@
/*
* ----------------------------------------------------------------------------------------
* Useful customizations. These options are mandatory. You cannot comment them out.
* Feel free to change them to fit your needs.
* ----------------------------------------------------------------------------------------
*/
/*
* ----------------------------------------------------------------------------------------
* Useful customizations. These options are mandatory. You cannot comment them out.
* Feel free to change them to fit your needs.
* ----------------------------------------------------------------------------------------
*/
#ifndef VERSION
/*
* Define your own version identifier here, e.g. '#define VERSION "my vlmcsd based on svn560"'
*/
/*
* Define your own version identifier here, e.g. '#define VERSION "my vlmcsd based on 1103"'
*/
#define VERSION "private build"
@ -31,25 +31,9 @@
/*
* Define default ePIDs and HWID here. Preferrably grab ePIDs and HWID
* from a real KMS server.
*/
#ifndef EPID_WINDOWS
#define EPID_WINDOWS "06401-00206-271-298329-03-1033-9600.0000-0452015"
#endif
#ifndef EPID_OFFICE2010
#define EPID_OFFICE2010 "06401-00096-199-198322-03-1033-9600.0000-0452015"
#endif
#ifndef EPID_OFFICE2013
#define EPID_OFFICE2013 "06401-00206-234-398213-03-1033-9600.0000-0452015"
#endif
#ifndef HWID // HwId from the Ratiborus VM
#define HWID 0x36, 0x4F, 0x46, 0x3A, 0x88, 0x63, 0xD3, 0x5F
#define HWID 0x3A, 0x1C, 0x04, 0x96, 0x00, 0xB6, 0x00, 0x76
#endif
@ -63,26 +47,39 @@
/*
* -------------------------------
* Defaults
* -------------------------------
*/
/*
* -------------------------------
* Defaults
* -------------------------------
*/
#ifndef INI_FILE
/*
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
* at a default location
*/
/*
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
* at a default location.
*/
//#define INI_FILE "/etc/vlmcsd.ini"
//#define INI_FILE "/etc/vlmcsd.ini"
#endif // INI_FILE
#ifndef DATA_FILE
/*
* Uncomment and customize the following line if you want vlmcsd to look for a KMS data file
* at a custom default location.
*/
//#define DATA_FILE "/etc/vlmcsd.kmd"
#endif // DATA_FILE
/*
* ----------------------------------------------------------------------------------------
* Troubleshooting options. Please note that disabling features may also help troubleshooting.
@ -94,15 +91,15 @@
#ifndef CHILD_HANDLER
/*
* Uncomment the following #define if you are compiling for a platform that does
* not correctly handle the SA_NOCLDWAIT flag when ignoring SIGCHLD, i.e. forked
* processes remain as "zombies" after dying. This option will add a SIGCHLD handler that
* "waits" for a child that has terminated. This is only required for a few
* unixoid OSses.
*/
/*
* Uncomment the following #define if you are compiling for a platform that does
* not correctly handle the SA_NOCLDWAIT flag when ignoring SIGCHLD, i.e. forked
* processes remain as "zombies" after dying. This option will add a SIGCHLD handler that
* "waits" for a child that has terminated. This is only required for a few
* unixoid OSses.
*/
//#define CHILD_HANDLER
//#define CHILD_HANDLER
#endif // CHILD_HANDLER
@ -113,7 +110,7 @@
* not support custom socket send or receive timeouts.
*/
//#define NO_TIMEOUT
//#define NO_TIMEOUT
#endif // NO_TIMEOUT
@ -125,7 +122,7 @@
* detecting KMS servers via DNS.
*/
//#define NO_DNS
//#define NO_DNS
#endif // NO_DNS
@ -137,7 +134,7 @@
* This affects the output of "vlmcsd -x" only. It should be rarely necessary to use this.
*/
//#define TERMINAL_FIXED_WIDTH 80
//#define TERMINAL_FIXED_WIDTH 80
#endif // TERMINAL_FIXED_WIDTH
@ -151,7 +148,7 @@
* you are testing any KMS server or client emulator that may send malformed KMS packets.
*/
//#define _PEDANTIC
//#define _PEDANTIC
#endif // _PEDANTIC
@ -162,27 +159,19 @@
/*
* Cygwin, Linux, Android, NetBSD, DragonflyBSD:
* Do not rely on a properly mounted proc filesystem and use the less reliable
* argv[0] to determine the program's executable name when restarting vlmcsd
* by sending a SIGHUP signal. Use only if absolutely necessary (very old versions
* of these OSses).
* argv[0] to determine the program's executable name.
* Use only if absolutely necessary (very old versions of these OSses).
*
* FreeBSD:
* Do not use sysctl and but the less reliable
* argv[0] to determine the program's executable name when restarting vlmcsd
* by sending a SIGHUP signal. Use only if absolutely necessary (very old FreeBSD).
* Minix, OpenBSD:
* This option has no effect since the OS always must use the less reliable argv[0].
*
* OpenBSD:
* This option has no effect since OpenBSD always must use the less reliable argv[0].
*
* Mac OS X, Solaris:
* FreeBSD, Mac OS X, iOS, Solaris, Windows:
* This option is not neccessary (and has no effect) since these OSses provide
* a reliable way to determine the executable name.
*
* Windows:
* This option is not used because Windows doesn't support signals.
*/
//#define NO_PROCFS
//#define NO_PROCFS
#endif // NO_PROCFS
@ -192,9 +181,9 @@
#ifndef USE_AUXV
/*
* Linux only:
* Use the process' ELF aux vector to determine the executable name when restarting
* vlmcsd by sending a SIGHUP signal. This is actually the best method but is supported
* only with
* Use the process' ELF aux vector to determine the executable name.
* This is actually the best method but is supported only with
*
* * the musl library
* * the glbic library 2.16 or newer
*
@ -202,10 +191,10 @@
* Use it only if your system supports it and you do not plan to use the binary on older systems.
* It won't work on debian 7 or Red Hat 6.x.
*
* It it safe to try this by yourself. vlmcsd won't compile if your system doesn't support it.
* It is safe to try this by yourself. vlmcsd won't compile if your system doesn't support it.
*/
//#define USE_AUXV
//#define USE_AUXV
#endif // USE_AUXV
@ -220,7 +209,7 @@
* This may be necessary for some embedded devices that have OpenSSL without HMAC support.
*/
//#define _OPENSSL_NO_HMAC
//#define _OPENSSL_NO_HMAC
#endif // _OPENSSL_NO_HMAC
@ -235,26 +224,26 @@
#ifndef USE_THREADS
/*
* Do not use fork() but threads to serve your clients.
*
* Unix-like operarting systems:
* You may use this or not. Entirely your choice. Threads do not require explicitly allocating
* a shared memory segment which might be a problem on some systems. Using fork() is more robust
* although the threaded version of vlmcsd is rock solid too.
*
* Some older unixoid OSses may not have pthreads. Do NOT use USE_THREADS and define NO_SIGHUP
* and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
*
* Cygwin:
* It is recommended to use threads since fork() is extremely slow (no copy on write) and somewhat
* unstable.
*
* Windows:
* This option has no effect since fork() is not supported.
*/
/*
* Do not use fork() but threads to serve your clients.
*
* Unix-like operarting systems:
* You may use this or not. Entirely your choice. Threads do not require explicitly allocating
* a shared memory segment which might be a problem on some systems. Using fork() is more robust
* although the threaded version of vlmcsd is rock solid too.
*
* Some older unixoid OSses may not have pthreads. Do NOT use USE_THREADS and define NO_SIGHUP
* and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
*
* Cygwin:
* It is recommended to use threads since fork() is extremely slow (no copy on write) and somewhat
* unstable.
*
* Windows:
* This option has no effect since fork() is not supported.
*/
//#define USE_THREADS
//#define USE_THREADS
#endif // USE_THREADS
@ -275,7 +264,7 @@
* Do not define both _CRYPTO_OPENSSL and _CRYPTO_POLARSSL
*/
//#define _CRYPTO_POLARSSL
//#define _CRYPTO_POLARSSL
#endif // _CRYPTO_POLARSSL
@ -296,7 +285,7 @@
* Do not define both _CRYPTO_OPENSSL and _CRYPTO_POLARSSL
*/
//#define _CRYPTO_OPENSSL
//#define _CRYPTO_OPENSSL
#endif // _CRYPTO_OPENSSL
@ -316,7 +305,7 @@
* Don't use this except for your own research on the internals of OpenSSL.
*/
//#define _USE_AES_FROM_OPENSSL
//#define _USE_AES_FROM_OPENSSL
#endif // _USE_AES_FROM_OPENSSL
@ -332,28 +321,20 @@
* compiled without support for hardware accelerated AES. It's worth a try if _USE_AES_FROM_OPENSSL doesn't work.
*/
//#define _OPENSSL_SOFTWARE
//#define _OPENSSL_SOFTWARE
#endif // _OPENSSL_SOFTWARE
#ifndef FULL_INTERNAL_DATA
/*
* ------------------------------------------------------------------------------------------
* Extra features not compiled by default because they are rarely needed
* ------------------------------------------------------------------------------------------
* Includes the full database in vlmcsd.
*/
#ifndef INCLUDE_BETAS
/*
* Uncomment the following #define if you want obsolete beta/preview SKUs
* to be included in the extended product list.
*/
//#define INCLUDE_BETAS
#endif
//#define FULL_INTERNAL_DATA
#endif // FULL_INTERNAL_DATA
@ -366,35 +347,40 @@
*/
#ifndef NO_EXTENDED_PRODUCT_LIST
#ifndef NO_FREEBIND
/*
* Do not compile support for FREEBIND (Linux) and IP_BINDANY (FreeBSD). This disables the -F1 command
* line option and you can bind only to (listen on) IP addresses that are currently up and running on
* your system.
*/
//#define 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
/*
* Do not compile the extended product list. Removes the list of Activation GUIDs (aka
* Client SKU Id, License Id) and their respective product names (e.g. Windows 8.1 Enterprise).
*
* This affects logging only and does not have an effect on activation itself. As long as you
* do not also define NO_BASIC_PRODUCT_LIST more generic names like Windows 8.1 or Office 2013
* will still be logged. Saves a lot of space without loosing much functionality.
*
* Removes the -V option from vlmcsd and vlmcs that displays the version information
*/
//#define NO_EXTENDED_PRODUCT_LIST
//#define NO_VERSION_INFORMATION
#endif // NO_EXTENDED_PRODUCT_LIST
#ifndef NO_BASIC_PRODUCT_LIST
/*
* Do not compile the basic product list. Removes the list KMS GUIDs (aka Server SKU Id) and their
* respective product names. Only affects logging not activation. This has a negative impact only
* if you activate a product that is not (yet) in the extended product list. On the other hand you
* do not save much space by not compiling this list.
*/
//#define NO_BASIC_PRODUCT_LIST
#endif // NO_BASIC_PRODUCT_LIST
#endif // NO_VERSION_INFORMATION
@ -405,7 +391,7 @@
* option in the vlmcs client. Disables ini file directive LogVerbose.
*/
//#define NO_VERBOSE_LOG
//#define NO_VERBOSE_LOG
#endif // NO_VERBOSE_LOG
@ -416,24 +402,51 @@
/*
* Disables logging completely. You can neither log to a file nor to the console. -D and -f will
* start vlmcsd in foreground. -e will not be available. Disables ini file directive LogFile.
* Implies NO_VERBOSE_LOG, NO_EXTENDED_PRODUCT_LIST and NO_BASIC_PRODUCT_LIST.
* Implies NO_VERBOSE_LOG.
*/
//#define NO_LOG
//#define NO_LOG
#endif // NO_LOG
#ifndef NO_RANDOM_EPID
#ifndef NO_STRICT_MODES
/*
* Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
* real KMS server and want to use these. Removes -r from the vlmcsd command line and the ini
* file directive RandomizationLevel (The randomization level will be harcoded to 0).
* Disables emulator detection protection. Removes -M0, -M1, -E0, -E1, -K0, -K1, -K2 and -K3 from
* vlmcsd command line options and WhitelistingLevel from INI file parameters. vlmcsd always behaves
* as if it was started with -K0, -M0.
*/
//#define NO_RANDOM_EPID
//#define NO_STRICT_MODES
#endif // NO_STRICT_MODES
#ifndef NO_CLIENT_LIST
/*
* Disables the ability to maintain a list of Client Machine IDs (CMIDs). Removes -M0, -M1, -E0 and -E1
* from vlmcsd command line options.
*/
//#define NO_CLIENT_LIST
#endif // !NO_CLIENT_LIST
#ifndef NO_RANDOM_EPID
/*
* Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
* real KMS server and want to use these. Removes -r from the vlmcsd command line and the ini
* file directive RandomizationLevel (The randomization level will be harcoded to 0).
*/
//#define NO_RANDOM_EPID
#endif // NO_RANDOM_EPID
@ -445,7 +458,7 @@
* Disables the ability to use a configuration file (aka ini file). Removes -i from the command line.
*/
//#define NO_INI_FILE
//#define NO_INI_FILE
#endif // NO_INI_FILE
@ -453,19 +466,59 @@
#ifndef NO_PID_FILE
/*
/*
* Disables the abilty to write a pid file containing the process id of vlmcsd. If your init system
* does not need this feature, you can safely disables this but it won't save much space. Disables
* the use of -p from the command line and PidFile from the ini file.
*/
//#define NO_PID_FILE
//#define NO_PID_FILE
#endif // NO_PID_FILE
#ifndef NO_EXTERNAL_DATA
/*
* Disables the abilty to load external KMS data from a file. Disables command line options -j
* and ini file parameter KmsData. Implies UNSAFE_DATA_LOAD.
*/
//#define NO_EXTERNAL_DATA
#endif // NO_EXTERNAL_DATA
#ifndef NO_INTERNAL_DATA
/*
* Compiles vlmcsd and vlmcs without an internal database. If no database is found at
* either the default location or the file specified with command line option -j.,
* the program exits with an error message.
*/
//#define NO_INTERNAL_DATA
#endif // NO_INTERNAL_DATA
#ifndef UNSAFE_DATA_LOAD
/*
* Does not check an external KMS data file for integrity.
* This save some bytes but it dangerous if you load a KMS data file from an unknown source.
*/
//#define UNSAFE_DATA_LOAD
#endif // UNSAFE_DATA_LOAD
#ifndef NO_USER_SWITCH
/*
* Disables switching to another uid and/or gid after starting the program and setting up the sockets.
@ -477,7 +530,7 @@
* Cygwin.
*/
//#define NO_USER_SWITCH
//#define NO_USER_SWITCH
#endif // NO_USER_SWITCH
@ -490,7 +543,7 @@
* access to the man files vlmcsd.8 and vlmcs.1
*/
//#define NO_HELP
//#define NO_HELP
#endif // NO_HELP
@ -504,13 +557,26 @@
* -A and -R from the command line as well as ActivationInterval and RenewalInterval in the ini file.
*/
//#define NO_CUSTOM_INTERVALS
//#define NO_CUSTOM_INTERVALS
#endif // NO_CUSTOM_INTERVALS
#ifndef NO_PRIVATE_IP_DETECT
/*
* Disables the ability to protect vlmcsd against KMS requests from public IP addresses.
* Removes -o from the command line.
*/
//#define NO_PRIVATE_IP_DETECT
#endif // NO_PRIVATE_IP_DETECT
#ifndef NO_SOCKETS
/*
* Disables standalone startup of vlmcsd. If you use this config directive, you must start vlmcsd from an internet
@ -518,7 +584,7 @@
* command line. Socket setup is the job of your superserver.
*/
//#define NO_SOCKETS
//#define NO_SOCKETS
#endif // NO_SOCKETS
@ -531,7 +597,7 @@
* Removes -0, -3, -w and -H from the vlmcsd command line.
*/
//#define NO_CL_PIDS
//#define NO_CL_PIDS
#endif // NO_CL_PIDS
@ -550,7 +616,7 @@
* and NO_LIMIT instead to disable use of the pthreads, shared memory and semaphores.
*/
//#define NO_LIMIT
//#define NO_LIMIT
#endif // NO_LIMIT
@ -570,13 +636,38 @@
* This option has no effect on native Windows since Posix signaling is not supported. It can be used with Cygwin.
*/
//#define NO_SIGHUP
//#define NO_SIGHUP
#endif // NO_SIGHUP
#ifndef SIMPLE_RPC
/*
* Uses a simple version of the RPC protocol which does not support NDR64 and BTFN.
* Supports RPC with the features present in Windows XP and earlier only. Using this creates
* smaller binaries but makes emulator detection easier.
*/
//#define SIMPLE_RPC
#endif // !SIMPLE_RPC
#ifndef SIMPLE_SOCKETS
/*
* Disables the ability to choose IP addresses using the -L option in vlmcsd. vlmcsd will listen on all IP addresses.
* It still supports IPv4 and IPv6.
*/
//#define SIMPLE_SOCKETS
#endif // SIMPLE_SOCKETS
/* Don't change anything BELOW this line */

View file

@ -17,28 +17,22 @@ const BYTE AesKeyV6[] = {
0xA9, 0x4A, 0x41, 0x95, 0xE2, 0x01, 0x43, 0x2D, 0x9B, 0xCB, 0x46, 0x04, 0x05, 0xD8, 0x4A, 0x21 };
static const BYTE SBox[] = {
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B,
0xFE, 0xD7, 0xAB, 0x76, 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0,
0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26,
0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2,
0xEB, 0x27, 0xB2, 0x75, 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0,
0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84, 0x53, 0xD1, 0x00, 0xED,
0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F,
0x50, 0x3C, 0x9F, 0xA8, 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5,
0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2, 0xCD, 0x0C, 0x13, 0xEC,
0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14,
0xDE, 0x5E, 0x0B, 0xDB, 0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C,
0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79, 0xE7, 0xC8, 0x37, 0x6D,
0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F,
0x4B, 0xBD, 0x8B, 0x8A, 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E,
0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E, 0xE1, 0xF8, 0x98, 0x11,
0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F,
0xB0, 0x54, 0xBB, 0x16
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0,
0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75,
0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8,
0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79,
0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A,
0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E,
0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16
};
@ -123,7 +117,7 @@ void AesInitKey(AesCtx *Ctx, const BYTE *Key, int_fast8_t IsV6, int RijndaelKeyB
memcpy(Ctx->Key, Key, RijndaelKeyBytes);
for ( i = RijndaelKeyDwords; i < ( Ctx->rounds + 1 ) << 2; i++ )
for ( i = (uint_fast8_t)RijndaelKeyDwords; i < ( Ctx->rounds + 1 ) << 2; i++ )
{
temp = Ctx->Key[ i - 1 ];
@ -221,31 +215,45 @@ void AesCmacV4(BYTE *Message, size_t MessageSize, BYTE *MacOut)
#if !defined(_CRYPTO_OPENSSL) || !defined(_USE_AES_FROM_OPENSSL)
#ifndef SMALL_AES
static const BYTE SBoxR[] = {
0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E,
0x81, 0xF3, 0xD7, 0xFB, 0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87,
0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB, 0x54, 0x7B, 0x94, 0x32,
0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E,
0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49,
0x6D, 0x8B, 0xD1, 0x25, 0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16,
0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92, 0x6C, 0x70, 0x48, 0x50,
0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84,
0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4, 0x58, 0x05,
0xB8, 0xB3, 0x45, 0x06, 0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02,
0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B, 0x3A, 0x91, 0x11, 0x41,
0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73,
0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8,
0x1C, 0x75, 0xDF, 0x6E, 0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89,
0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B, 0xFC, 0x56, 0x3E, 0x4B,
0xC6, 0xD2, 0x79, 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4,
0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59,
0x27, 0x80, 0xEC, 0x5F, 0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D,
0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF, 0xA0, 0xE0, 0x3B, 0x4D,
0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61,
0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1, 0x69, 0x14, 0x63,
0x55, 0x21, 0x0C, 0x7D
0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB,
0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E,
0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25,
0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92,
0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84,
0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06,
0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B,
0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73,
0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E,
0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B,
0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4,
0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F,
0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF,
0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61,
0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D
};
#define GetSBoxR(x) SBoxR[x]
#else // SMALL_AES
static uint8_t SBoxR(uint8_t byte)
{
uint8_t i;
for (i = 0; TRUE; i++)
{
if (byte == SBox[i]) return i;
}
}
#define GetSBoxR(x) SBoxR(x)
#endif // SMALL_AES
static void ShiftRowsR(BYTE *state)
{
@ -264,7 +272,9 @@ static void SubBytesR(BYTE *block)
uint_fast8_t i;
for (i = 0; i < AES_BLOCK_BYTES; i++)
block[i] = SBoxR[ block[i] ];
{
block[i] = GetSBoxR( block[i] );
}
}

View file

@ -14,12 +14,10 @@
#include "endian.h"
#include <stdint.h>
//#define AES_ROUNDS (10)
#define AES_KEY_BYTES (16) // 128 Bits
#define AES_BLOCK_BYTES (16)
#define AES_BLOCK_WORDS (AES_BLOCK_BYTES / sizeof(DWORD))
#define AES_KEY_DWORDS (AES_KEY_BYTES / sizeof(DWORD))
//#define V4_ROUNDS (11)
#define V4_KEY_BYTES (20) // 160 Bits
#define ROR32(v, n) ( (v) << (32 - n) | (v) >> n )
@ -39,7 +37,7 @@ typedef struct {
void AesInitKey(AesCtx *Ctx, const BYTE *Key, int_fast8_t IsV6, int AesKeyBytes);
void AesEncryptBlock(const AesCtx *const Ctx, BYTE *block);
void AesDecryptBlock(const AesCtx *const Ctx, BYTE *block);
void AesEncryptCbc(const AesCtx *const Ctx, BYTE *iv, BYTE *data, size_t *len);
void AesEncryptCbc(const AesCtx *const Ctx, BYTE *restrict iv, BYTE *restrict data, size_t *restrict len);
void AesDecryptCbc(const AesCtx *const Ctx, BYTE *iv, BYTE *data, size_t len);
void MixColumnsR(BYTE *restrict state);

View file

@ -95,7 +95,7 @@ static void Sha256Update(Sha256Ctx *Ctx, BYTE *data, size_t len)
unsigned int b_len = Ctx->Len & 63,
r_len = (b_len ^ 63) + 1;
Ctx->Len += len;
Ctx->Len += (unsigned int)len;
if ( len < r_len )
{

View file

@ -39,7 +39,7 @@ static int_fast8_t AcquireCryptContext()
{
if (!hRsaAesProvider)
{
return CryptAcquireContextW
return (int_fast8_t)CryptAcquireContextW
(
&hRsaAesProvider, // Provider handle
NULL, // No key container name
@ -163,7 +163,7 @@ int_fast8_t Sha256Hmac(const BYTE* key, BYTE* restrict data, DWORD len, BYTE* re
if (hKey) CryptDestroyKey(hKey);
if (hHmacHash) CryptDestroyHash(hHmacHash);
return success;
return (int_fast8_t)success;
}
#endif // _WIN32 || __CYGWIN__

View file

@ -11,6 +11,9 @@
#else // _WIN32 || __CYGWIN__
#include "types.h"
#if _MSC_VER
#include "Wincrypt.h"
#endif
typedef struct _Sha2356HmacCtx
{
@ -18,7 +21,7 @@ typedef struct _Sha2356HmacCtx
HCRYPTKEY hKey;
} Sha256HmacCtx;
int_fast8_t Sha256(BYTE *data, DWORD len, BYTE *hash);
int_fast8_t Sha256(BYTE* restrict data, DWORD DataSize, BYTE* restrict hash);
int_fast8_t Sha256Hmac(const BYTE* key, BYTE* restrict data, DWORD len, BYTE* restrict hmac);
/*int_fast8_t Sha256HmacInit(Sha256HmacCtx *Ctx, BYTE *key, uint8_t keySize);

View file

@ -22,7 +22,7 @@
#include <fcntl.h>
#include <errno.h>
#include <netdb.h>
//#ifndef DNS_PARSER_INTERNAL
//#ifndef DNS_PARSER_INTERNAL
#if __ANDROID__
#include <netinet/in.h>
#include "nameser.h"
@ -46,7 +46,7 @@
#include "ns_name.h"
#include "ns_parse.h"
// Define macros to redirect DNS parser functions to internal versions
// Define macros to redirect DNS parser functions to internal versions
#undef ns_msg
#undef ns_initparse
@ -86,14 +86,14 @@ static unsigned int isqrt(unsigned int n)
unsigned int c = 0x8000;
unsigned int g = 0x8000;
for(;;)
for (;;)
{
if(g*g > n)
if (g*g > n)
g ^= c;
c >>= 1;
if(c == 0) return g;
if (c == 0) return g;
g |= c;
}
@ -106,11 +106,11 @@ static unsigned int isqrt(unsigned int n)
*/
static int kmsServerListCompareFunc1(const void* a, const void* b)
{
if ( !a && !b) return 0;
if ( a && !b) return -1;
if ( !a && b) return 1;
if (!a && !b) return 0;
if (a && !b) return -1;
if (!a && b) return 1;
int priority_order = (int)((*(kms_server_dns_ptr*)a)->priority) - ((int)(*(kms_server_dns_ptr*)b)->priority);
int priority_order = (int)((*(kms_server_dns_ptr*)a)->priority) - ((int)(*(kms_server_dns_ptr*)b)->priority);
if (priority_order) return priority_order;
@ -154,12 +154,12 @@ static int getDnsRawAnswer(const char *restrict query, unsigned char** receive_b
if (*query == '.')
{
# if __ANDROID__ || __GLIBC__ /* including __UCLIBC__*/ || __APPLE__ || __CYGWIN__ || __FreeBSD__ || __NetBSD__ || __DragonFly__ || __OpenBSD__ || __sun__
bytes_received = res_querydomain("_vlmcs._tcp", query + 1, ns_c_in, ns_t_srv, *receive_buffer, RECEIVE_BUFFER_SIZE);
bytes_received = res_querydomain("_vlmcs._tcp", query + 1, ns_c_in, ns_t_srv, *receive_buffer, RECEIVE_BUFFER_SIZE);
# else
char* querystring = (char*)alloca(strlen(query) + 12);
strcpy(querystring, "_vlmcs._tcp");
strcat(querystring, query);
bytes_received = res_query(querystring, ns_c_in, ns_t_srv, *receive_buffer, RECEIVE_BUFFER_SIZE);
char* querystring = (char*)alloca(strlen(query) + 12);
strcpy(querystring, "_vlmcs._tcp");
strcat(querystring, query);
bytes_received = res_query(querystring, ns_c_in, ns_t_srv, *receive_buffer, RECEIVE_BUFFER_SIZE);
# endif
}
else
@ -169,7 +169,7 @@ static int getDnsRawAnswer(const char *restrict query, unsigned char** receive_b
if (bytes_received < 0)
{
errorout("Fatal: DNS query to %s%s failed: %s\n", "_vlmcs._tcp", *query == '.' ? query : "", hstrerror(h_errno));
errorout("Fatal: DNS query to %s%s failed: %s\n", "_vlmcs._tcp", *query == '.' ? query : "", hstrerror(h_errno));
return 0;
}
@ -236,9 +236,9 @@ int getKmsServerList(kms_server_dns_ptr** serverlist, const char *restrict query
continue;
}
sprintf(kms_server->serverName + strlen(kms_server->serverName), ":%hu", GET_UA16BE(&srvrecord->port));
kms_server->priority = GET_UA16BE(&srvrecord->priority);
kms_server->weight = GET_UA16BE(&srvrecord->weight);
sprintf(kms_server->serverName + strlen(kms_server->serverName), ":%hu", GET_UA16BE(&srvrecord->port));
kms_server->priority = GET_UA16BE(&srvrecord->priority);
kms_server->weight = GET_UA16BE(&srvrecord->weight);
}
@ -254,7 +254,7 @@ int getKmsServerList(kms_server_dns_ptr** serverlist, const char *restrict query
int getKmsServerList(kms_server_dns_ptr** serverlist, const char *const restrict query)
{
# define MAX_DNS_NAME_SIZE 254
*serverlist = NULL;
* serverlist = NULL;
PDNS_RECORD receive_buffer;
char dnsDomain[MAX_DNS_NAME_SIZE];
char FqdnQuery[MAX_DNS_NAME_SIZE];
@ -309,7 +309,7 @@ int getKmsServerList(kms_server_dns_ptr** serverlist, const char *const restrict
memset(kms_server, 0, sizeof(kms_server_dns_t));
snprintf(kms_server->serverName, sizeof(kms_server->serverName), "%s:%hu", dns_iterator->Data.SRV.pNameTarget, dns_iterator->Data.SRV.wPort);
vlmcsd_snprintf(kms_server->serverName, sizeof(kms_server->serverName), "%s:%hu", dns_iterator->Data.SRV.pNameTarget, dns_iterator->Data.SRV.wPort);
kms_server->priority = dns_iterator->Data.SRV.wPriority;
kms_server->weight = dns_iterator->Data.SRV.wWeight;

View file

@ -96,7 +96,7 @@ typedef enum __ns_class {
#endif
int getKmsServerList(kms_server_dns_ptr** serverlist, const char *restrict query);
int getKmsServerList(kms_server_dns_ptr** serverlist, const char *const restrict query);
void sortSrvRecords(kms_server_dns_ptr* serverlist, const int answers);
#endif // NO_DNS

View file

@ -6,67 +6,67 @@
#include "endian.h"
#if defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) \
&& defined(BS16) && defined(BS32) && defined(BS64)
&& defined(BS16) && defined(BS32) && defined(BS64) && !defined(NO_COMPILER_UAA)
#else // ! defined(__BYTE_ORDER)
void PUT_UAA64BE(void *p, unsigned long long v, unsigned int i)
{
unsigned char *_p = (unsigned char *)&((unsigned long long *)p)[i];
_p[ 0 ] = v >> 56;
_p[ 1 ] = v >> 48;
_p[ 2 ] = v >> 40;
_p[ 3 ] = v >> 32;
_p[ 4 ] = v >> 24;
_p[ 5 ] = v >> 16;
_p[ 6 ] = v >> 8;
_p[ 7 ] = v;
_p[ 0 ] = (unsigned char)(v >> 56);
_p[ 1 ] = (unsigned char)(v >> 48);
_p[ 2 ] = (unsigned char)(v >> 40);
_p[ 3 ] = (unsigned char)(v >> 32);
_p[ 4 ] = (unsigned char)(v >> 24);
_p[ 5 ] = (unsigned char)(v >> 16);
_p[ 6 ] = (unsigned char)(v >> 8);
_p[ 7 ] = (unsigned char)(v);
}
void PUT_UAA32BE(void *p, unsigned int v, unsigned int i)
{
unsigned char *_p = (unsigned char *)&((unsigned int *)p)[i];
_p[ 0 ] = v >> 24;
_p[ 1 ] = v >> 16;
_p[ 2 ] = v >> 8;
_p[ 3 ] = v;
_p[ 0 ] = (unsigned char)(v >> 24);
_p[ 1 ] = (unsigned char)(v >> 16);
_p[ 2 ] = (unsigned char)(v >> 8);
_p[ 3 ] = (unsigned char)(v);
}
void PUT_UAA16BE(void *p, unsigned short v, unsigned int i)
{
unsigned char *_p = (unsigned char *)&((unsigned short *)p)[i];
_p[ 0 ] = v >> 8;
_p[ 1 ] = v;
_p[ 0 ] = (unsigned char)(v >> 8);
_p[ 1 ] = (unsigned char)(v);
}
void PUT_UAA64LE(void *p, unsigned long long v, unsigned int i)
{
unsigned char *_p = (unsigned char *)&((unsigned long long *)p)[i];
_p[ 0 ] = v;
_p[ 1 ] = v >> 8;
_p[ 2 ] = v >> 16;
_p[ 3 ] = v >> 24;
_p[ 4 ] = v >> 32;
_p[ 5 ] = v >> 40;
_p[ 6 ] = v >> 48;
_p[ 7 ] = v >> 56;
_p[ 0 ] = (unsigned char)(v);
_p[ 1 ] = (unsigned char)(v >> 8);
_p[ 2 ] = (unsigned char)(v >> 16);
_p[ 3 ] = (unsigned char)(v >> 24);
_p[ 4 ] = (unsigned char)(v >> 32);
_p[ 5 ] = (unsigned char)(v >> 40);
_p[ 6 ] = (unsigned char)(v >> 48);
_p[ 7 ] = (unsigned char)(v >> 56);
}
void PUT_UAA32LE(void *p, unsigned int v, unsigned int i)
{
unsigned char *_p = (unsigned char *)&((unsigned int *)p)[i];
_p[ 0 ] = v;
_p[ 1 ] = v >> 8;
_p[ 2 ] = v >> 16;
_p[ 3 ] = v >> 24;
_p[ 0 ] = (unsigned char)(v);
_p[ 1 ] = (unsigned char)(v >> 8);
_p[ 2 ] = (unsigned char)(v >> 16);
_p[ 3 ] = (unsigned char)(v >> 24);
}
void PUT_UAA16LE(void *p, unsigned short v, unsigned int i)
{
unsigned char *_p = (unsigned char *)&((unsigned short *)p)[i];
_p[ 0 ] = v;
_p[ 1 ] = v >> 8;
_p[ 0 ] = (unsigned char)(v);
_p[ 1 ] = (unsigned char)(v >> 8);
}
@ -136,8 +136,12 @@ unsigned short GET_UAA16LE(void *p, unsigned int i)
(unsigned short)_p[ 0 ] |
(unsigned short)_p[ 1 ] << 8;
}
#endif
#if defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) \
&& defined(BS16) && defined(BS32) && defined(BS64)
#else
unsigned short BE16(unsigned short x)
{
return GET_UAA16BE(&x, 0);
@ -163,7 +167,7 @@ unsigned long long BE64(unsigned long long x)
return GET_UAA64BE(&x, 0);
}
inline unsigned long long LE64(unsigned long long x)
unsigned long long LE64(unsigned long long x)
{
return GET_UAA64LE(&x, 0);
}

View file

@ -9,17 +9,17 @@
//
// Unaligned access
//
#if !defined(NO_COMPILER_UAA)
#define UAA16(p, i) (((PACKED16*)p)->val[i])
#define UAA32(p, i) (((PACKED32*)p)->val[i])
#define UAA64(p, i) (((PACKED64*)p)->val[i])
#define UA64(p) UAA64(p, 0)
#define UA32(p) UAA32(p, 0)
#define UA16(p) UAA16(p, 0)
#endif
//
//Byteswap: Use compiler support if available
//
#ifndef NO_COMPILER_UAA
#ifdef __has_builtin // Clang supports this
#if __has_builtin(__builtin_bswap16)
@ -56,6 +56,7 @@
#endif // GNU C > 4.7
#endif // __GNUC__ > 4
#endif // __GNUC__
#endif // NO_COMPILER_UAA
//
// Byteorder
@ -198,6 +199,10 @@
#define __BE64(x) BS64(x)
#define __LE64(x) (x)
#define PUT_UA16(p, v) PUT_UA16LE(p, v)
#define PUT_UA32(p, v) PUT_UA32LE(p, v)
#define PUT_UA64(p, v) PUT_UA64LE(p, v)
#else // __BYTE_ORDER == __BIG_ENDIAN
#define __BE16(x) (x)
@ -207,8 +212,38 @@
#define __BE64(x) (x)
#define __LE64(x) BS64(x)
#define PUT_UA16(p, v) PUT_UA16BE(p, v)
#define PUT_UA32(p, v) PUT_UA32BE(p, v)
#define PUT_UA64(p, v) PUT_UA64BE(p, v)
#endif // __BYTE_ORDER
#define BE16(x) __BE16(x)
#define LE16(x) __LE16(x)
#define BE32(x) __BE32(x)
#define LE32(x) __LE32(x)
#define BE64(x) __BE64(x)
#define LE64(x) __LE64(x)
#else
extern unsigned short BE16(unsigned short x);
extern unsigned short LE16(unsigned short x);
extern unsigned int BE32(unsigned int x);
extern unsigned int LE32(unsigned int x);
extern unsigned long long BE64(unsigned long long x);
extern unsigned long long LE64(unsigned long long x);
#endif // defined(__BYTE_ORDER)
#if defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) \
&& defined(BS16) && defined(BS32) && defined(BS64) &&!defined(NO_COMPILER_UAA)
#define PUT_UAA64BE(p, v, i) ( UAA64(p, i) = __BE64(v) )
#define PUT_UAA32BE(p, v, i) ( UAA32(p, i) = __BE32(v) )
#define PUT_UAA16BE(p, v, i) ( UAA16(p, i) = __BE16(v) )
@ -225,57 +260,38 @@
#define GET_UAA32LE(p, i) __LE32(UAA32(p, i))
#define GET_UAA16LE(p, i) __LE16(UAA16(p, i))
#define BE16(x) __BE16(x)
#define LE16(x) __LE16(x)
#define BE32(x) __BE32(x)
#define LE32(x) __LE32(x)
#define BE64(x) __BE64(x)
#define LE64(x) __LE64(x)
#else // ! defined(__BYTE_ORDER)
extern void PUT_UAA64BE(void *p, unsigned long long v, unsigned int i);
extern void PUT_UAA64BE(void* p, unsigned long long v, unsigned int i);
extern void PUT_UAA32BE(void *p, unsigned int v, unsigned int i);
extern void PUT_UAA32BE(void* p, unsigned int v, unsigned int i);
extern void PUT_UAA16BE(void *p, unsigned short v, unsigned int i);
extern void PUT_UAA16BE(void* p, unsigned short v, unsigned int i);
extern void PUT_UAA64LE(void *p, unsigned long long v, unsigned int i);
extern void PUT_UAA64LE(void* p, unsigned long long v, unsigned int i);
extern void PUT_UAA32LE(void *p, unsigned int v, unsigned int i);
extern void PUT_UAA32LE(void* p, unsigned int v, unsigned int i);
extern void PUT_UAA16LE(void *p, unsigned short v, unsigned int i);
extern void PUT_UAA16LE(void* p, unsigned short v, unsigned int i);
extern unsigned long long GET_UAA64BE(void *p, unsigned int i);
extern unsigned long long GET_UAA64BE(void* p, unsigned int i);
extern unsigned int GET_UAA32BE(void *p, unsigned int i);
extern unsigned int GET_UAA32BE(void* p, unsigned int i);
extern unsigned short GET_UAA16BE(void *p, unsigned int i);
extern unsigned short GET_UAA16BE(void* p, unsigned int i);
extern unsigned long long GET_UAA64LE(void *p, unsigned int i);
extern unsigned long long GET_UAA64LE(void* p, unsigned int i);
extern unsigned int GET_UAA32LE(void *p, unsigned int i);
extern unsigned int GET_UAA32LE(void* p, unsigned int i);
extern unsigned short GET_UAA16LE(void *p, unsigned int i);
extern unsigned short GET_UAA16LE(void* p, unsigned int i);
#endif
extern unsigned short BE16(unsigned short x);
extern unsigned short LE16(unsigned short x);
extern unsigned int BE32(unsigned int x);
extern unsigned int LE32(unsigned int x);
extern unsigned long long BE64(unsigned long long x);
extern unsigned long long LE64(unsigned long long x);
#endif // defined(__BYTE_ORDER)
#define PUT_UA64BE(p, v) PUT_UAA64BE(p, v, 0)
#define PUT_UA32BE(p, v) PUT_UAA32BE(p, v, 0)

263
src/getifaddrs-musl.c Normal file
View file

@ -0,0 +1,263 @@
#define _GNU_SOURCE
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include "ifaddrs-musl.h"
//#include <syscall.h>
#include <net/if.h>
#include <netinet/in.h>
#include "netlink-musl.h"
#define IFADDRS_HASH_SIZE 64
/* getifaddrs() reports hardware addresses with PF_PACKET that implies
* struct sockaddr_ll. But e.g. Infiniband socket address length is
* longer than sockaddr_ll.ssl_addr[8] can hold. Use this hack struct
* to extend ssl_addr - callers should be able to still use it. */
struct sockaddr_ll_hack {
unsigned short sll_family, sll_protocol;
int sll_ifindex;
unsigned short sll_hatype;
unsigned char sll_pkttype, sll_halen;
unsigned char sll_addr[24];
};
union sockany {
struct sockaddr sa;
struct sockaddr_ll_hack ll;
struct sockaddr_in v4;
struct sockaddr_in6 v6;
};
struct ifaddrs_storage {
struct ifaddrs ifa;
struct ifaddrs_storage *hash_next;
union sockany addr, netmask, ifu;
unsigned int index;
char name[IFNAMSIZ+1];
};
struct ifaddrs_ctx {
struct ifaddrs_storage *first;
struct ifaddrs_storage *last;
struct ifaddrs_storage *hash[IFADDRS_HASH_SIZE];
};
void freeifaddrs(struct ifaddrs *ifp)
{
struct ifaddrs *n;
while (ifp) {
n = ifp->ifa_next;
free(ifp);
ifp = n;
}
}
static int __netlink_enumerate(int fd, unsigned int seq, int type, int af,
int (*cb)(void *ctx, struct nlmsghdr *h), void *ctx)
{
struct nlmsghdr *h;
union {
uint8_t buf[8192];
struct {
struct nlmsghdr nlh;
struct rtgenmsg g;
} req;
struct nlmsghdr reply;
} u;
int r, ret;
memset(&u.req, 0, sizeof(u.req));
u.req.nlh.nlmsg_len = sizeof(u.req);
u.req.nlh.nlmsg_type = type;
u.req.nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST;
u.req.nlh.nlmsg_seq = seq;
u.req.g.rtgen_family = af;
r = send(fd, &u.req, sizeof(u.req), 0);
if (r < 0) return r;
while (1) {
r = recv(fd, u.buf, sizeof(u.buf), MSG_DONTWAIT);
if (r <= 0) return -1;
for (h = &u.reply; NLMSG_OK(h, (void*)&u.buf[r]); h = NLMSG_NEXT(h)) {
if (h->nlmsg_type == NLMSG_DONE) return 0;
if (h->nlmsg_type == NLMSG_ERROR) return -1;
ret = cb(ctx, h);
if (ret) return ret;
}
}
}
int __rtnetlink_enumerate(int link_af, int addr_af, int (*cb)(void *ctx, struct nlmsghdr *h), void *ctx)
{
int fd, r;
fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (fd < 0) return -1;
r = __netlink_enumerate(fd, 1, RTM_GETLINK, link_af, cb, ctx);
if (!r) r = __netlink_enumerate(fd, 2, RTM_GETADDR, addr_af, cb, ctx);
close(fd);
return r;
}
static void copy_addr(struct sockaddr **r, int af, union sockany *sa, void *addr, size_t addrlen, int ifindex)
{
uint8_t *dst;
int len;
switch (af) {
case AF_INET:
dst = (uint8_t*) &sa->v4.sin_addr;
len = 4;
break;
case AF_INET6:
dst = (uint8_t*) &sa->v6.sin6_addr;
len = 16;
if (IN6_IS_ADDR_LINKLOCAL(addr) || IN6_IS_ADDR_MC_LINKLOCAL(addr))
sa->v6.sin6_scope_id = ifindex;
break;
default:
return;
}
if (addrlen < len) return;
sa->sa.sa_family = af;
memcpy(dst, addr, len);
*r = &sa->sa;
}
static void gen_netmask(struct sockaddr **r, int af, union sockany *sa, int prefixlen)
{
uint8_t addr[16] = {0};
int i;
if (prefixlen > 8*sizeof(addr)) prefixlen = 8*sizeof(addr);
i = prefixlen / 8;
memset(addr, 0xff, i);
if (i < sizeof(addr)) addr[i++] = 0xff << (8 - (prefixlen % 8));
copy_addr(r, af, sa, addr, sizeof(addr), 0);
}
static void copy_lladdr(struct sockaddr **r, union sockany *sa, void *addr, size_t addrlen, int ifindex, unsigned short hatype)
{
if (addrlen > sizeof(sa->ll.sll_addr)) return;
sa->ll.sll_family = AF_PACKET;
sa->ll.sll_ifindex = ifindex;
sa->ll.sll_hatype = hatype;
sa->ll.sll_halen = addrlen;
memcpy(sa->ll.sll_addr, addr, addrlen);
*r = &sa->sa;
}
static int netlink_msg_to_ifaddr(void *pctx, struct nlmsghdr *h)
{
struct ifaddrs_ctx *ctx = pctx;
struct ifaddrs_storage *ifs, *ifs0 = NULL;
struct ifinfomsg *ifi = NLMSG_DATA(h);
struct ifaddrmsg *ifa = NLMSG_DATA(h);
struct rtattr *rta;
int stats_len = 0;
if (h->nlmsg_type == RTM_NEWLINK) {
for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) {
if (rta->rta_type != IFLA_STATS) continue;
stats_len = RTA_DATALEN(rta);
break;
}
} else {
for (ifs0 = ctx->hash[ifa->ifa_index % IFADDRS_HASH_SIZE]; ifs0; ifs0 = ifs0->hash_next)
if (ifs0->index == ifa->ifa_index)
break;
if (!ifs0) return 0;
}
ifs = calloc(1, sizeof(struct ifaddrs_storage) + stats_len);
if (ifs == 0) return -1;
if (h->nlmsg_type == RTM_NEWLINK) {
ifs->index = ifi->ifi_index;
ifs->ifa.ifa_flags = ifi->ifi_flags;
for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) {
switch (rta->rta_type) {
case IFLA_IFNAME:
if (RTA_DATALEN(rta) < sizeof(ifs->name)) {
memcpy(ifs->name, RTA_DATA(rta), RTA_DATALEN(rta));
ifs->ifa.ifa_name = ifs->name;
}
break;
case IFLA_ADDRESS:
copy_lladdr(&ifs->ifa.ifa_addr, &ifs->addr, RTA_DATA(rta), RTA_DATALEN(rta), ifi->ifi_index, ifi->ifi_type);
break;
case IFLA_BROADCAST:
copy_lladdr(&ifs->ifa.ifa_broadaddr, &ifs->ifu, RTA_DATA(rta), RTA_DATALEN(rta), ifi->ifi_index, ifi->ifi_type);
break;
case IFLA_STATS:
ifs->ifa.ifa_data = (void*)(ifs+1);
memcpy(ifs->ifa.ifa_data, RTA_DATA(rta), RTA_DATALEN(rta));
break;
}
}
if (ifs->ifa.ifa_name) {
unsigned int bucket = ifs->index % IFADDRS_HASH_SIZE;
ifs->hash_next = ctx->hash[bucket];
ctx->hash[bucket] = ifs;
}
} else {
ifs->ifa.ifa_name = ifs0->ifa.ifa_name;
ifs->ifa.ifa_flags = ifs0->ifa.ifa_flags;
for (rta = NLMSG_RTA(h, sizeof(*ifa)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) {
switch (rta->rta_type) {
case IFA_ADDRESS:
/* If ifa_addr is already set we, received an IFA_LOCAL before
* so treat this as destination address */
if (ifs->ifa.ifa_addr)
copy_addr(&ifs->ifa.ifa_dstaddr, ifa->ifa_family, &ifs->ifu, RTA_DATA(rta), RTA_DATALEN(rta), ifa->ifa_index);
else
copy_addr(&ifs->ifa.ifa_addr, ifa->ifa_family, &ifs->addr, RTA_DATA(rta), RTA_DATALEN(rta), ifa->ifa_index);
break;
case IFA_BROADCAST:
copy_addr(&ifs->ifa.ifa_broadaddr, ifa->ifa_family, &ifs->ifu, RTA_DATA(rta), RTA_DATALEN(rta), ifa->ifa_index);
break;
case IFA_LOCAL:
/* If ifa_addr is set and we get IFA_LOCAL, assume we have
* a point-to-point network. Move address to correct field. */
if (ifs->ifa.ifa_addr) {
ifs->ifu = ifs->addr;
ifs->ifa.ifa_dstaddr = &ifs->ifu.sa;
memset(&ifs->addr, 0, sizeof(ifs->addr));
}
copy_addr(&ifs->ifa.ifa_addr, ifa->ifa_family, &ifs->addr, RTA_DATA(rta), RTA_DATALEN(rta), ifa->ifa_index);
break;
case IFA_LABEL:
if (RTA_DATALEN(rta) < sizeof(ifs->name)) {
memcpy(ifs->name, RTA_DATA(rta), RTA_DATALEN(rta));
ifs->ifa.ifa_name = ifs->name;
}
break;
}
}
if (ifs->ifa.ifa_addr)
gen_netmask(&ifs->ifa.ifa_netmask, ifa->ifa_family, &ifs->netmask, ifa->ifa_prefixlen);
}
if (ifs->ifa.ifa_name) {
if (!ctx->first) ctx->first = ifs;
if (ctx->last) ctx->last->ifa.ifa_next = &ifs->ifa;
ctx->last = ifs;
} else {
free(ifs);
}
return 0;
}
int getifaddrs(struct ifaddrs **ifap)
{
struct ifaddrs_ctx _ctx, *ctx = &_ctx;
int r;
memset(ctx, 0, sizeof *ctx);
r = __rtnetlink_enumerate(AF_UNSPEC, AF_UNSPEC, netlink_msg_to_ifaddr, ctx);
if (r == 0) *ifap = &ctx->first->ifa;
else freeifaddrs(&ctx->first->ifa);
return r;
}

734
src/helpers.c Normal file
View file

@ -0,0 +1,734 @@
/*
* Helper functions used by other modules
*/
//#ifndef _GNU_SOURCE
//#define _GNU_SOURCE
//#endif
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#ifndef _WIN32
#include <errno.h>
#include <libgen.h>
#endif // _WIN32
#ifndef _MSC_VER
#include <getopt.h>
#else
#include "wingetopt.h"
#endif
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "helpers.h"
#include "output.h"
#include "endian.h"
#include "shared_globals.h"
#ifndef NO_INTERNAL_DATA
#include "kmsdata.h"
#endif // NO_INTERNAL_DATA
#ifdef _WIN32
#include <shlwapi.h>
#endif // _WIN32
#if __APPLE__
#include <mach-o/dyld.h>
#endif // __APPLE__
#if (__GLIBC__ || __linux__) && defined(USE_AUXV)
#include <sys/auxv.h>
#endif
#if __FreeBSD__ || __FreeBSD_kernel__
#include <sys/sysctl.h>
#endif
/*
* UCS2 <-> UTF-8 functions
* All functions use little endian UCS2 since we only need it to communicate with Windows via RPC
*/
// Convert one character from UTF-8 to UCS2
// Returns 0xffff, if utf-8 evaluates to > 0xfffe (outside basic multilingual pane)
WCHAR utf8_to_ucs2_char(const unsigned char *input, const unsigned char **end_ptr)
{
*end_ptr = input;
if (input[0] == 0)
return (WCHAR)~0;
if (input[0] < 0x80) {
*end_ptr = input + 1;
return LE16(input[0]);
}
if ((input[0] & 0xE0) == 0xE0) {
if (input[1] == 0 || input[2] == 0)
return (WCHAR)~0;
*end_ptr = input + 3;
return
LE16((input[0] & 0x0F) << 12 |
(input[1] & 0x3F) << 6 |
(input[2] & 0x3F));
}
if ((input[0] & 0xC0) == 0xC0) {
if (input[1] == 0)
return (WCHAR)~0;
*end_ptr = input + 2;
return
LE16((input[0] & 0x1F) << 6 |
(input[1] & 0x3F));
}
return (WCHAR)~0;
}
// Convert one character from UCS2 to UTF-8
// Returns length of UTF-8 char (1, 2 or 3) or -1 on error (UTF-16 outside UCS2)
// char *utf8 must be large enough to hold 3 bytes
int ucs2_to_utf8_char(const WCHAR ucs2_le, char *utf8)
{
const WCHAR ucs2 = LE16(ucs2_le);
if (ucs2 < 0x80) {
utf8[0] = (char)ucs2;
utf8[1] = '\0';
return 1;
}
if (ucs2 >= 0x80 && ucs2 < 0x800) {
utf8[0] = (char)((ucs2 >> 6) | 0xC0);
utf8[1] = (char)((ucs2 & 0x3F) | 0x80);
utf8[2] = '\0';
return 2;
}
if (ucs2 >= 0x800 && ucs2 < 0xFFFF) {
if (ucs2 >= 0xD800 && ucs2 <= 0xDFFF) {
/* Ill-formed (UTF-16 ouside of BMP) */
return -1;
}
utf8[0] = ((ucs2 >> 12)) | 0xE0;
utf8[1] = ((ucs2 >> 6) & 0x3F) | 0x80;
utf8[2] = ((ucs2) & 0x3F) | 0x80;
utf8[3] = '\0';
return 3;
}
return -1;
}
// Converts UTF8 to UCS2. Returns size in bytes of the converted string or -1 on error
size_t utf8_to_ucs2(WCHAR* const ucs2_le, const char* const utf8, const size_t maxucs2, const size_t maxutf8)
{
const unsigned char* current_utf8 = (unsigned char*)utf8;
WCHAR* current_ucs2_le = ucs2_le;
for (; *current_utf8; current_ucs2_le++)
{
size_t size = (char*)current_utf8 - utf8;
if (size >= maxutf8) return (size_t)-1;
if (((*current_utf8 & 0xc0) == 0xc0) && (size >= maxutf8 - 1)) return (size_t)-1;
if (((*current_utf8 & 0xe0) == 0xe0) && (size >= maxutf8 - 2)) return (size_t)-1;
if (current_ucs2_le - ucs2_le >= (intptr_t)maxucs2 - 1) return (size_t)-1;
*current_ucs2_le = utf8_to_ucs2_char(current_utf8, &current_utf8);
current_ucs2_le[1] = 0;
if (*current_ucs2_le == (WCHAR)-1) return (size_t)-1;
}
return current_ucs2_le - ucs2_le;
}
// Converts UCS2 to UTF-8. Returns TRUE or FALSE
BOOL ucs2_to_utf8(const WCHAR* const ucs2_le, char* utf8, size_t maxucs2, size_t maxutf8)
{
char utf8_char[4];
const WCHAR* current_ucs2 = ucs2_le;
unsigned int index_utf8 = 0;
for (*utf8 = 0; *current_ucs2; current_ucs2++)
{
if (current_ucs2 - ucs2_le > (intptr_t)maxucs2) return FALSE;
int len = ucs2_to_utf8_char(*current_ucs2, utf8_char);
if (index_utf8 + len > maxutf8) return FALSE;
strncat(utf8, utf8_char, len);
index_utf8 += len;
}
return TRUE;
}
/* End of UTF-8 <-> UCS2 conversion */
// Checks, whether a string is a valid integer number between min and max. Returns TRUE or FALSE. Puts int value in *value
BOOL stringToInt(const char *const szValue, const unsigned int min, const unsigned int max, unsigned int *const value)
{
char *nextchar;
errno = 0;
long long result = vlmcsd_strtoll(szValue, &nextchar, 10);
if (errno || result < (long long)min || result >(long long)max || *nextchar)
{
return FALSE;
}
*value = (unsigned int)result;
return TRUE;
}
//Converts a String Guid to a host binary guid in host endianess
int_fast8_t string2UuidLE(const char *const restrict input, GUID *const restrict guid)
{
int i;
if (strlen(input) < GUID_STRING_LENGTH) return FALSE;
if (input[8] != '-' || input[13] != '-' || input[18] != '-' || input[23] != '-') return FALSE;
for (i = 0; i < GUID_STRING_LENGTH; i++)
{
if (i == 8 || i == 13 || i == 18 || i == 23) continue;
const char c = (char)toupper((int)input[i]);
if (c < '0' || c > 'F' || (c > '9' && c < 'A')) return FALSE;
}
char inputCopy[GUID_STRING_LENGTH + 1];
strncpy(inputCopy, input, GUID_STRING_LENGTH + 1);
inputCopy[8] = inputCopy[13] = inputCopy[18] = 0;
hex2bin((BYTE*)&guid->Data1, inputCopy, 8);
hex2bin((BYTE*)&guid->Data2, inputCopy + 9, 4);
hex2bin((BYTE*)&guid->Data3, inputCopy + 14, 4);
hex2bin(guid->Data4, input + 19, 16);
guid->Data1 = BS32(guid->Data1);
guid->Data2 = BS16(guid->Data2);
guid->Data3 = BS16(guid->Data3);
return TRUE;
}
__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
//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)
{
unsigned int result;
if (!stringToInt(optarg, min, max, &result))
{
printerrorf("Fatal: Option \"-%c\" must be numeric between %u and %u.\n", o, min, max);
exit(VLMCSD_EINVAL);
}
return result;
}
// Resets getopt() to start parsing from the beginning
void optReset(void)
{
#if __minix__ || defined(__BSD__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
optind = 1;
optreset = 1; // Makes newer BSD getopt happy
#elif defined(__UCLIBC__) // uClibc headers also define __GLIBC__ so be careful here
optind = 0; // uClibc seeks compatibility with GLIBC
#elif defined(__GLIBC__)
optind = 0; // Makes GLIBC getopt happy
#else // Standard for most systems
optind = 1;
#endif
}
#endif // !IS_LIBRARY
#if _WIN32 || __CYGWIN__
// Returns a static message buffer containing text for a given Win32 error. Not thread safe (same as strerror)
char* win_strerror(const int message)
{
#define STRERROR_BUFFER_SIZE 256
static char buffer[STRERROR_BUFFER_SIZE];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, message, 0, buffer, STRERROR_BUFFER_SIZE, NULL);
return buffer;
}
#endif // _WIN32 || __CYGWIN__
/*
* parses an address in the form host:[port] in addr
* returns host and port in seperate strings
*/
void parseAddress(char *const addr, char** szHost, char** szPort)
{
*szHost = addr;
# ifndef NO_SOCKETS
*szPort = (char*)defaultport;
# else // NO_SOCKETS
*szPort = "1688";
# endif // NO_SOCKETS
char *lastcolon = strrchr(addr, ':');
char *firstcolon = strchr(addr, ':');
char *closingbracket = strrchr(addr, ']');
if (*addr == '[' && closingbracket) //Address in brackets
{
*closingbracket = 0;
(*szHost)++;
if (closingbracket[1] == ':')
*szPort = closingbracket + 2;
}
else if (firstcolon && firstcolon == lastcolon) //IPv4 address or hostname with port
{
*firstcolon = 0;
*szPort = firstcolon + 1;
}
}
// Initialize random generator (needs to be done in each thread)
void randomNumberInit()
{
# if _MSC_VER
srand(GetTickCount());
# else
struct timeval tv;
gettimeofday(&tv, NULL);
srand((unsigned int)(tv.tv_sec ^ tv.tv_usec));
# endif
}
// We always exit immediately if any OOM condition occurs
__noreturn void OutOfMemory(void)
{
errorout("Fatal: Out of memory");
exit(VLMCSD_ENOMEM);
}
void* vlmcsd_malloc(size_t len)
{
void* buf = malloc(len);
if (!buf) OutOfMemory();
return buf;
}
char* vlmcsd_strdup(const char* src)
{
# if _MSC_VER
char* dst = _strdup(src);
# else // !_MSC_VER
char* dst = strdup(src);
# endif
if (!dst) OutOfMemory();
return dst;
}
/*
* Converts hex digits to bytes in big-endian order.
* Ignores any non-hex characters
*/
void hex2bin(BYTE *const bin, const char *hex, const size_t maxbin)
{
static const char *const hexdigits = "0123456789ABCDEF";
char* nextchar;
size_t i;
for (i = 0; (i < 16) && utf8_to_ucs2_char((const unsigned char*)hex, (const unsigned char**)&nextchar) != (WCHAR)-1; hex = nextchar)
{
const char* pos = strchr(hexdigits, toupper((int)*hex));
if (!pos) continue;
if (!(i & 1)) bin[i >> 1] = 0;
bin[i >> 1] |= (char)(pos - hexdigits);
if (!(i & 1)) bin[i >> 1] <<= 4;
i++;
if (i >> 1 > maxbin) break;
}
}
__pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument)
{
if (
!strncasecmp(argument, "true", 4) ||
!strncasecmp(argument, "on", 2) ||
!strncasecmp(argument, "yes", 3) ||
!strncasecmp(argument, "1", 1)
)
{
*result = TRUE;
return TRUE;
}
else if (
!strncasecmp(argument, "false", 5) ||
!strncasecmp(argument, "off", 3) ||
!strncasecmp(argument, "no", 2) ||
!strncasecmp(argument, "0", 1)
)
{
*result = FALSE;
return TRUE;
}
return FALSE;
}
#ifndef IS_LIBRARY
#ifndef NO_EXTERNAL_DATA
__noreturn static void dataFileReadError()
{
const int error = errno;
errorout("Fatal: Could not read %s: %s\n", fn_data, strerror(error));
exit(error);
}
__noreturn static void dataFileFormatError()
{
errorout("Fatal: %s is not a KMS data file version 2.x\n", fn_data);
exit(VLMCSD_EINVAL);
}
#endif // NO_EXTERNAL_DATA
#if !defined(DATA_FILE) || !defined(NO_SIGHUP)
void getExeName()
{
if (fn_exe != NULL) return;
# if (__GLIBC__ || __linux__) && defined(USE_AUXV)
fn_exe = (char*)getauxval(AT_EXECFN);
# elif (__ANDROID__ && __ANDROID_API__ < 16) || (__UCLIBC__ && __UCLIBC_MAJOR__ < 1 && !defined(NO_PROCFS)) // Workaround for older uclibc
char temp[PATH_MAX + 1];
if (realpath("/proc/self/exe", temp) == temp)
{
fn_exe = vlmcsd_strdup(temp);
}
# elif (__linux__ || __CYGWIN__) && !defined(NO_PROCFS)
fn_exe = realpath("/proc/self/exe", NULL);
# elif (__FreeBSD__ || __FreeBSD_kernel__)
int mib[4];
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PATHNAME;
mib[3] = -1;
char path[PATH_MAX + 1];
size_t cb = sizeof(path);
if (!sysctl(mib, 4, path, &cb, NULL, 0))
{
fn_exe = vlmcsd_strdup(path);
}
# elif (__DragonFly__) && !defined(NO_PROCFS)
fn_exe = realpath("/proc/curproc/file", NULL);
# elif __NetBSD__ && !defined(NO_PROCFS)
fn_exe = realpath("/proc/curproc/exe", NULL);
# elif __sun__
fn_exe = getexecname();
# elif __APPLE__
char path[PATH_MAX + 1];
uint32_t size = sizeof(path);
if (_NSGetExecutablePath(path, &size) == 0)
{
fn_exe = vlmcsd_strdup(path);
}
# elif _WIN32
char path[512];
GetModuleFileName(GetModuleHandle(NULL), path, 512);
path[511] = 0;
fn_exe = vlmcsd_strdup(path);
# else
// Sorry no exe detection
# endif
}
#endif // defined(DATA_FILE) && defined(NO_SIGHUP)
#if !defined(DATA_FILE) && !defined(NO_EXTERNAL_DATA)
#ifdef _WIN32
static void getDefaultDataFile()
{
char fileName[MAX_PATH];
getExeName();
strncpy(fileName, fn_exe, MAX_PATH);
PathRemoveFileSpec(fileName);
strncat(fileName, "\\vlmcsd.kmd", MAX_PATH - 11);
fn_data = vlmcsd_strdup(fileName);
}
#else // !_WIN32
static void getDefaultDataFile()
{
char fileName[512];
getExeName();
if (!fn_exe)
{
fn_data = (char*)"/etc/vlmcsd.kmd";
return;
}
char* fn_exe_copy = vlmcsd_strdup(fn_exe);
strncpy(fileName, dirname(fn_exe_copy), 512);
free(fn_exe_copy);
strncat(fileName, "/vlmcsd.kmd", 500);
fn_data = vlmcsd_strdup(fileName);
}
#endif // !_WIN32
#endif // !defined(DATA_FILE) && !defined(NO_EXTERNAL_DATA)
void loadKmsData()
{
# ifndef NO_INTERNAL_DATA
KmsData = (PVlmcsdHeader_t)DefaultKmsData;
# endif // NO_INTERNAL_DATA
# ifndef NO_EXTERNAL_DATA
long size;
# ifndef NO_INTERNAL_DATA
size = (long)getDefaultKmsDataSize();
# endif // NO_INTERNAL_DATA
# ifndef DATA_FILE
if (!fn_data) getDefaultDataFile();
# endif // DATA_FILE
if (strcmp(fn_data, "-"))
{
FILE *file = fopen(fn_data, "rb");
if (!file)
{
# ifndef NO_INTERNAL_DATA
if (ExplicitDataLoad)
# endif // NO_INTERNAL_DATA
{
dataFileReadError();
}
}
else
{
if (fseek(file, 0, SEEK_END)) dataFileReadError();
size = ftell(file);
if (size == -1L) dataFileReadError();
KmsData = (PVlmcsdHeader_t)vlmcsd_malloc(size);
if (fseek(file, 0, SEEK_SET)) dataFileReadError();
const size_t bytesRead = fread(KmsData, 1, size, file);
if ((long)bytesRead != size) dataFileReadError();
fclose(file);
# if !defined(NO_LOG) && !defined(NO_SOCKETS)
if (!InetdMode) logger("Read KMS data file version %u.%u %s\n", (unsigned int)LE16(KmsData->MajorVer), (unsigned int)LE16(KmsData->MinorVer), fn_data);
# endif // NO_LOG
}
}
# endif // NO_EXTERNAL_DATA
# ifndef UNSAFE_DATA_LOAD
if (((BYTE*)KmsData)[size - 1] != 0) dataFileFormatError();
# endif // UNSAFE_DATA_LOAD
KmsData->MajorVer = LE16(KmsData->MajorVer);
KmsData->MinorVer = LE16(KmsData->MinorVer);
KmsData->AppItemCount = LE32(KmsData->AppItemCount);
KmsData->KmsItemCount = LE32(KmsData->KmsItemCount);
KmsData->SkuItemCount = LE32(KmsData->SkuItemCount);
KmsData->HostBuildCount = LE32(KmsData->HostBuildCount);
uint32_t i;
for (i = 0; i < vlmcsd_countof(KmsData->Datapointers); i++)
{
KmsData->Datapointers[i].Pointer = (BYTE*)KmsData + LE64(KmsData->Datapointers[i].Offset);
# ifndef UNSAFE_DATA_LOAD
if ((BYTE*)KmsData->Datapointers[i].Pointer > (BYTE*)KmsData + size) dataFileFormatError();
# endif // UNSAFE_DATA_LOAD
}
for (i = 0; i < KmsData->CsvlkCount; i++)
{
PCsvlkData_t csvlkData = &KmsData->CsvlkData[i];
csvlkData->EPid = (char*)KmsData + LE64(csvlkData->EPidOffset);
csvlkData->ReleaseDate = LE64(csvlkData->ReleaseDate);
# ifndef UNSAFE_DATA_LOAD
if (csvlkData->EPid > (char*)KmsData + size) dataFileFormatError();
# endif // UNSAFE_DATA_LOAD
# ifndef NO_RANDOM_EPID
csvlkData->GroupId = LE32(csvlkData->GroupId);
csvlkData->MinKeyId = LE32(csvlkData->MinKeyId);
csvlkData->MaxKeyId = LE32(csvlkData->MaxKeyId);
# endif // NO_RANDOM_EPID
}
for (i = 0; i < (uint32_t)KmsData->HostBuildCount; i++)
{
PHostBuild_t hostBuild = &KmsData->HostBuildList[i];
hostBuild->BuildNumber = LE32(hostBuild->BuildNumber);
hostBuild->Flags = LE32(hostBuild->Flags);
hostBuild->PlatformId = LE32(hostBuild->PlatformId);
hostBuild->ReleaseDate = LE64(hostBuild->ReleaseDate);
hostBuild->DisplayName = (char*)KmsData + LE64(hostBuild->DisplayNameOffset);
# ifndef UNSAFE_DATA_LOAD
if (hostBuild->DisplayName > (char*)KmsData + size) dataFileFormatError();
# endif // UNSAFE_DATA_LOAD
}
const uint32_t totalItemCount = KmsData->AppItemCount + KmsData->KmsItemCount + KmsData->SkuItemCount;
# ifndef NO_EXTERNAL_DATA
if (
memcmp(KmsData->Magic, "KMD", sizeof(KmsData->Magic)) ||
KmsData->MajorVer != 2
# ifndef UNSAFE_DATA_LOAD
||
sizeof(VlmcsdHeader_t) + totalItemCount * sizeof(VlmcsdData_t) >= ((uint64_t)size)
# endif //UNSAFE_DATA_LOAD
)
{
dataFileFormatError();
}
# endif // NO_EXTERNAL_DATA
for (i = 0; i < totalItemCount; i++)
{
PVlmcsdData_t item = &KmsData->AppItemList[i];
item->Name = (char*)KmsData + LE64(item->NameOffset);
# ifndef UNSAFE_DATA_LOAD
if (
item->Name >= (char*)KmsData + (uint64_t)size ||
(KmsData->AppItemCount && item->AppIndex >= KmsData->AppItemCount) ||
item->KmsIndex >= KmsData->KmsItemCount
)
{
dataFileFormatError();
}
# endif // UNSAFE_DATA_LOAD
}
}
#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
#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
int shmget(key_t key, size_t size, int shmflg)
{
return syscall(__NR_shmget, key, size, shmflg);
}
#endif // __NR_shmget
#ifdef __NR_shmat
void *shmat(int shmid, const void *shmaddr, int shmflg)
{
return (void *)syscall(__NR_shmat, shmid, shmaddr, shmflg);
}
#endif // __NR_shmat
#ifdef __NR_shmdt
int shmdt(const void *shmaddr)
{
return syscall(__NR_shmdt, shmaddr);
}
#endif // __NR_shmdt
#ifdef __NR_shmctl
int shmctl(int shmid, int cmd, /*struct shmid_ds*/void *buf)
{
return syscall(__NR_shmctl, shmid, cmd, buf);
}
#endif // __NR_shmctl
#endif // __ANDROID__ && !defined(USE_THREADS)

View file

@ -9,6 +9,10 @@
#include <stdint.h>
#include "types.h"
#if __ANDROID__
#include <sys/syscall.h>
#endif // __ANDROID__
#define GUID_LE 0
#define GUID_BE 1
#define GUID_SWAP 2
@ -16,19 +20,38 @@
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);
void optReset(void);
__pure DWORD timeSpanString2Seconds(const char *const restrict argument);
#define timeSpanString2Minutes(x) (timeSpanString2Seconds(x) / 60)
char* win_strerror(const int message);
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);
WCHAR utf8_to_ucs2_char (const unsigned char * input, const unsigned char ** end_ptr);
BOOL ucs2_to_utf8(const WCHAR* const ucs2_le, char* utf8, size_t maxucs2, size_t maxutf8);
int_fast8_t string2Uuid(const char *const restrict input, GUID *const restrict guid);
int_fast8_t string2UuidLE(const char *const restrict input, GUID *const restrict guid);
void randomNumberInit();
void LEGUID(GUID *const restrict result, const GUID* const restrict guid);
void parseAddress(char *const addr, char** szHost, char** szPort);
__noreturn void OutOfMemory(void);
void* vlmcsd_malloc(size_t len);
void hex2bin(BYTE *const bin, const char *hex, const size_t maxbin);
void loadKmsData();
#if !defined(DATA_FILE) || !defined(NO_SIGHUP)
void getExeName();
#endif // !defined(DATA_FILE) || !defined(NO_SIGHUP)
__pure BOOL getArgumentBool(int_fast8_t *result, const char *const argument);
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)
int shmget(key_t key, size_t size, int shmflg);
void *shmat(int shmid, const void *shmaddr, int shmflg);
int shmdt(const void *shmaddr);
int shmctl(int shmid, int cmd, /*struct shmid_ds*/void *buf);
#endif // __ANDROID__ && !defined(USE_THREADS)
#endif // HELPERS_H

600
src/ifaddrs-android.c Normal file
View file

@ -0,0 +1,600 @@
/*
Copyright (c) 2013, Kenneth MacKay
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ifaddrs-android.h"
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
#include <net/if_arp.h>
#include <netinet/in.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
typedef struct NetlinkList
{
struct NetlinkList *m_next;
struct nlmsghdr *m_data;
unsigned int m_size;
} NetlinkList;
static int netlink_socket(void)
{
int l_socket = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if(l_socket < 0)
{
return -1;
}
struct sockaddr_nl l_addr;
memset(&l_addr, 0, sizeof(l_addr));
l_addr.nl_family = AF_NETLINK;
if(bind(l_socket, (struct sockaddr *)&l_addr, sizeof(l_addr)) < 0)
{
close(l_socket);
return -1;
}
return l_socket;
}
static int netlink_send(int p_socket, int p_request)
{
char l_buffer[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))];
memset(l_buffer, 0, sizeof(l_buffer));
struct nlmsghdr *l_hdr = (struct nlmsghdr *)l_buffer;
struct rtgenmsg *l_msg = (struct rtgenmsg *)NLMSG_DATA(l_hdr);
l_hdr->nlmsg_len = NLMSG_LENGTH(sizeof(*l_msg));
l_hdr->nlmsg_type = p_request;
l_hdr->nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
l_hdr->nlmsg_pid = 0;
l_hdr->nlmsg_seq = p_socket;
l_msg->rtgen_family = AF_UNSPEC;
struct sockaddr_nl l_addr;
memset(&l_addr, 0, sizeof(l_addr));
l_addr.nl_family = AF_NETLINK;
return (sendto(p_socket, l_hdr, l_hdr->nlmsg_len, 0, (struct sockaddr *)&l_addr, sizeof(l_addr)));
}
static int netlink_recv(int p_socket, void *p_buffer, size_t p_len)
{
struct msghdr l_msg;
struct iovec l_iov = { p_buffer, p_len };
struct sockaddr_nl l_addr;
//int l_result;
for(;;)
{
l_msg.msg_name = (void *)&l_addr;
l_msg.msg_namelen = sizeof(l_addr);
l_msg.msg_iov = &l_iov;
l_msg.msg_iovlen = 1;
l_msg.msg_control = NULL;
l_msg.msg_controllen = 0;
l_msg.msg_flags = 0;
int l_result = recvmsg(p_socket, &l_msg, 0);
if(l_result < 0)
{
if(errno == EINTR)
{
continue;
}
return -2;
}
if(l_msg.msg_flags & MSG_TRUNC)
{ // buffer was too small
return -1;
}
return l_result;
}
}
static struct nlmsghdr *getNetlinkResponse(int p_socket, int *p_size, int *p_done)
{
size_t l_size = 4096;
void *l_buffer = NULL;
for(;;)
{
free(l_buffer);
l_buffer = malloc(l_size);
int l_read = netlink_recv(p_socket, l_buffer, l_size);
*p_size = l_read;
if(l_read == -2)
{
free(l_buffer);
return NULL;
}
if(l_read >= 0)
{
pid_t l_pid = getpid();
struct nlmsghdr *l_hdr;
for(l_hdr = (struct nlmsghdr *)l_buffer; NLMSG_OK(l_hdr, (unsigned int)l_read); l_hdr = (struct nlmsghdr *)NLMSG_NEXT(l_hdr, l_read))
{
if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket)
{
continue;
}
if(l_hdr->nlmsg_type == NLMSG_DONE)
{
*p_done = 1;
break;
}
if(l_hdr->nlmsg_type == NLMSG_ERROR)
{
free(l_buffer);
return NULL;
}
}
return l_buffer;
}
l_size *= 2;
}
}
static NetlinkList *newListItem(struct nlmsghdr *p_data, unsigned int p_size)
{
NetlinkList *l_item = malloc(sizeof(NetlinkList));
l_item->m_next = NULL;
l_item->m_data = p_data;
l_item->m_size = p_size;
return l_item;
}
static void freeResultList(NetlinkList *p_list)
{
NetlinkList *l_cur;
while(p_list)
{
l_cur = p_list;
p_list = p_list->m_next;
free(l_cur->m_data);
free(l_cur);
}
}
static NetlinkList *getResultList(int p_socket, int p_request)
{
if(netlink_send(p_socket, p_request) < 0)
{
return NULL;
}
NetlinkList *l_list = NULL;
NetlinkList *l_end = NULL;
int l_size;
int l_done = 0;
while(!l_done)
{
struct nlmsghdr *l_hdr = getNetlinkResponse(p_socket, &l_size, &l_done);
if(!l_hdr)
{ // error
freeResultList(l_list);
return NULL;
}
NetlinkList *l_item = newListItem(l_hdr, l_size);
if(!l_list)
{
l_list = l_item;
}
else
{
l_end->m_next = l_item;
}
l_end = l_item;
}
return l_list;
}
static size_t maxSize(size_t a, size_t b)
{
return (a > b ? a : b);
}
static size_t calcAddrLen(sa_family_t p_family, int p_dataSize)
{
switch(p_family)
{
case AF_INET:
return sizeof(struct sockaddr_in);
case AF_INET6:
return sizeof(struct sockaddr_in6);
case AF_PACKET:
return maxSize(sizeof(struct sockaddr_ll), offsetof(struct sockaddr_ll, sll_addr) + p_dataSize);
default:
return maxSize(sizeof(struct sockaddr), offsetof(struct sockaddr, sa_data) + p_dataSize);
}
}
static void makeSockaddr(sa_family_t p_family, struct sockaddr *p_dest, void *p_data, size_t p_size)
{
switch(p_family)
{
case AF_INET:
memcpy(&((struct sockaddr_in*)p_dest)->sin_addr, p_data, p_size);
break;
case AF_INET6:
memcpy(&((struct sockaddr_in6*)p_dest)->sin6_addr, p_data, p_size);
break;
case AF_PACKET:
memcpy(((struct sockaddr_ll*)p_dest)->sll_addr, p_data, p_size);
((struct sockaddr_ll*)p_dest)->sll_halen = p_size;
break;
default:
memcpy(p_dest->sa_data, p_data, p_size);
break;
}
p_dest->sa_family = p_family;
}
static void addToEnd(struct ifaddrs **p_resultList, struct ifaddrs *p_entry)
{
if(!*p_resultList)
{
*p_resultList = p_entry;
}
else
{
struct ifaddrs *l_cur = *p_resultList;
while(l_cur->ifa_next)
{
l_cur = l_cur->ifa_next;
}
l_cur->ifa_next = p_entry;
}
}
static void interpretLink(struct nlmsghdr *p_hdr, struct ifaddrs **p_links, struct ifaddrs **p_resultList)
{
struct ifinfomsg *l_info = (struct ifinfomsg *)NLMSG_DATA(p_hdr);
size_t l_nameSize = 0;
size_t l_addrSize = 0;
size_t l_dataSize = 0;
size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg));
struct rtattr *l_rta;
for(l_rta = (struct rtattr *)(((char *)l_info) + NLMSG_ALIGN(sizeof(struct ifinfomsg))); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
{
//void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch(l_rta->rta_type)
{
case IFLA_ADDRESS:
case IFLA_BROADCAST:
l_addrSize += NLMSG_ALIGN(calcAddrLen(AF_PACKET, l_rtaDataSize));
break;
case IFLA_IFNAME:
l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
break;
case IFLA_STATS:
l_dataSize += NLMSG_ALIGN(l_rtaSize);
break;
default:
break;
}
}
struct ifaddrs *l_entry = malloc(sizeof(struct ifaddrs) + l_nameSize + l_addrSize + l_dataSize);
memset(l_entry, 0, sizeof(struct ifaddrs));
l_entry->ifa_name = "";
char *l_name = ((char *)l_entry) + sizeof(struct ifaddrs);
char *l_addr = l_name + l_nameSize;
char *l_data = l_addr + l_addrSize;
l_entry->ifa_flags = l_info->ifi_flags;
l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg));
for(l_rta = (struct rtattr *)(((char *)l_info) + NLMSG_ALIGN(sizeof(struct ifinfomsg))); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
{
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch(l_rta->rta_type)
{
case IFLA_ADDRESS:
case IFLA_BROADCAST:
{
size_t l_addrLen = calcAddrLen(AF_PACKET, l_rtaDataSize);
makeSockaddr(AF_PACKET, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize);
((struct sockaddr_ll *)l_addr)->sll_ifindex = l_info->ifi_index;
((struct sockaddr_ll *)l_addr)->sll_hatype = l_info->ifi_type;
if(l_rta->rta_type == IFLA_ADDRESS)
{
l_entry->ifa_addr = (struct sockaddr *)l_addr;
}
else
{
l_entry->ifa_broadaddr = (struct sockaddr *)l_addr;
}
l_addr += NLMSG_ALIGN(l_addrLen);
break;
}
case IFLA_IFNAME:
strncpy(l_name, l_rtaData, l_rtaDataSize);
l_name[l_rtaDataSize] = '\0';
l_entry->ifa_name = l_name;
break;
case IFLA_STATS:
memcpy(l_data, l_rtaData, l_rtaDataSize);
l_entry->ifa_data = l_data;
break;
default:
break;
}
}
addToEnd(p_resultList, l_entry);
p_links[l_info->ifi_index - 1] = l_entry;
}
static void interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_links, struct ifaddrs **p_resultList)
{
struct ifaddrmsg *l_info = (struct ifaddrmsg *)NLMSG_DATA(p_hdr);
size_t l_nameSize = 0;
size_t l_addrSize = 0;
int l_addedNetmask = 0;
size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
struct rtattr *l_rta;
for(l_rta = (struct rtattr *)(((char *)l_info) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
{
//void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
if(l_info->ifa_family == AF_PACKET)
{
continue;
}
switch(l_rta->rta_type)
{
case IFA_ADDRESS:
case IFA_LOCAL:
if((l_info->ifa_family == AF_INET || l_info->ifa_family == AF_INET6) && !l_addedNetmask)
{ // make room for netmask
l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
l_addedNetmask = 1;
}
case IFA_BROADCAST:
l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
break;
case IFA_LABEL:
l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
break;
default:
break;
}
}
struct ifaddrs *l_entry = malloc(sizeof(struct ifaddrs) + l_nameSize + l_addrSize);
memset(l_entry, 0, sizeof(struct ifaddrs));
l_entry->ifa_name = p_links[l_info->ifa_index - 1]->ifa_name;
char *l_name = ((char *)l_entry) + sizeof(struct ifaddrs);
char *l_addr = l_name + l_nameSize;
l_entry->ifa_flags = l_info->ifa_flags | p_links[l_info->ifa_index - 1]->ifa_flags;
l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
for(l_rta = (struct rtattr *)(((char *)l_info) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize))
{
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch(l_rta->rta_type)
{
case IFA_ADDRESS:
case IFA_BROADCAST:
case IFA_LOCAL:
{
size_t l_addrLen = calcAddrLen(l_info->ifa_family, l_rtaDataSize);
makeSockaddr(l_info->ifa_family, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize);
if(l_info->ifa_family == AF_INET6)
{
if(IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)l_rtaData) || IN6_IS_ADDR_MC_LINKLOCAL((struct in6_addr *)l_rtaData))
{
((struct sockaddr_in6 *)l_addr)->sin6_scope_id = l_info->ifa_index;
}
}
if(l_rta->rta_type == IFA_ADDRESS)
{ // apparently in a point-to-point network IFA_ADDRESS contains the dest address and IFA_LOCAL contains the local address
if(l_entry->ifa_addr)
{
l_entry->ifa_dstaddr = (struct sockaddr *)l_addr;
}
else
{
l_entry->ifa_addr = (struct sockaddr *)l_addr;
}
}
else if(l_rta->rta_type == IFA_LOCAL)
{
if(l_entry->ifa_addr)
{
l_entry->ifa_dstaddr = l_entry->ifa_addr;
}
l_entry->ifa_addr = (struct sockaddr *)l_addr;
}
else
{
l_entry->ifa_broadaddr = (struct sockaddr *)l_addr;
}
l_addr += NLMSG_ALIGN(l_addrLen);
break;
}
case IFA_LABEL:
strncpy(l_name, l_rtaData, l_rtaDataSize);
l_name[l_rtaDataSize] = '\0';
l_entry->ifa_name = l_name;
break;
default:
break;
}
}
if(l_entry->ifa_addr && (l_entry->ifa_addr->sa_family == AF_INET || l_entry->ifa_addr->sa_family == AF_INET6))
{
unsigned l_maxPrefix = (l_entry->ifa_addr->sa_family == AF_INET ? 32 : 128);
unsigned l_prefix = (l_info->ifa_prefixlen > l_maxPrefix ? l_maxPrefix : l_info->ifa_prefixlen);
char l_mask[16] = {0};
unsigned i;
for(i=0; i<(l_prefix/8); ++i)
{
l_mask[i] = 0xff;
}
l_mask[i] = 0xff << (8 - (l_prefix % 8));
makeSockaddr(l_entry->ifa_addr->sa_family, (struct sockaddr *)l_addr, l_mask, l_maxPrefix / 8);
l_entry->ifa_netmask = (struct sockaddr *)l_addr;
}
addToEnd(p_resultList, l_entry);
}
static void interpret(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_links, struct ifaddrs **p_resultList)
{
pid_t l_pid = getpid();
for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next)
{
unsigned int l_nlsize = p_netlinkList->m_size;
struct nlmsghdr *l_hdr;
for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize))
{
if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket)
{
continue;
}
if(l_hdr->nlmsg_type == NLMSG_DONE)
{
break;
}
if(l_hdr->nlmsg_type == RTM_NEWLINK)
{
interpretLink(l_hdr, p_links, p_resultList);
}
else if(l_hdr->nlmsg_type == RTM_NEWADDR)
{
interpretAddr(l_hdr, p_links, p_resultList);
}
}
}
}
static unsigned countLinks(int p_socket, NetlinkList *p_netlinkList)
{
unsigned l_links = 0;
pid_t l_pid = getpid();
for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next)
{
unsigned int l_nlsize = p_netlinkList->m_size;
struct nlmsghdr *l_hdr;
for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize))
{
if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket)
{
continue;
}
if(l_hdr->nlmsg_type == NLMSG_DONE)
{
break;
}
if(l_hdr->nlmsg_type == RTM_NEWLINK)
{
++l_links;
}
}
}
return l_links;
}
int getifaddrs(struct ifaddrs **ifap)
{
if(!ifap)
{
return -1;
}
*ifap = NULL;
int l_socket = netlink_socket();
if(l_socket < 0)
{
return -1;
}
NetlinkList *l_linkResults = getResultList(l_socket, RTM_GETLINK);
if(!l_linkResults)
{
close(l_socket);
return -1;
}
NetlinkList *l_addrResults = getResultList(l_socket, RTM_GETADDR);
if(!l_addrResults)
{
close(l_socket);
freeResultList(l_linkResults);
return -1;
}
unsigned l_numLinks = countLinks(l_socket, l_linkResults) + countLinks(l_socket, l_addrResults);
struct ifaddrs *l_links[l_numLinks];
memset(l_links, 0, l_numLinks * sizeof(struct ifaddrs *));
interpret(l_socket, l_linkResults, l_links, ifap);
interpret(l_socket, l_addrResults, l_links, ifap);
freeResultList(l_linkResults);
freeResultList(l_addrResults);
close(l_socket);
return 0;
}
void freeifaddrs(struct ifaddrs *ifa)
{
struct ifaddrs *l_cur;
while(ifa)
{
l_cur = ifa;
ifa = ifa->ifa_next;
free(l_cur);
}
}

58
src/ifaddrs-android.h Normal file
View file

@ -0,0 +1,58 @@
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
#if !__ANDROID__
#error ifaddrs-android only works with Android
#endif
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include <sys/cdefs.h>
__BEGIN_DECLS
extern int getifaddrs(struct ifaddrs **ifap);
extern void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#endif

43
src/ifaddrs-musl.h Normal file
View file

@ -0,0 +1,43 @@
#ifndef _IFADDRS_H
#define _IFADDRS_H
#ifdef __cplusplus
extern "C" {
#endif
#if !__linux__
#error ifaddrs-musl.h only works with a Linux kernel
#endif
#if __ANDROID__
#error ifaddrs-musl.h does not work with Android
#endif
#include <features.h>
#include <netinet/in.h>
#include <sys/socket.h>
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
union {
struct sockaddr *ifu_broadaddr;
struct sockaddr *ifu_dstaddr;
} ifa_ifu;
void *ifa_data;
};
#define ifa_broadaddr ifa_ifu.ifu_broadaddr
#define ifa_dstaddr ifa_ifu.ifu_dstaddr
void freeifaddrs(struct ifaddrs *ifp);
int getifaddrs(struct ifaddrs **ifap);
#ifdef __cplusplus
}
#endif
#endif

1202
src/kms.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -6,8 +6,12 @@
#endif // CONFIG
#include CONFIG
#if _MSC_VER
//#include <time.h>
#else
#include <sys/time.h>
#include <stdlib.h>
#endif // _MSC_VER
//#include <stdlib.h>
#include "types.h"
//
// REQUEST... types are actually fixed size
@ -50,6 +54,15 @@
#define ActivationInterval VLActivationInterval
#define RenewalInterval VLRenewalInterval
#define MAX_CLIENTS 671
typedef struct
{
GUID Guid[MAX_CLIENTS];
int_fast16_t CurrentCount;
int_fast16_t MaxCount;
int_fast16_t CurrentPosition;
} ClientList_t, *PClientList_t;
typedef struct {
VERSION_INFO;
@ -67,7 +80,7 @@ typedef struct {
} /*__packed*/ REQUEST;
typedef struct {
VERSION_INFO;
VERSION_INFO;
DWORD PIDSize; // Size of PIDData in bytes.
WCHAR KmsPID[PID_BUFFER_SIZE]; // ePID (must include terminating zero)
GUID CMID; // Client machine id. Must be the same as in request.
@ -215,49 +228,154 @@ typedef union
typedef BYTE hwid_t[8];
typedef struct
typedef enum
{
GUID guid;
const char* name;
const char* pid;
None = 0,
UseNdr64 = 1 << 0,
UseForEpid = 1 << 1,
MayBeServer = 1 << 2,
} HostBuildFlag;
typedef struct CsvlkData
{
union
{
uint64_t EPidOffset;
char* EPid;
};
int64_t ReleaseDate;
uint32_t GroupId;
uint32_t MinKeyId;
uint32_t MaxKeyId;
uint8_t MinActiveClients;
uint8_t Reserved[3];
} CsvlkData_t, *PCsvlkData_t;
typedef struct VlmcsdData
{
union
{
GUID Guid;
uint8_t GuidBytes[16];
};
union
{
uint64_t NameOffset;
char* Name;
};
uint8_t AppIndex;
uint8_t KmsIndex;
} KmsIdList;
uint8_t ProtocolVersion;
uint8_t NCountPolicy;
uint8_t IsRetail;
uint8_t IsPreview;
uint8_t EPidIndex;
uint8_t reserved;
#define KMS_PARAM_MAJOR AppIndex
#define KMS_PARAM_REQUIREDCOUNT KmsIndex
} VlmcsdData_t, *PVlmcsdData_t;
#define APP_ID_WINDOWS 0
#define APP_ID_OFFICE2010 1
#define APP_ID_OFFICE2013 2
typedef struct
{
union
{
uint64_t Offset;
void* Pointer;
};
} DataPointer_t;
#define KMS_ID_VISTA 0
#define KMS_ID_WIN7 1
#define KMS_ID_WIN8_VL 2
#define KMS_ID_WIN_BETA 3
#define KMS_ID_WIN8_RETAIL 4
#define KMS_ID_WIN81_VL 5
#define KMS_ID_WIN81_RETAIL 6
#define KMS_ID_WIN2008A 7
#define KMS_ID_WIN2008B 8
#define KMS_ID_WIN2008C 9
#define KMS_ID_WIN2008R2A 10
#define KMS_ID_WIN2008R2B 11
#define KMS_ID_WIN2008R2C 12
#define KMS_ID_WIN2012 13
#define KMS_ID_WIN2012R2 14
#define KMS_ID_OFFICE2010 15
#define KMS_ID_OFFICE2013 16
#define KMS_ID_WIN_SRV_BETA 17
#define KMS_ID_OFFICE2016 18
#define KMS_ID_WIN10_VL 19
#define KMS_ID_WIN10_RETAIL 20
#define KMS_OPTIONS_USENDR64 1 << 0
#define PWINGUID &AppList[APP_ID_WINDOWS].guid
#define POFFICE2010GUID &AppList[APP_ID_OFFICE2010].guid
#define POFFICE2013GUID &AppList[APP_ID_OFFICE2013].guid
typedef struct HostBuild
{
union
{
uint64_t DisplayNameOffset;
char* DisplayName;
};
typedef BOOL(__stdcall *RequestCallback_t)(const REQUEST *const baseRequest, RESPONSE *const baseResponse, BYTE *const hwId, const char* const ipstr);
int64_t ReleaseDate;
int32_t BuildNumber;
int32_t PlatformId;
HostBuildFlag Flags;
uint8_t reserved[4];
} HostBuild_t, *PHostBuild_t;
typedef struct VlmcsdHeader
{
BYTE Magic[4];
VERSION_INFO;
uint8_t CsvlkCount;
uint8_t Flags;
uint8_t Reserved[2];
union
{
int32_t Counts[5];
struct
{
int32_t AppItemCount;
int32_t KmsItemCount;
int32_t SkuItemCount;
int32_t HostBuildCount;
int32_t reserved2Counts;
};
};
union
{
DataPointer_t Datapointers[5];
struct
{
union
{
uint64_t AppItemOffset;
PVlmcsdData_t AppItemList;
};
union
{
uint64_t KmsItemOffset;
PVlmcsdData_t KmsItemList;
};
union
{
uint64_t SkuItemOffset;
PVlmcsdData_t SkuItemList;
};
union
{
uint64_t HostBuildOffset;
PHostBuild_t HostBuildList;
};
union
{
uint64_t Reserved2Offset;
void* Reserved2List;
};
CsvlkData_t CsvlkData[1];
};
};
} VlmcsdHeader_t, *PVlmcsdHeader_t;
//#define EPID_INDEX_WINDOWS 0
//#define EPID_INDEX_OFFICE2010 1
//#define EPID_INDEX_OFFICE2013 2
//#define EPID_INDEX_OFFICE2016 3
//#define EPID_INDEX_WINCHINAGOV 4
typedef HRESULT(__stdcall *RequestCallback_t)(REQUEST* baseRequest, RESPONSE *const baseResponse, BYTE *const hwId, const char* const ipstr);
size_t CreateResponseV4(REQUEST_V4 *const Request, BYTE *const response_data, const char* const ipstr);
size_t CreateResponseV6(REQUEST_V6 *restrict Request, BYTE *const response_data, const char* const ipstr);
@ -265,23 +383,28 @@ BYTE *CreateRequestV4(size_t *size, const REQUEST* requestBase);
BYTE *CreateRequestV6(size_t *size, const REQUEST* requestBase);
void randomPidInit();
void get16RandomBytes(void* ptr);
RESPONSE_RESULT DecryptResponseV6(RESPONSE_V6* Response_v6, int responseSize, BYTE* const response, const BYTE* const request, BYTE* hwid);
RESPONSE_RESULT DecryptResponseV4(RESPONSE_V4* Response_v4, const int responseSize, BYTE* const response, const BYTE* const request);
void getUnixTimeAsFileTime(FILETIME *const ts);
__pure int64_t fileTimeToUnixTime(const FILETIME *const ts);
const char* getProductNameHE(const GUID *const guid, const KmsIdList *const List, ProdListIndex_t *const i);
const char* getProductNameLE(const GUID *const guid, const KmsIdList *const List, ProdListIndex_t *const i);
__pure ProdListIndex_t getExtendedProductListSize();
__pure ProdListIndex_t getAppListSize(void);
RESPONSE_RESULT DecryptResponseV6(RESPONSE_V6* response_v6, int responseSize, BYTE* const response, const BYTE* const rawRequest, BYTE* hwid);
RESPONSE_RESULT DecryptResponseV4(RESPONSE_V4* response_v4, const int responseSize, BYTE* const rawResponse, const BYTE* const rawRequest);
void getUnixTimeAsFileTime(FILETIME* ts);
__pure int64_t fileTimeToUnixTime(FILETIME* ts);
extern const KmsIdList ProductList[];
extern const KmsIdList AppList[];
extern const KmsIdList ExtendedProductList[];
#ifndef IS_LIBRARY
int32_t getProductIndex(const GUID* guid, const PVlmcsdData_t list, const int32_t count, char** name, char** ePid);
#if !defined(NO_INI_FILE)||!defined(NO_VERBOSE_LOG)
const char* getNextString(const char* s);
#endif // !defined(NO_INI_FILE)||!defined(NO_VERBOSE_LOG)
#endif // IS_LIBRARY
#ifndef NO_STRICT_MODES
void InitializeClientLists();
void CleanUpClientLists();
#endif // !NO_STRICT_MODES
extern RequestCallback_t CreateResponseBase;
#ifdef _PEDANTIC
uint16_t IsValidLcid(const uint16_t Lcid);
uint16_t IsValidLcid(const uint16_t lcid);
uint32_t IsValidHostBuild(const int32_t hostBuild);
#endif // _PEDANTIC
#endif // __kms_h

963
src/kmsdata-full.c Normal file
View file

@ -0,0 +1,963 @@
#ifndef CONFIG
#define CONFIG "config.h"
#endif // CONFIG
#include CONFIG
#ifndef NO_INTERNAL_DATA
#include "kmsdata.h"
uint8_t DefaultKmsData[] =
{
/* 0000 */ 0x4B, 0x4D, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // KMD.............
/* 0010 */ 0x1D, 0x00, 0x00, 0x00, 0xCA, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....Ê...........
/* 0020 */ 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........h.......
/* 0030 */ 0x08, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........H.......
/* 0040 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
/* 0050 */ 0x00, 0xB5, 0xB2, 0x5B, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0xC0, 0x97, 0xD7, 0x20, // .µ²[....Î...À.×
/* 0060 */ 0xBF, 0xC4, 0x08, 0x22, 0x00, 0x00, 0x00, 0x00, 0x56, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿Ä."....V.......
/* 0070 */ 0x80, 0x4F, 0x3E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0xDC, 0x0B, // .O>L....`...À.Ü.
/* 0080 */ 0x7F, 0x6A, 0xFE, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .jþ.............
/* 0090 */ 0x00, 0x11, 0x07, 0x51, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0x80, 0x8E, 0xF2, 0x0D, // ...Q....Î.....ò.
/* 00A0 */ 0xFF, 0x3F, 0x42, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ÿ?B.....è.......
/* 00B0 */ 0x00, 0x9A, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0x40, 0x17, 0x0C, 0x1A, // ...V....Î...@...
/* 00C0 */ 0xBF, 0xC8, 0x5B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x31, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿È[.....1 ......
/* 00D0 */ 0x80, 0x33, 0xE4, 0x58, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0F, 0x00, 0x00, 0xC0, 0xE1, 0xE4, 0x00, // .3äX........Àáä.
/* 00E0 */ 0xFF, 0xC9, 0x9A, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ÿÉ.;..... ......
/* 00F0 */ 0x00, 0x29, 0xA8, 0x5B, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0x80, 0x5A, 0xB2, 0x27, // .)¨[....Î....Z²'
/* 0100 */ 0x7F, 0x87, 0xE3, 0x28, 0x00, 0x00, 0x00, 0x00, 0x34, 0x27, 0xC9, 0x55, 0x82, 0xD6, 0x71, 0x4D, // ..ã(....4'ÉU.ÖqM
/* 0110 */ 0x98, 0x3E, 0xD6, 0xEC, 0x3F, 0x16, 0x05, 0x9F, 0x84, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .>Öì?....!......
/* 0120 */ 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x81, 0x28, 0xA5, 0x59, 0x89, 0xA9, 0x9D, 0x47, // ...2.....(¥Y.©.G
/* 0130 */ 0xAF, 0x46, 0xF2, 0x75, 0xC6, 0x37, 0x06, 0x63, 0x8C, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯FòuÆ7.c.!......
/* 0140 */ 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x15, 0xCE, 0xF1, 0x0F, 0x89, 0xA9, 0x9D, 0x47, // .........Îñ..©.G
/* 0150 */ 0xAF, 0x46, 0xF2, 0x75, 0xC6, 0x37, 0x06, 0x63, 0x97, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯FòuÆ7.c.!......
/* 0160 */ 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x05, 0x00, 0xFB, 0xB1, 0x49, 0x84, 0xEA, 0xF0, 0x7A, 0x49, // ........û±I.êðzI
/* 0170 */ 0x99, 0xAB, 0x66, 0xCA, 0x96, 0xE9, 0xA0, 0xF5, 0xA3, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .«fÊ.é.õ£!......
/* 0180 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x59, 0x56, 0xB1, 0x11, 0x03, 0xE6, 0xF1, 0x4C, // ........YV±..æñL
/* 0190 */ 0x9C, 0x1F, 0xF0, 0xEC, 0x01, 0xB8, 0x18, 0x88, 0xB7, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..ðì.¸..·!......
/* 01A0 */ 0x00, 0x00, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x36, 0xD6, 0x7C, 0xD2, 0x62, 0x19, 0xE9, 0x44, // ........6Ö|Òb.éD
/* 01B0 */ 0x8B, 0x4F, 0x27, 0xB6, 0xC2, 0x3E, 0xFB, 0x85, 0xD0, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .O'¶Â>û.Ð!......
/* 01C0 */ 0x00, 0x00, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x23, 0xBF, 0xA0, 0x7B, 0xF5, 0xD0, 0x72, 0x40, // ........#¿.{õÐr@
/* 01D0 */ 0x91, 0xD9, 0xD5, 0x5A, 0xF5, 0xA4, 0x81, 0xB6, 0xEC, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÙÕZõ¤.¶ì!......
/* 01E0 */ 0x00, 0x00, 0x06, 0x19, 0x00, 0x00, 0x04, 0x00, 0xC0, 0xE3, 0x9F, 0x96, 0xEC, 0xA3, 0x1A, 0x49, // ........Àã..ì£.I
/* 01F0 */ 0x9F, 0x25, 0x42, 0x36, 0x05, 0xDE, 0xB3, 0x65, 0x08, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .%B6.Þ³e."......
/* 0200 */ 0x00, 0x00, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x58, 0x13, 0xC5, 0xE1, 0x3E, 0xFE, 0x03, 0x42, // ........X.Åá>þ.B
/* 0210 */ 0xA4, 0xA2, 0x3B, 0x6B, 0x20, 0xC9, 0x73, 0x4E, 0x21, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¤¢;k ÉsN!"......
/* 0220 */ 0x00, 0x00, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x4F, 0x13, 0xE2, 0x58, 0x11, 0x8E, 0x17, 0x4D, // ........O.âX...M
/* 0230 */ 0x9C, 0xB2, 0x91, 0x06, 0x9C, 0x15, 0x11, 0x48, 0x35, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .².....H5"......
/* 0240 */ 0x00, 0x00, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x19, 0x52, 0xDE, 0x7F, 0xFA, 0xFB, 0x4A, 0x48, // .........RÞ.úûJH
/* 0250 */ 0x82, 0xC9, 0x34, 0xD1, 0xAD, 0x53, 0xE8, 0x56, 0x4E, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .É4Ñ­SèVN"......
/* 0260 */ 0x00, 0x00, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x7B, 0xB9, 0xBB, 0xA4, 0x8C, 0x28, 0x4A, // ........;{¹»¤.(J
/* 0270 */ 0x97, 0x17, 0x89, 0xFA, 0xBD, 0x42, 0xC4, 0xAC, 0x58, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...ú½BĬX"......
/* 0280 */ 0x00, 0x00, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, 0x58, 0xB3, 0x40, 0x3C, 0x48, 0x59, 0xAF, 0x45, // ........X³@<HY¯E
/* 0290 */ 0x92, 0x3B, 0x53, 0xD2, 0x1F, 0xCC, 0x7E, 0x79, 0x6B, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .;SÒ.Ì~yk"......
/* 02A0 */ 0x00, 0x00, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0x90, 0x68, 0x64, 0x6D, 0x06, 0x36, 0x1A, 0x46, // .........hdm.6.F
/* 02B0 */ 0x86, 0xAB, 0x59, 0x8B, 0xB8, 0x4A, 0xCE, 0x82, 0x7E, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .«Y.¸JÎ.~"......
/* 02C0 */ 0x00, 0x00, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x80, 0xC7, 0x8F, 0xCB, 0x05, 0x2C, 0x5A, 0x49, // .........Ç.Ë.,ZI
/* 02D0 */ 0x97, 0x10, 0x85, 0xAF, 0xFF, 0xC9, 0x04, 0xD7, 0x93, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...¯ÿÉ.×."......
/* 02E0 */ 0x00, 0x00, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xA0, 0x94, 0x5F, 0xA0, 0xD5, 0x81, 0x40, // ........».._.Õ.@
/* 02F0 */ 0xA6, 0x85, 0x58, 0x19, 0x41, 0x8B, 0x2F, 0xE0, 0xA8, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¦.X.A./à¨"......
/* 0300 */ 0x00, 0x00, 0x05, 0x19, 0x00, 0x01, 0x00, 0x00, 0xE4, 0x56, 0xE1, 0x33, 0x6F, 0xB7, 0x52, 0x4A, // ........äVá3o·RJ
/* 0310 */ 0x9F, 0x91, 0xF6, 0x41, 0xDD, 0x95, 0xAC, 0x48, 0xB8, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..öAÝ.¬H¸"......
/* 0320 */ 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x87, 0x33, 0xE5, 0x8F, 0x87, 0x30, 0x47, 0x44, // .........3å..0GD
/* 0330 */ 0x89, 0x85, 0xF7, 0x51, 0x32, 0x21, 0x5A, 0xC9, 0xDC, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..÷Q2!ZÉÜ"......
/* 0340 */ 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xF3, 0xFD, 0x21, 0x8A, 0xC5, 0xCB, 0xEB, 0x44, // ........óý!.ÅËëD
/* 0350 */ 0x83, 0xF3, 0xFE, 0x28, 0x4E, 0x66, 0x80, 0xA7, 0x0C, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .óþ(Nf.§.#......
/* 0360 */ 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xCC, 0xC6, 0x0F, 0x0E, 0xFF, 0xAE, 0x4F, // ........¯ÌÆ..ÿ®O
/* 0370 */ 0x9D, 0x08, 0x43, 0x70, 0x78, 0x5B, 0xF7, 0xED, 0x2F, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..Cpx[֒/#......
/* 0380 */ 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xF5, 0x87, 0xCA, 0x46, 0xCD, 0xC0, 0x40, // ........¶õ.ÊFÍÀ@
/* 0390 */ 0xB0, 0x6D, 0x8E, 0xCD, 0x57, 0xA4, 0x37, 0x3F, 0x56, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °m.ÍW¤7?V#......
/* 03A0 */ 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x89, 0x26, 0xCA, 0xB2, 0xA8, 0xA9, 0xD7, 0x42, // .........&ʲ¨©×B
/* 03B0 */ 0x93, 0x8D, 0xCF, 0x8E, 0x9F, 0x20, 0x19, 0x58, 0x89, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..Ï.. .X.#......
/* 03C0 */ 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x71, 0xCB, 0x65, 0x86, 0x8C, 0x46, 0xA3, 0x4A, // ........qËe..F£J
/* 03D0 */ 0xA3, 0x37, 0xCB, 0x9B, 0xC9, 0xD5, 0xEA, 0xAC, 0xAF, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // £7Ë.ÉÕ꬯#......
/* 03E0 */ 0x00, 0x00, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0xD3, 0xEF, 0x56, 0x84, 0x04, 0x0C, 0x89, 0x40, // ........ÓïV....@
/* 03F0 */ 0x87, 0x40, 0x5B, 0x72, 0x38, 0x53, 0x5A, 0x65, 0xC3, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .@[r8SZeÃ#......
/* 0400 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC0, 0x9F, 0x6E, 0x7D, 0x25, 0xC4, 0x4B, // ........iÀ.n}%ÄK
/* 0410 */ 0xB4, 0xA7, 0x75, 0x05, 0x14, 0xD3, 0x27, 0x43, 0xDA, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ´§u..Ó'CÚ#......
/* 0420 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x70, 0x52, 0x5F, 0x6D, 0xAC, 0x31, 0x3E, 0x43, // ........pR_m¬1>C
/* 0430 */ 0xB9, 0x0A, 0x39, 0x89, 0x29, 0x23, 0xC6, 0x57, 0xEE, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¹.9.)#ÆWî#......
/* 0440 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x01, 0x00, 0x00, 0xDC, 0x64, 0x2A, 0x21, 0xB1, 0x43, 0x3D, 0x4D, // ........Üd*!±C=M
/* 0450 */ 0xA3, 0x0C, 0x2F, 0xC6, 0x9D, 0x20, 0x95, 0xC6, 0x05, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // £./Æ. .Æ.$......
/* 0460 */ 0x00, 0x00, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x46, 0xF9, 0x5A, 0xE8, 0x25, 0x2E, 0xB7, 0x47, // ........FùZè%.·G
/* 0470 */ 0x83, 0xE1, 0xBE, 0xBC, 0xEB, 0xEA, 0xC6, 0x11, 0x13, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .á¾¼ëêÆ..$......
/* 0480 */ 0x01, 0x00, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0xBF, 0xF1, 0xA6, 0xE6, 0x40, 0x9D, 0xC3, 0x40, // ........¿ñ¦æ@.Ã@
/* 0490 */ 0xAA, 0x9F, 0xC7, 0x7B, 0xA2, 0x15, 0x78, 0xC0, 0x1F, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ª.Ç{¢.xÀ.$......
/* 04A0 */ 0x02, 0x00, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x68, 0x79, 0x4C, 0xAA, 0xDA, 0xB9, 0x80, 0x46, // ........hyLªÚ¹.F
/* 04B0 */ 0x92, 0xB6, 0xAC, 0xB2, 0x5E, 0x2F, 0x86, 0x6C, 0x2B, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .¶¬²^/.l+$......
/* 04C0 */ 0x02, 0x00, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x1B, 0xF6, 0xB5, 0x85, 0x0B, 0x32, 0xE3, 0x4B, // .........öµ..2ãK
/* 04D0 */ 0x81, 0x4A, 0xB7, 0x6B, 0x2B, 0xFA, 0xFC, 0x82, 0x45, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .J·k+úü.E$......
/* 04E0 */ 0x02, 0x00, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xB1, 0x9E, 0x7D, 0x61, 0x36, 0xEF, 0x82, 0x4F, // ........±.}a6ï.O
/* 04F0 */ 0x86, 0xE0, 0xA6, 0x5A, 0xE0, 0x7B, 0x96, 0xC6, 0x51, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .à¦Zà{.ÆQ$......
/* 0500 */ 0x02, 0x00, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x62, 0xEB, 0xE8, 0x8D, 0xE0, 0xBB, 0xAC, 0x40, // ........bëè.໬@
/* 0510 */ 0xAC, 0x17, 0xF7, 0x55, 0x95, 0x07, 0x1E, 0xA3, 0x5D, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¬.÷U...£]$......
/* 0520 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xC1, 0x9C, 0xA9, 0x19, 0x77, 0x06, 0x43, // ........ðÁ.©.w.C
/* 0530 */ 0x96, 0x45, 0x29, 0x41, 0x02, 0xFB, 0xFF, 0x95, 0x77, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .E)A.ûÿ.w$......
/* 0540 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAE, 0xE1, 0x34, 0xF8, 0x27, 0x50, 0x49, // ........U®á4ø'PI
/* 0550 */ 0x88, 0x77, 0x7A, 0x03, 0xBE, 0x5F, 0xB1, 0x81, 0x96, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .wz.¾_±..$......
/* 0560 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xBB, 0x3C, 0x4D, 0x03, 0x4B, 0x5D, 0x45, 0x42, // ........»<M.K]EB
/* 0570 */ 0xB3, 0xF8, 0xF8, 0x45, 0x71, 0x31, 0x40, 0x78, 0xB5, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ³øøEq1@xµ$......
/* 0580 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xFD, 0xEA, 0x32, 0xDE, 0xEE, 0xAA, 0x62, 0x46, // ........ýê2ÞîªbF
/* 0590 */ 0x94, 0x44, 0xC1, 0xBE, 0xFB, 0x41, 0xBD, 0xE2, 0xD4, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .DÁ¾ûA½âÔ$......
/* 05A0 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xE5, 0x62, 0xC3, 0x90, 0xA1, 0x0D, 0xFD, 0x4B, // ........åbÃ.¡.ýK
/* 05B0 */ 0xB5, 0x3B, 0xB8, 0x7D, 0x30, 0x9A, 0xDE, 0x43, 0xF1, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // µ;¸}0.ÞCñ$......
/* 05C0 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x95, 0xE3, 0x73, 0x0C, 0xFC, 0x0D, 0x40, // ........|.ãs.ü.@
/* 05D0 */ 0x91, 0x84, 0x5F, 0x7B, 0x6F, 0x2E, 0xB4, 0x09, 0x26, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .._{o.´.&%......
/* 05E0 */ 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xB3, 0xFA, 0xD2, 0x32, 0xA8, 0xE4, 0xC2, 0x42, // ........³úÒ2¨äÂB
/* 05F0 */ 0x92, 0x3B, 0x4B, 0xF4, 0xFD, 0x13, 0xE6, 0xEE, 0x59, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .;Kôý.æîY%......
/* 0600 */ 0x00, 0x01, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x33, 0xA3, 0x03, 0x71, 0xC8, 0xB8, 0xCC, 0x49, // ........3£.qȸÌI
/* 0610 */ 0x93, 0xCE, 0xD3, 0x7C, 0x09, 0x68, 0x7F, 0x92, 0x79, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÎÓ|.h..y%......
/* 0620 */ 0x00, 0x01, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x83, 0xD3, 0xB2, 0xE0, 0x12, 0xD1, 0x3F, 0x41, // .........Ó²à.Ñ?A
/* 0630 */ 0x8A, 0x80, 0x97, 0xF3, 0x73, 0xA5, 0x82, 0x0C, 0x9B, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...ós¥...%......
/* 0640 */ 0x00, 0x03, 0x06, 0x19, 0x00, 0x00, 0x04, 0x00, 0xFB, 0x54, 0x84, 0xE3, 0xA4, 0x41, 0x59, 0x4F, // ........ûT.ã¤AYO
/* 0650 */ 0xA5, 0xDC, 0x25, 0x08, 0x0E, 0x35, 0x47, 0x30, 0xB3, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¥Ü%..5G0³%......
/* 0660 */ 0x00, 0x03, 0x06, 0x19, 0x00, 0x00, 0x04, 0x00, 0x60, 0x5A, 0x5A, 0x2D, 0x40, 0x30, 0xBF, 0x48, // ........`ZZ-@0¿H
/* 0670 */ 0xBE, 0xB0, 0xFC, 0xD7, 0x70, 0xC2, 0x0C, 0xE0, 0xCC, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¾°ü×pÂ.àÌ%......
/* 0680 */ 0x00, 0x04, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x83, 0x6D, 0x77, 0x9F, 0x56, 0x71, 0xB2, 0x45, // .........mw.Vq²E
/* 0690 */ 0x8A, 0x5C, 0x35, 0x9B, 0x9C, 0x9F, 0x22, 0xA3, 0xEC, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .\5..."£ì%......
/* 06A0 */ 0x00, 0x04, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x99, 0x7C, 0xE9, 0x58, 0x77, 0xF3, 0xF1, 0x4E, // .........|éXwóñN
/* 06B0 */ 0x81, 0xD5, 0x4A, 0xD5, 0x52, 0x2B, 0x5F, 0xD8, 0x0E, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÕJÕR+_Ø.&......
/* 06C0 */ 0x00, 0x05, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x44, 0x75, 0x10, 0xA9, 0xA0, 0xF4, 0x53, 0x40, // ........Du.©.ôS@
/* 06D0 */ 0xA9, 0x6A, 0x14, 0x79, 0xAB, 0xDE, 0xF9, 0x12, 0x1E, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ©j.y«Þù..&......
/* 06E0 */ 0x00, 0x05, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x51, 0x17, 0x9E, 0x7B, 0xDA, 0xA8, 0x75, 0x4F, // ........Q..{Ú¨uO
/* 06F0 */ 0x95, 0x60, 0x5F, 0xAD, 0xFE, 0x3D, 0x8E, 0x38, 0x3F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .`_­þ=.8?&......
/* 0700 */ 0x00, 0x05, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x57, 0x8A, 0x91, 0xCD, 0x1B, 0xA4, 0x82, 0x4C, // ........W..Í.¤.L
/* 0710 */ 0x8D, 0xCE, 0x1A, 0x53, 0x8E, 0x22, 0x1A, 0x83, 0x51, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Î.S."..Q&......
/* 0720 */ 0x00, 0x05, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x88, 0x22, 0xC4, 0xE0, 0x0C, 0x98, 0x88, 0x47, // ........."Äà...G
/* 0730 */ 0xA0, 0x14, 0xC0, 0x80, 0xD2, 0xE1, 0x92, 0x6E, 0x71, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..À.Òá.nq&......
/* 0740 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x55, 0x23, 0x10, 0x3C, 0x27, 0xD0, 0xC6, 0x42, // ........U#.<'ÐÆB
/* 0750 */ 0xAD, 0x23, 0x2E, 0x7E, 0xF8, 0xA0, 0x25, 0x85, 0x86, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ­#.~ø.%..&......
/* 0760 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x21, 0x11, 0x11, 0x73, 0x38, 0x56, 0xF6, 0x40, // ........!..s8Vö@
/* 0770 */ 0xBC, 0x11, 0xF1, 0xD7, 0xB0, 0xD6, 0x43, 0x00, 0x9D, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¼.ñ×°ÖC..&......
/* 0780 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA4, 0x51, 0x7B, 0x04, 0x0C, 0x8F, 0x4E, // ........l¤Q{...N
/* 0790 */ 0x9A, 0xF4, 0x84, 0x96, 0xCC, 0xA9, 0x0D, 0x5E, 0xB3, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ô..Ì©.^³&......
/* 07A0 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xB7, 0x38, 0xB8, 0x87, 0xB6, 0x41, 0x90, 0x45, // ........·8¸.¶A.E
/* 07B0 */ 0x83, 0x18, 0x57, 0x97, 0x95, 0x1D, 0x85, 0x29, 0xD3, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..W....)Ó&......
/* 07C0 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xE2, 0xE3, 0x72, 0xE2, 0x2F, 0x73, 0x65, 0x4C, // ........âãrâ/seL
/* 07D0 */ 0xA8, 0xF0, 0x48, 0x47, 0x47, 0xD0, 0xD9, 0x47, 0xF5, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¨ðHGGÐÙGõ&......
/* 07E0 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x92, 0xC0, 0xBB, 0x82, 0x50, 0xBC, 0x16, 0x4E, // .........À».P¼.N
/* 07F0 */ 0x8E, 0x18, 0xB7, 0x4F, 0xC4, 0x86, 0xAE, 0xC3, 0x0D, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..·OÄ.®Ã.'......
/* 0800 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xD3, 0x71, 0x15, 0x4B, 0xFB, 0xBA, 0x40, 0x4B, // ........Óq.Kûº@K
/* 0810 */ 0x80, 0x87, 0xA9, 0x61, 0xBE, 0x2C, 0xAF, 0x65, 0x31, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..©a¾,¯e1'......
/* 0820 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x92, 0x73, 0xE6, 0x2D, 0xA7, 0xB7, 0x2A, 0x46, // .........sæ-§·*F
/* 0830 */ 0xB1, 0xCA, 0x10, 0x8D, 0xD1, 0x89, 0xF5, 0x88, 0x57, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ±Ê..Ñ.õ.W'......
/* 0840 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x82, 0xFC, 0x1A, 0x3F, 0xAC, 0xF8, 0x6C, 0x4F, // .........ü.?¬ølO
/* 0850 */ 0x80, 0x05, 0x1D, 0x23, 0x3E, 0x60, 0x6E, 0xEE, 0x6F, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...#>`nîo'......
/* 0860 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xB1, 0x00, 0x53, 0x33, 0x2E, 0xC2, 0x4D, // .........±.S3.ÂM
/* 0870 */ 0x82, 0x91, 0x47, 0xFF, 0xCE, 0xC7, 0x46, 0xDD, 0x91, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..GÿÎÇFÝ.'......
/* 0880 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x5A, 0x0B, 0xA8, 0xAD, 0x76, 0x8B, 0x42, // ........¿Z.¨­v.B
/* 0890 */ 0xB0, 0x5D, 0xA4, 0x7D, 0x2D, 0xFF, 0xEE, 0xBF, 0xB5, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °]¤}-ÿ'......
/* 08A0 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x01, 0x82, 0x80, 0xFF, 0xC6, 0xFE, 0xD4, 0x4F, // ...........ÿÆþÔO
/* 08B0 */ 0xAE, 0x16, 0xAB, 0xBD, 0xDA, 0xDE, 0x57, 0x06, 0xCF, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ®.«½ÚÞW.Ï'......
/* 08C0 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x05, 0xAB, 0xF2, 0x43, 0x87, 0x7C, 0x56, 0x4D, // .........«òC.|VM
/* 08D0 */ 0xB2, 0x7C, 0x44, 0xD0, 0xF9, 0xA3, 0xDA, 0xBD, 0xEF, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ²|DÐù£Ú½ï'......
/* 08E0 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x65, 0x8E, 0x86, 0xEC, 0xDF, 0xFA, 0x59, 0x47, // ........e..ìßúYG
/* 08F0 */ 0xB2, 0x3E, 0x93, 0xFE, 0x37, 0xF2, 0xCC, 0x29, 0x0D, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ²>.þ7òÌ).(......
/* 0900 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xEA, 0x50, 0xDB, 0xE4, 0xA1, 0xBD, 0x66, 0x45, // ........êPÛ䡽fE
/* 0910 */ 0xB0, 0x47, 0x0C, 0xA5, 0x0A, 0xBC, 0x6F, 0x07, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °G.¥.¼o.8(......
/* 0920 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x14, 0xF8, 0xF4, 0x0D, 0x57, 0x3F, 0x8B, 0x4B, // .........øô.W?.K
/* 0930 */ 0x9A, 0x9D, 0xFD, 0xDA, 0xDC, 0xD6, 0x9F, 0xAC, 0x51, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..ýÚÜÖ.¬Q(......
/* 0940 */ 0x00, 0x06, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x09, 0xE5, 0x2E, 0xAE, 0x34, 0x1B, 0xC0, 0x41, // .........å.®4.ÀA
/* 0950 */ 0xAC, 0xB7, 0x6D, 0x46, 0x50, 0x16, 0x89, 0x15, 0x65, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¬·mFP...e(......
/* 0960 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0xBB, 0x46, 0x7B, 0x9C, 0xFC, 0x48, // .........í»F{.üH
/* 0970 */ 0xA6, 0x14, 0x95, 0x25, 0x05, 0x73, 0xF4, 0xEA, 0x7A, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¦..%.sôêz(......
/* 0980 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x05, 0xD6, 0xB6, 0x1C, 0xB3, 0x11, 0x14, 0x4E, // .........Ö¶.³..N
/* 0990 */ 0xBB, 0x30, 0xDA, 0x91, 0xC8, 0xE3, 0x98, 0x3A, 0x91, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // »0Ú.Èã.:.(......
/* 09A0 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x80, 0x99, 0x2E, 0xB9, 0xD5, 0xB9, 0x21, 0x48, // ...........¹Õ¹!H
/* 09B0 */ 0x9C, 0x94, 0x14, 0x0F, 0x63, 0x2F, 0x63, 0x12, 0xA8, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....c/c.¨(......
/* 09C0 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x29, 0x15, 0x04, 0x5A, 0xF8, 0xFE, 0x07, 0x4D, // ........)..Zøþ.M
/* 09D0 */ 0xB0, 0x6F, 0xB5, 0x9B, 0x57, 0x3B, 0x32, 0xD2, 0xBF, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °oµ.W;2Ò¿(......
/* 09E0 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x9A, 0xA0, 0x54, 0x7B, 0xD5, 0x10, 0x4C, // ...........T{Õ.L
/* 09F0 */ 0x8B, 0x69, 0xA8, 0x42, 0xD6, 0x59, 0x0A, 0xD5, 0xD8, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .i¨BÖY.ÕØ(......
/* 0A00 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x96, 0x78, 0x53, 0xDB, 0x6F, 0x37, 0xAE, 0x48, // .........xSÛo7®H
/* 0A10 */ 0xA4, 0x92, 0x53, 0xD0, 0x54, 0x77, 0x73, 0xD0, 0xF1, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¤.SÐTwsÐñ(......
/* 0A20 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x29, 0xA8, 0xE1, 0x37, 0xDB, 0xD1, 0x44, // ........j)¨á7ÛÑD
/* 0A30 */ 0x8C, 0xCE, 0x7B, 0xC9, 0x61, 0xD5, 0x9C, 0x54, 0x0D, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Î{ÉaÕ.T.)......
/* 0A40 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0xAA, 0xD3, 0x6D, 0xAA, 0xB4, 0xC2, 0xE2, 0x40, // ........ªÓmª´Ââ@
/* 0A50 */ 0xA5, 0x44, 0xA6, 0xBB, 0xB3, 0xF5, 0xC3, 0x95, 0x29, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¥D¦»³õÃ.))......
/* 0A60 */ 0x00, 0x07, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0xBF, 0xD6, 0x4E, 0xC0, 0xC8, 0x55, 0x47, 0x4B, // ........¿ÖNÀÈUGK
/* 0A70 */ 0x9F, 0x8E, 0x5A, 0x1F, 0x31, 0xCE, 0xEE, 0x60, 0x3A, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..Z.1Îî`:)......
/* 0A80 */ 0x00, 0x08, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, 0xA2, 0x84, 0x55, 0x9D, 0x85, 0x2D, 0x9A, 0x41, // ........¢.U..-.A
/* 0A90 */ 0x98, 0x2C, 0xA0, 0x08, 0x88, 0xBB, 0x9D, 0xDF, 0x49, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .,...».ßI)......
/* 0AA0 */ 0x00, 0x08, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, 0xA0, 0x90, 0x73, 0x19, 0xF6, 0x65, 0x95, 0x4A, // ..........s.öe.J
/* 0AB0 */ 0xBD, 0xC4, 0x55, 0xD5, 0x8A, 0x3B, 0x02, 0x53, 0x69, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ½ÄUÕ.;.Si)......
/* 0AC0 */ 0x00, 0x08, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, 0xD4, 0xFC, 0x60, 0x88, 0x7B, 0xA7, 0x20, 0x4A, // ........Ôü`.{§ J
/* 0AD0 */ 0x90, 0x45, 0xA1, 0x50, 0xFF, 0x11, 0xD6, 0x09, 0x7A, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .E¡Pÿ.Ö.z)......
/* 0AE0 */ 0x00, 0x08, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, 0xA3, 0x18, 0x00, 0xA0, 0x0F, 0xF2, 0x32, 0x46, // ........£....ò2F
/* 0AF0 */ 0xBF, 0x7C, 0x8D, 0xAA, 0x53, 0x51, 0xC9, 0x14, 0x99, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿|.ªSQÉ..)......
/* 0B00 */ 0x00, 0x08, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00, 0xAF, 0x8B, 0x01, 0x10, 0x21, 0xCE, 0x60, 0x40, // ........¯...!Î`@
/* 0B10 */ 0x80, 0xBD, 0x47, 0xFE, 0x74, 0xED, 0x4D, 0xAB, 0xB4, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .½GþtíM«´)......
/* 0B20 */ 0x00, 0x09, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0x48, 0x18, 0xDB, 0x18, 0xE0, 0x12, 0x67, 0x41, // ........H.Û.à.gA
/* 0B30 */ 0xB9, 0xD7, 0xDA, 0x7F, 0xCD, 0xA5, 0x07, 0xDB, 0xDD, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¹×Ú.Í¥.ÛÝ)......
/* 0B40 */ 0x00, 0x09, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x1B, 0x8E, 0x45, 0x7A, 0x83, 0xF6, 0x45, // ........ì..Ez.öE
/* 0B50 */ 0xB9, 0xD5, 0x92, 0x5E, 0xD5, 0xD2, 0x99, 0xDE, 0x04, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¹Õ.^ÕÒ.Þ.*......
/* 0B60 */ 0x00, 0x09, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x97, 0x49, 0xE1, 0x0A, 0x80, 0xF7, 0x4C, // ........ç.Iá..÷L
/* 0B70 */ 0xAD, 0x10, 0xDE, 0x4B, 0x45, 0xB5, 0x78, 0xDB, 0x19, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ­.ÞKEµxÛ.*......
/* 0B80 */ 0x00, 0x09, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xCD, 0x8B, 0xA9, 0x43, 0x53, 0x03, 0x46, // ........mÍ.©CS.F
/* 0B90 */ 0x8A, 0xFE, 0x59, 0x08, 0xE4, 0x61, 0x11, 0x12, 0x30, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .þY.äa..0*......
/* 0BA0 */ 0x00, 0x09, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x45, 0xF2, 0xEB, 0xA8, 0x29, 0xAF, 0x4D, // ........ÁEòë¨)¯M
/* 0BB0 */ 0x9C, 0xB1, 0x38, 0xDF, 0xC6, 0x08, 0xA8, 0xC8, 0x47, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .±8ßÆ.¨ÈG*......
/* 0BC0 */ 0x00, 0x09, 0x05, 0x19, 0x00, 0x00, 0x00, 0x00, 0x38, 0x32, 0x1C, 0xFE, 0x2A, 0x43, 0xA1, 0x43, // ........82.þ*C¡C
/* 0BD0 */ 0x8E, 0x25, 0x97, 0xE7, 0xD1, 0xEF, 0x10, 0xF3, 0x60, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .%.çÑï.ó`*......
/* 0BE0 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x6A, 0x45, 0xEE, 0xFF, 0x87, 0xCD, 0x90, 0x43, // ........jEîÿ.Í.C
/* 0BF0 */ 0x8E, 0x07, 0x16, 0x14, 0x6C, 0x67, 0x2F, 0xD0, 0x71, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....lg/Ðq*......
/* 0C00 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x4F, 0xB7, 0x78, 0xDB, 0x1C, 0xEF, 0x92, 0x48, // ........O·xÛ.ï.H
/* 0C10 */ 0xAB, 0xFE, 0x1E, 0x66, 0xB8, 0x23, 0x1D, 0xF6, 0x86, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // «þ.f¸#.ö.*......
/* 0C20 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x64, 0x8A, 0x55, 0x78, 0x19, 0xDC, 0xFE, 0x43, // ........d.Ux.ÜþC
/* 0C30 */ 0xA0, 0xD0, 0x80, 0x75, 0xB2, 0xA3, 0x70, 0xA3, 0xA8, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Ð.u²£p£¨*......
/* 0C40 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x1D, 0x6A, 0x2C, 0xC7, 0x52, 0xF2, 0x7E, 0x4E, // .........j,ÇRò~N
/* 0C50 */ 0xBD, 0xD1, 0x3F, 0xCA, 0x34, 0x2A, 0xCB, 0x35, 0xBB, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ½Ñ?Ê4*Ë5»*......
/* 0C60 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0xB5, 0x87, 0x8D, 0xE5, 0x26, 0x81, 0x80, 0x45, // ........µ..å&..E
/* 0C70 */ 0x80, 0xFB, 0x86, 0x1B, 0x22, 0xF7, 0x92, 0x96, 0xDC, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .û.."÷..Ü*......
/* 0C80 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0xC7, 0x91, 0xB4, 0xCA, 0x18, 0xA9, 0x60, 0x4F, // ........Ç.´Ê.©`O
/* 0C90 */ 0xB5, 0x02, 0xDA, 0xB7, 0x5E, 0x33, 0x4F, 0x40, 0xFD, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // µ.Ú·^3O@ý*......
/* 0CA0 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x3D, 0xE6, 0x6C, 0x09, 0xAC, 0x4F, 0xA9, 0x48, // ........=æl.¬O©H
/* 0CB0 */ 0x82, 0xA9, 0x61, 0xAE, 0x9E, 0x80, 0x0E, 0x5F, 0x20, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .©a®..._ +......
/* 0CC0 */ 0x00, 0x0A, 0x06, 0x19, 0x01, 0x00, 0x00, 0x00, 0x32, 0x2B, 0x94, 0xE9, 0x55, 0x2E, 0x97, 0x41, // ........2+.éU..A
/* 0CD0 */ 0xB0, 0xBD, 0x5F, 0xF5, 0x8C, 0xBA, 0x88, 0x60, 0x3D, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °½_õ.º.`=+......
/* 0CE0 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x12, 0x82, 0x99, 0xBA, 0x0A, 0x46, 0xDB, 0x44, // ...........º.FÛD
/* 0CF0 */ 0xBF, 0xB5, 0x71, 0xBF, 0x09, 0xD1, 0xC6, 0x8B, 0x58, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿µq¿.ÑÆ.X+......
/* 0D00 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xD6, 0xEC, 0xDD, 0xC6, 0x54, 0x23, 0x19, 0x4C, // ........ÖìÝÆT#.L
/* 0D10 */ 0x90, 0x9B, 0x30, 0x6A, 0x30, 0x58, 0x48, 0x4E, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..0j0XHN.+......
/* 0D20 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xA3, 0xE3, 0xF5, 0xB8, 0x33, 0xED, 0x08, 0x46, // ........£ãõ¸3í.F
/* 0D30 */ 0x81, 0xE1, 0x37, 0xD6, 0xC9, 0xDC, 0xFD, 0x9C, 0xA1, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .á7ÖÉÜý.¡+......
/* 0D40 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x1A, 0x67, 0x81, 0xD1, 0x79, 0xB1, 0x4E, // ........¯.g.Ñy±N
/* 0D50 */ 0xB0, 0x04, 0x8C, 0xBB, 0xE1, 0x73, 0xAF, 0xEA, 0xCC, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °..»ás¯êÌ+......
/* 0D60 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x70, 0x3E, 0x11, 0x49, 0xFA, 0xA4, 0x48, // ........\p>.Iú¤H
/* 0D70 */ 0xBE, 0xEA, 0x7D, 0xD8, 0x79, 0xB4, 0x6B, 0x14, 0xE3, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¾ê}Øy´k.ã+......
/* 0D80 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x81, 0x69, 0x6B, 0xC0, 0xFD, 0xD7, 0x35, 0x4A, // .........ikÀý×5J
/* 0D90 */ 0xB7, 0xB4, 0x05, 0x47, 0x42, 0xB7, 0xAF, 0x67, 0xFC, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ·´.GB·¯gü+......
/* 0DA0 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x9F, 0xD7, 0x76, 0x74, 0x48, 0x8E, 0xB4, 0x49, // .........×vtH.´I
/* 0DB0 */ 0xAB, 0x63, 0x4D, 0x0B, 0x81, 0x3A, 0x16, 0xE4, 0x15, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // «cM..:.ä.,......
/* 0DC0 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x54, 0x2D, 0xB8, 0x0A, 0xF4, 0x47, 0xCB, 0x4A, // ........T-¸.ôGËJ
/* 0DD0 */ 0x81, 0x8C, 0xCC, 0x5B, 0xF0, 0xEC, 0xB6, 0x49, 0x30, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..Ì[ðì¶I0,......
/* 0DE0 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x90, 0x85, 0xE8, 0xF7, 0xC7, 0xDF, 0x78, 0x4C, // ..........è÷ÇßxL
/* 0DF0 */ 0xBC, 0xCB, 0x6F, 0x38, 0x65, 0xB9, 0x9D, 0x1A, 0x5B, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¼Ëo8e¹..[,......
/* 0E00 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x2D, 0x4E, 0xCD, 0x59, 0x50, 0x50, 0x4A, // .........-NÍYPPJ
/* 0E10 */ 0xA9, 0x2D, 0x05, 0xD5, 0xBB, 0x12, 0x67, 0xC7, 0x84, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ©-.Õ».gÇ.,......
/* 0E20 */ 0x00, 0x0B, 0x06, 0x19, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x52, 0xE9, 0xCD, 0x96, 0x2F, 0x9D, 0x4D, // ........ÇRéÍ./.M
/* 0E30 */ 0x8F, 0x2B, 0x2D, 0x34, 0x9F, 0x64, 0xFC, 0x51, 0xAD, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .+-4.düQ­,......
/* 0E40 */ 0x00, 0x0C, 0x05, 0x19, 0x00, 0x01, 0x00, 0x00, 0x6B, 0x3E, 0x38, 0xA4, 0xDA, 0xDA, 0x3D, 0x42, // ........k>8¤ÚÚ=B
/* 0E50 */ 0xA4, 0x3D, 0xF2, 0x56, 0x78, 0x42, 0x96, 0x76, 0xCB, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¤=òVxB.vË,......
/* 0E60 */ 0x00, 0x0C, 0x05, 0x19, 0x00, 0x01, 0x00, 0x00, 0x7B, 0xA0, 0x59, 0xCF, 0x2A, 0x1A, 0xE0, 0x4B, // ........{.YÏ*.àK
/* 0E70 */ 0xBF, 0xE0, 0x42, 0x3B, 0x58, 0x23, 0xE6, 0x63, 0xEB, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿àB;X#æcë,......
/* 0E80 */ 0x00, 0x0C, 0x05, 0x19, 0x00, 0x01, 0x00, 0x00, 0x7F, 0x33, 0x9C, 0x2B, 0x1D, 0x7A, 0x71, 0x42, // .........3.+.zqB
/* 0E90 */ 0x90, 0xA3, 0xC6, 0x85, 0x5A, 0x2B, 0x8A, 0x1C, 0x0F, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .£Æ.Z+...-......
/* 0EA0 */ 0x00, 0x0C, 0x05, 0x19, 0x00, 0x01, 0x00, 0x00, 0x72, 0xAD, 0x1E, 0x63, 0xAB, 0xA8, 0xF8, 0x4D, // ........r­.c«¨øM
/* 0EB0 */ 0xBB, 0xDF, 0x37, 0x20, 0x29, 0x98, 0x9B, 0xDD, 0x23, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // »ß7 )..Ý#-......
/* 0EC0 */ 0x00, 0x0C, 0x05, 0x19, 0x00, 0x01, 0x00, 0x00, 0x7C, 0x9F, 0xFA, 0xDD, 0x9E, 0xF0, 0xB9, 0x40, // ........|.úÝ.ð¹@
/* 0ED0 */ 0x8C, 0x1A, 0xBE, 0x87, 0x7A, 0x9A, 0x7F, 0x4B, 0x3B, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..¾.z..K;-......
/* 0EE0 */ 0x00, 0x0D, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x56, 0x11, 0xFB, 0x7A, 0x1D, 0x2C, 0xFC, 0x40, // ........V.ûz.,ü@
/* 0EF0 */ 0xB2, 0x60, 0xAA, 0xB7, 0x44, 0x2B, 0x62, 0xFE, 0x53, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ²`ª·D+bþS-......
/* 0F00 */ 0x00, 0x0D, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xD4, 0x42, 0x25, 0xAD, 0x54, 0x91, 0x6D, 0x4C, // ........ÔB%­T.mL
/* 0F10 */ 0x8A, 0x44, 0x30, 0xF1, 0x1E, 0xE9, 0x69, 0x89, 0x77, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .D0ñ.éi.w-......
/* 0F20 */ 0x00, 0x0E, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xE3, 0x01, 0x24, 0x0A, 0xC5, 0x58, 0x4B, // ........Ðã.$.ÅXK
/* 0F30 */ 0x87, 0xB2, 0x7E, 0x79, 0x4B, 0x7D, 0x26, 0x07, 0x94, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .²~yK}&..-......
/* 0F40 */ 0x00, 0x0E, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x90, 0x4D, 0xAF, 0xC1, 0xBC, 0xD1, 0xCA, 0x44, // .........M¯Á¼ÑÊD
/* 0F50 */ 0x85, 0xD4, 0x00, 0x3B, 0xA3, 0x3D, 0xB3, 0xB9, 0xC1, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Ô.;£=³¹Á-......
/* 0F60 */ 0x00, 0x0E, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x98, 0x81, 0xD0, 0xAD, 0xB2, 0x47, // .........I..Э²G
/* 0F70 */ 0xB3, 0xBA, 0x31, 0x6B, 0x12, 0xD6, 0x47, 0xB4, 0xE0, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ³º1k.ÖG´à-......
/* 0F80 */ 0x00, 0x0E, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x20, 0xE2, 0xB6, 0x68, 0x09, 0xCF, 0x6B, 0x46, // ........ â¶h.ÏkF
/* 0F90 */ 0x92, 0xD3, 0x45, 0xCD, 0x96, 0x4B, 0x95, 0x09, 0x0F, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÓEÍ.K..........
/* 0FA0 */ 0x00, 0x0F, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x77, 0xEF, 0x09, 0xFD, 0x47, 0x56, 0xFF, 0x4E, // ........wï.ýGVÿN
/* 0FB0 */ 0x80, 0x9C, 0xAF, 0x2B, 0x64, 0x65, 0x9A, 0x45, 0x2E, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..¯+de.E........
/* 0FC0 */ 0x00, 0x0F, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x17, 0xEF, 0x01, 0x0D, 0x3E, 0x2A, 0x42, // ........k.ï..>*B
/* 0FD0 */ 0xB4, 0xF8, 0x4E, 0xA8, 0x80, 0x03, 0x5E, 0x8F, 0x5D, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ´øN¨..^.].......
/* 0FE0 */ 0x00, 0x0F, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x51, 0x72, 0xF7, 0x87, 0x0E, 0xD5, 0x48, // ........\Qr÷..ÕH
/* 0FF0 */ 0xA6, 0x76, 0xE6, 0x96, 0x2C, 0x3E, 0x11, 0x95, 0x7D, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¦væ.,>..}.......
/* 1000 */ 0x00, 0x10, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xD9, 0x8B, 0x8B, 0xA7, 0x17, 0x80, 0xF5, 0x4D, // ........Ù..§..õM
/* 1010 */ 0xB8, 0x6A, 0x09, 0xF7, 0x56, 0xAF, 0xFA, 0x7C, 0x9C, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¸j.÷V¯ú|........
/* 1020 */ 0x00, 0x10, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xF3, 0x8C, 0xA1, 0xCD, 0x96, 0xC1, 0xAD, 0x46, // ........ó.¡Í.Á­F
/* 1030 */ 0xB2, 0x89, 0x60, 0xC0, 0x72, 0x86, 0x99, 0x94, 0xB7, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ².`Àr...·.......
/* 1040 */ 0x00, 0x10, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x1F, 0x53, 0x68, 0x11, 0x55, 0x89, 0x49, // ........¹.Sh.U.I
/* 1050 */ 0x97, 0xBE, 0xD1, 0x1A, 0x0F, 0x55, 0x63, 0x3F, 0xDA, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .¾Ñ..Uc?Ú.......
/* 1060 */ 0x00, 0x11, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x2B, 0x0E, 0x62, 0xE7, 0x09, 0xFD, 0x42, // ........=+.bç.ýB
/* 1070 */ 0x80, 0x2A, 0x17, 0xA1, 0x36, 0x52, 0xFE, 0x7A, 0xFA, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .*.¡6Rþzú.......
/* 1080 */ 0x00, 0x11, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE6, 0x82, 0x74, 0x89, 0xC5, 0x7F, 0x4B, // .........æ.t.Å.K
/* 1090 */ 0x8E, 0xCC, 0x46, 0xD4, 0x55, 0xAC, 0x3B, 0x87, 0x1C, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÌFÔU¬;../......
/* 10A0 */ 0x00, 0x12, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x85, 0x26, 0x8A, 0x7E, 0x1C, 0xD3, 0x48, // ..........&.~.ÓH
/* 10B0 */ 0xA6, 0x87, 0xFB, 0xCA, 0x9B, 0x9A, 0xC1, 0x6B, 0x3E, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¦.ûÊ..Ák>/......
/* 10C0 */ 0x00, 0x12, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3D, 0x64, 0xD3, 0x42, 0x0C, 0x2D, 0x41, // ........`=dÓB.-A
/* 10D0 */ 0xA7, 0xD6, 0x52, 0xE6, 0x63, 0x53, 0x27, 0xF6, 0x6C, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // §ÖRæcS'öl/......
/* 10E0 */ 0x00, 0x13, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x83, 0x1C, 0xFD, 0x95, 0xF5, 0x7D, 0x4A, 0x49, // ..........ý.õ}JI
/* 10F0 */ 0xBE, 0x8B, 0x13, 0x00, 0xE1, 0xC9, 0xD1, 0xCD, 0x8B, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¾...áÉÑÍ./......
/* 1100 */ 0x00, 0x13, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x86, 0x54, 0x7D, 0x20, 0xE1, 0x71, 0x47, // ........Ç.T} áqG
/* 1110 */ 0xB7, 0xF1, 0x7B, 0x56, 0xC6, 0xD3, 0x17, 0x0C, 0xB2, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ·ñ{VÆÓ..²/......
/* 1120 */ 0x00, 0x13, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x41, 0xEC, 0xF5, 0xF0, 0x55, 0x0D, 0x32, 0x47, // ........AìõðU.2G
/* 1130 */ 0xAF, 0x02, 0x44, 0x0A, 0x44, 0xA3, 0xCF, 0x0F, 0xDA, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯.D.D£Ï.Ú/......
/* 1140 */ 0x00, 0x13, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0xBE, 0xA2, 0x43, 0xB7, 0xD4, 0x68, 0xD3, 0x4D, // ........¾¢C·ÔhÓM
/* 1150 */ 0xAF, 0x32, 0x92, 0x42, 0x5B, 0x7B, 0xB6, 0x23, 0xF7, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯2.B[{¶#÷/......
/* 1160 */ 0x00, 0x14, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x09, 0x00, 0xA4, 0x1E, 0x37, 0x4F, // ........D...¤.7O
/* 1170 */ 0xB7, 0x89, 0x01, 0x75, 0x0B, 0xA6, 0x98, 0x8C, 0x1C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ·..u.¦...0......
/* 1180 */ 0x00, 0x14, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x6B, 0xDB, 0x21, 0x7B, 0x9A, 0x14, 0x4A, // ........¤kÛ!{..J
/* 1190 */ 0x9E, 0x29, 0x64, 0xA6, 0x0C, 0x59, 0x30, 0x1D, 0x3E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .)d¦.Y0.>0......
/* 11A0 */ 0x00, 0x14, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x04, 0xCA, 0xB3, 0x58, 0xA3, 0x68, 0x4D, // ........N.ʳX£hM
/* 11B0 */ 0x98, 0x83, 0xAA, 0xA2, 0x94, 0x1A, 0xCA, 0x99, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..ª¢..Ê.`0......
/* 11C0 */ 0x00, 0x14, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x34, 0xBF, 0x3D, 0x6C, 0x5F, 0xA7, 0x4F, // .........4¿=l_§O
/* 11D0 */ 0xB9, 0x36, 0x69, 0x9D, 0xCE, 0x9E, 0x26, 0x3F, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¹6i.Î.&?.0......
/* 11E0 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xF4, 0x33, 0x44, 0x7B, 0xE7, 0xB1, 0x88, 0x47, // ........ô3D{ç±.G
/* 11F0 */ 0x89, 0x5A, 0xC4, 0x53, 0x78, 0xD3, 0x82, 0x53, 0x9F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ZÄSxÓ.S.0......
/* 1200 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x79, 0x67, 0xC5, 0x21, 0x49, 0xB4, 0x20, 0x4D, // ........ygÅ!I´ M
/* 1210 */ 0xAD, 0xFC, 0xEE, 0xCE, 0x0E, 0x1A, 0xD7, 0x4B, 0xC1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ­üîÎ..×KÁ0......
/* 1220 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1B, 0x5A, 0x2B, 0xAB, 0xA5, 0x54, 0x4C, // ..........Z+«¥TL
/* 1230 */ 0xAC, 0x2F, 0xA6, 0xD9, 0x48, 0x24, 0xA2, 0x83, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¬/¦ÙH$¢.à0......
/* 1240 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x10, 0x54, 0x1C, 0x8C, 0x39, 0x9F, 0x05, 0x48, // .........T..9..H
/* 1250 */ 0x8C, 0x9D, 0x63, 0xA0, 0x77, 0x06, 0x35, 0x8F, 0xFF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..c.w.5.ÿ0......
/* 1260 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD9, 0x43, 0x86, 0x5E, 0xE8, 0x4B, // ........n¯ÙC.^èK
/* 1270 */ 0xA7, 0x97, 0xD0, 0x72, 0xA0, 0x46, 0x89, 0x6C, 0x1C, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // §.Ðr.F.l.1......
/* 1280 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x08, 0x9C, 0xE4, 0x82, 0xDA, 0xF8, 0x42, // ........ç..ä.ÚøB
/* 1290 */ 0xBD, 0xE2, 0xB5, 0x70, 0xFB, 0xCA, 0xE7, 0x6C, 0x36, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ½âµpûÊçl61......
/* 12A0 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x22, 0xEF, 0xC5, 0x61, 0x4F, 0xF1, 0x53, 0x45, // ........"ïÅaOñSE
/* 12B0 */ 0xA8, 0x24, 0xC4, 0xB3, 0x1E, 0x84, 0xB1, 0x00, 0x6B, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¨$ij..±.k1......
/* 12C0 */ 0x00, 0x15, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x44, 0x7C, 0x94, 0xBA, 0x9D, 0xD1, 0x86, 0x47, // ........D|.º.Ñ.G
/* 12D0 */ 0xB6, 0xAE, 0x22, 0x77, 0x0B, 0xC9, 0x4C, 0x54, 0x9E, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¶®"w.ÉLT.1......
/* 12E0 */ 0x00, 0x16, 0x06, 0x05, 0x00, 0x01, 0x00, 0x00, 0x06, 0x16, 0x3D, 0x4F, 0xEA, 0x3F, 0x01, 0x4C, // ..........=Oê?.L
/* 12F0 */ 0xBE, 0x3C, 0x8D, 0x67, 0x1C, 0x40, 0x1E, 0x3B, 0xC5, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¾<.g.@.;Å1......
/* 1300 */ 0x00, 0x17, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0xC2, 0x2D, 0x68, 0x2C, 0x68, 0x8B, 0x63, 0x4F, // ........Â-h,h.cO
/* 1310 */ 0xA1, 0x65, 0xAE, 0x29, 0x1D, 0x4C, 0xF1, 0x38, 0xDC, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¡e®).Lñ8Ü1......
/* 1320 */ 0x00, 0x17, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xD8, 0xCF, 0xD7, 0xC0, 0x2B, 0x45, // .........ÿØÏ×À+E
/* 1330 */ 0x9F, 0x60, 0xEF, 0x5C, 0x70, 0xC3, 0x20, 0x94, 0xF5, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .`ï\pà .õ1......
/* 1340 */ 0x00, 0x17, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x50, 0x49, 0xF5, 0xD4, 0xF2, 0x26, 0xB4, 0x4F, // ........PIõÔò&´O
/* 1350 */ 0xBA, 0x21, 0xFF, 0xAB, 0x16, 0xAF, 0xCA, 0xDE, 0x0E, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // º!ÿ«.¯ÊÞ.2......
/* 1360 */ 0x00, 0x17, 0x04, 0x19, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE8, 0xE7, 0x8C, 0x8C, 0x18, 0x98, 0x4B, // ........rèç....K
/* 1370 */ 0x9D, 0x90, 0xF8, 0xF9, 0x0B, 0x7A, 0xAD, 0x02, 0x29, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..øù.z­.)2......
/* 1380 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x70, 0xD4, 0xE5, 0xCE, 0x3B, 0x6E, 0xCC, 0x4F, // ........pÔåÎ;nÌO
/* 1390 */ 0x8C, 0x2B, 0xD1, 0x74, 0x28, 0x56, 0x8A, 0x9F, 0x3C, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .+Ñt(V..<2......
/* 13A0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0xB8, 0xD0, 0x47, 0x89, 0x3B, 0xC3, 0xE1, 0x43, // ........¸ÐG.;ÃáC
/* 13B0 */ 0x8C, 0x56, 0x9B, 0x67, 0x4C, 0x05, 0x28, 0x32, 0x4E, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .V.gL.(2N2......
/* 13C0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x39, 0x66, 0x6B, 0xCA, 0xD6, 0x4A, 0xAE, 0x40, // ........9fkÊÖJ®@
/* 13D0 */ 0xA5, 0x75, 0x14, 0xDE, 0xE0, 0x7F, 0x64, 0x30, 0x61, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¥u.Þà.d0a2......
/* 13E0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x40, 0x96, 0xED, 0x09, 0x20, 0xF0, 0x0A, 0x40, // ........@.í. ð.@
/* 13F0 */ 0xAC, 0xD8, 0xD7, 0xD8, 0x67, 0xDF, 0xD9, 0xC2, 0x76, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¬Ø×ØgßÙÂv2......
/* 1400 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x49, 0x4E, 0x3D, 0xEF, 0x3D, 0xA5, 0x81, 0x4D, // ........IN=ï=¥.M
/* 1410 */ 0xA2, 0xB1, 0x2C, 0xA6, 0xC2, 0x55, 0x6B, 0x2C, 0x8A, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¢±,¦ÂUk,.2......
/* 1420 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x5C, 0x6F, 0x58, 0xAB, 0x56, 0x52, 0x32, 0x46, // ........\oX«VR2F
/* 1430 */ 0x96, 0x2F, 0xFE, 0xFD, 0x8B, 0x49, 0xE6, 0xF4, 0x9E, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ./þý.Iæô.2......
/* 1440 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x92, 0xC1, 0xB7, 0xEC, 0xAB, 0x73, 0xED, 0x4D, // .........Á·ì«síM
/* 1450 */ 0xAC, 0xF4, 0x23, 0x99, 0xB0, 0x95, 0xD0, 0xCC, 0xB2, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¬ô#.°.Ð̲2......
/* 1460 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x1D, 0x3B, 0x59, 0x45, 0xB1, 0xDF, 0x91, 0x4E, // .........;YE±ß.N
/* 1470 */ 0xBB, 0xFB, 0x2D, 0x5D, 0x0C, 0xE2, 0x22, 0x7A, 0xC6, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // »û-].â"zÆ2......
/* 1480 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x60, 0x77, 0x32, 0x6F, 0x5C, 0x8C, 0x7C, 0x41, // ........`w2o\.|A
/* 1490 */ 0x9B, 0x61, 0x83, 0x6A, 0x98, 0x28, 0x7E, 0x0C, 0xDD, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .a.j.(~.Ý2......
/* 14A0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0xF7, 0x3F, 0x13, 0xDF, 0x14, 0xBF, 0x95, 0x4F, // ........÷?.ß.¿.O
/* 14B0 */ 0xAF, 0xE3, 0x7B, 0x48, 0xE7, 0xE3, 0x31, 0xEF, 0xFB, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯ã{Hçã1ïû2......
/* 14C0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x61, 0xBF, 0xC7, 0x5D, 0xC9, 0x5E, 0x96, 0x49, // ........a¿Ç]É^.I
/* 14D0 */ 0x9C, 0xCB, 0xDF, 0x80, 0x6A, 0x2D, 0x0E, 0xFE, 0x13, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Ëß.j-.þ.3......
/* 14E0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x75, 0x4F, 0x0C, 0xB5, 0x9B, 0x59, 0xE8, 0x43, // ........uO.µ.YèC
/* 14F0 */ 0x8D, 0xCD, 0x10, 0x81, 0xA7, 0x96, 0x72, 0x41, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Í..§.rA03......
/* 1500 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x87, 0x9E, 0x50, 0xEA, 0xA1, 0x07, 0x45, 0x4A, // ..........Pê¡.EJ
/* 1510 */ 0x9E, 0xDC, 0xEB, 0xA5, 0xA3, 0x9F, 0x36, 0xAF, 0x46, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Ü륣.6¯F3......
/* 1520 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x78, 0xA6, 0xA2, 0x9D, 0x6B, 0xFB, 0x67, 0x4E, // ........x¦¢.kûgN
/* 1530 */ 0xAB, 0x84, 0x60, 0xDD, 0x6A, 0x9C, 0x81, 0x9A, 0x68, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // «.`Ýj...h3......
/* 1540 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x05, 0x61, 0x23, 0x92, 0x67, 0xBB, 0x4F, 0x49, // .........a#.g»OI
/* 1550 */ 0x94, 0xC7, 0x7F, 0x7A, 0x60, 0x79, 0x29, 0xBD, 0x7D, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Ç.z`y)½}3......
/* 1560 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x9C, 0x38, 0x58, 0xE5, 0xC3, 0x83, 0x29, 0x4B, // .........8XåÃ.)K
/* 1570 */ 0xAD, 0xFE, 0x5E, 0x4D, 0x7F, 0x46, 0xC3, 0x58, 0x97, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ­þ^M.FÃX.3......
/* 1580 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0xFF, 0x33, 0xD8, 0x9E, 0x92, 0x4F, 0x36, 0x4F, // ........ÿ3Ø..O6O
/* 1590 */ 0xB3, 0x70, 0x86, 0x83, 0xA4, 0xF1, 0x32, 0x75, 0xAD, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ³p..¤ñ2u­3......
/* 15A0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0xE7, 0x82, 0x08, 0x2D, 0xE7, 0xA4, 0x3B, 0x42, // ........ç..-ç¤;B
/* 15B0 */ 0x8C, 0xCC, 0x70, 0xD9, 0x1E, 0x01, 0x58, 0xB1, 0xC8, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÌpÙ..X±È3......
/* 15C0 */ 0x01, 0x18, 0x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x2C, 0x62, 0xE7, 0x6E, 0xD8, 0x18, 0x05, 0x40, // ........,bçnØ..@
/* 15D0 */ 0x9F, 0xB7, 0x92, 0xDB, 0x64, 0x4A, 0x27, 0x9B, 0xD9, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .·.ÛdJ'.Ù3......
/* 15E0 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x52, 0x1D, 0x46, 0xF7, 0x2B, 0x7C, 0xB2, 0x43, // ........R.F÷+|²C
/* 15F0 */ 0x87, 0x44, 0xEA, 0x95, 0x8E, 0x0B, 0xD0, 0x9A, 0xEC, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Dê...Ð.ì3......
/* 1600 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x40, 0x80, 0x0B, 0xA3, 0x8A, 0xD6, 0x3F, 0x42, // ........@..£.Ö?B
/* 1610 */ 0xB0, 0xB5, 0x9C, 0xE2, 0x92, 0xEA, 0x5A, 0x8F, 0xFE, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °µ.â.êZ.þ3......
/* 1620 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xE3, 0x11, 0x9F, 0x1B, 0x5C, 0xC8, 0x1B, 0x4E, // ........ã...\È.N
/* 1630 */ 0xBB, 0x29, 0x87, 0x9A, 0xD2, 0xC9, 0x09, 0xE3, 0x13, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // »)..ÒÉ.ã.4......
/* 1640 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x6B, 0x1C, 0x98, 0xDC, 0x8E, 0xFC, 0x0F, 0x42, // ........k..Ü.ü.B
/* 1650 */ 0xAA, 0x43, 0xF8, 0xF3, 0x3E, 0x5C, 0x09, 0x23, 0x24, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ªCøó>\.#$4......
/* 1660 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xE6, 0xF3, 0xE1, 0xEF, 0xA2, 0xAE, 0x44, 0x41, // ........æóáDA
/* 1670 */ 0xA2, 0x08, 0x32, 0xAA, 0x87, 0x2B, 0x65, 0x45, 0x36, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¢.2ª.+eE64......
/* 1680 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xFA, 0x3A, 0x1C, 0x77, 0xC5, 0x50, 0x3F, 0x44, // ........ú:.wÅP?D
/* 1690 */ 0xB1, 0x51, 0xFF, 0x25, 0x46, 0xD8, 0x63, 0xA0, 0x4A, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ±Qÿ%FØc.J4......
/* 16A0 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x49, 0x26, 0x76, 0x8C, 0xD1, 0x97, 0x53, 0x49, // ........I&v.Ñ.SI
/* 16B0 */ 0xAD, 0x27, 0xB7, 0xE2, 0xC2, 0x5B, 0x97, 0x2E, 0x5E, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ­'·âÂ[..^4......
/* 16C0 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x9C, 0xDA, 0x22, 0xB3, 0xE2, 0xA2, 0x58, 0x40, // .........Ú"³â¢X@
/* 16D0 */ 0x9E, 0x4E, 0xF5, 0x9A, 0x69, 0x70, 0xBD, 0x69, 0x75, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Nõ.ip½iu4......
/* 16E0 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x4A, 0x12, 0x5D, 0x4A, 0x20, 0xE6, 0xBA, 0x44, // ........J.]J æºD
/* 16F0 */ 0xB6, 0xFF, 0x65, 0x89, 0x61, 0xB3, 0x3B, 0x9A, 0x93, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¶ÿe.a³;..4......
/* 1700 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xD1, 0x28, 0x7A, 0x42, 0x7C, 0xD1, 0xBF, 0x4A, // ........Ñ(zB|Ñ¿J
/* 1710 */ 0xB7, 0x17, 0x32, 0xC7, 0x80, 0xBA, 0x6F, 0x07, 0xAB, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ·.2Ç.ºo.«4......
/* 1720 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xF1, 0x9F, 0xC7, 0x00, 0x50, 0x68, 0x3D, 0x44, // ........ñ.Ç.Ph=D
/* 1730 */ 0xBF, 0x61, 0x71, 0xCD, 0xE0, 0xDE, 0x30, 0x5F, 0xC8, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿aqÍàÞ0_È4......
/* 1740 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x38, 0xFB, 0x3A, 0xB1, 0x79, 0xCD, 0xE5, 0x4A, // ........8û:±yÍåJ
/* 1750 */ 0x9F, 0x7F, 0xEE, 0xD0, 0x58, 0xD7, 0x50, 0xCA, 0xDE, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..îÐX×PÊÞ4......
/* 1760 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0x0E, 0xC1, 0x3A, 0xE1, 0xD0, 0x75, 0xFF, 0x4A, // .........Á:áÐuÿJ
/* 1770 */ 0xA0, 0xCD, 0x76, 0x49, 0x82, 0xCF, 0x54, 0x1C, 0xF3, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÍvI.ÏT.ó4......
/* 1780 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xF0, 0xFA, 0x4E, 0xAC, 0x1F, 0xF8, 0x61, 0x4F, // ........ðúN¬.øaO
/* 1790 */ 0xBD, 0xF7, 0xEA, 0x32, 0xB0, 0x2A, 0xB1, 0x17, 0x09, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ½÷ê2°*±..5......
/* 17A0 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xC6, 0xB1, 0xF5, 0xD9, 0x86, 0x53, 0x5A, 0x49, // ........ƱõÙ.SZI
/* 17B0 */ 0x88, 0xF9, 0x9A, 0xD6, 0xB4, 0x1A, 0xC9, 0xB3, 0x24, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ù.Ö´.ɳ$5......
/* 17C0 */ 0x02, 0x19, 0x05, 0x05, 0x00, 0x00, 0x02, 0x00, 0xE2, 0x38, 0xB5, 0x44, 0x34, 0xFB, 0x32, 0x47, // ........â8µD4û2G
/* 17D0 */ 0x81, 0xE4, 0x64, 0x4C, 0x17, 0xD2, 0xE7, 0x46, 0x35, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ädL.ÒçF55......
/* 17E0 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0xA0, 0xBF, 0x73, 0x93, 0xB3, 0x97, 0x87, 0x45, // .........¿s.³..E
/* 17F0 */ 0xAB, 0x73, 0x30, 0x93, 0x44, 0x61, 0xD5, 0x5C, 0x56, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // «s0.DaÕ\V5......
/* 1800 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0xB4, 0x6E, 0x28, 0xAA, 0x6F, 0x55, 0xEB, 0x4E, // ........´n(ªoUëN
/* 1810 */ 0x96, 0x7C, 0xC1, 0xB7, 0x71, 0xB7, 0x67, 0x3E, 0x76, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .|Á·q·g>v5......
/* 1820 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x56, 0x82, 0xCC, 0x7C, 0xAA, 0xFB, 0xC6, 0x49, // ........V.Ì|ªûÆI
/* 1830 */ 0xB2, 0xA9, 0xF5, 0xAF, 0xB4, 0x25, 0x7C, 0xD2, 0x97, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ²©õ¯´%|Ò.5......
/* 1840 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x17, 0xFE, 0x3D, 0xC5, 0x00, 0xCC, 0x67, 0x49, // .........þ=Å.ÌgI
/* 1850 */ 0xB1, 0x88, 0xA0, 0x88, 0xA9, 0x65, 0x49, 0x4D, 0xBA, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ±...©eIMº5......
/* 1860 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x7D, 0xA8, 0x16, 0x28, 0xED, 0xE1, 0x97, 0x40, // ........}¨.(íá.@
/* 1870 */ 0xB3, 0x11, 0xE2, 0x34, 0x1C, 0x57, 0xB1, 0x79, 0xD9, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ³.â4.W±yÙ5......
/* 1880 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x08, 0xF9, 0xC0, 0x67, 0x4F, 0x18, 0x64, 0x4F, // .........ùÀgO.dO
/* 1890 */ 0x82, 0x50, 0x12, 0xDB, 0x79, 0x7A, 0xB3, 0xC3, 0xF9, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .P.Ûyz³Ãù5......
/* 18A0 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x7A, 0x4E, 0xCE, 0x7B, 0x80, 0xDD, 0x82, 0x46, // ........zNÎ{.Ý.F
/* 18B0 */ 0x98, 0xFA, 0xF9, 0x93, 0x72, 0x58, 0x03, 0xD2, 0x1B, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .úù.rX.Ò.6......
/* 18C0 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x0C, 0xC1, 0x1E, 0xF6, 0x54, 0x3E, 0x45, // ..........Á.öT>E
/* 18D0 */ 0xB8, 0x5A, 0x6F, 0xA1, 0xBB, 0xFE, 0xA9, 0xB7, 0x3D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¸Zo¡»þ©·=6......
/* 18E0 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0xBF, 0xB5, 0xD2, 0x87, 0x7B, 0xD4, 0xFB, 0x41, // ........¿µÒ.{ÔûA
/* 18F0 */ 0xAF, 0x62, 0x71, 0xC3, 0x82, 0xF5, 0xCC, 0x85, 0x62, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯bqÃ.õÌ.b6......
/* 1900 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0xA9, 0x50, 0xFE, 0x3C, 0x03, 0x0E, 0x29, 0x4B, // ........©Pþ<..)K
/* 1910 */ 0x97, 0x54, 0x9F, 0x19, 0x3F, 0x07, 0xB7, 0x1F, 0x8E, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .T..?.·..6......
/* 1920 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x57, 0x9E, 0xE4, 0x39, 0x68, 0xAE, 0xE3, 0x4E, // ........W.ä9h®ãN
/* 1930 */ 0xB0, 0x98, 0x26, 0x48, 0x0D, 0xF3, 0xDA, 0x96, 0xB4, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °.&H.óÚ.´6......
/* 1940 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x17, 0x21, 0xAA, 0x15, 0x79, 0x8F, 0xA8, 0x49, // .........!ª.y.¨I
/* 1950 */ 0x83, 0x17, 0x75, 0x30, 0x26, 0xD6, 0xA0, 0x54, 0xDF, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..u0&Ö.Tß6......
/* 1960 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x0E, 0xD6, 0xBF, 0xCF, 0x5F, 0x0B, 0x7D, 0x42, // .........Ö¿Ï_.}B
/* 1970 */ 0x91, 0x7C, 0xA4, 0xDF, 0x42, 0xA8, 0x0E, 0x44, 0x03, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .|¤ßB¨.D.7......
/* 1980 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x81, 0xCC, 0x12, 0x70, 0x87, 0x88, 0xE9, 0x42, // .........Ì.p..éB
/* 1990 */ 0xB1, 0x7D, 0x4E, 0x5E, 0x42, 0x76, 0x0F, 0x0D, 0x27, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ±}N^Bv..'7......
/* 19A0 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0xB6, 0x7E, 0x9C, 0xDE, 0x85, 0x5A, 0x0D, 0x42, // ........¶~.Þ.Z.B
/* 19B0 */ 0x97, 0x03, 0xFF, 0xF1, 0x1B, 0xDD, 0x4D, 0x43, 0x50, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..ÿñ.ÝMCP7......
/* 19C0 */ 0x02, 0x1A, 0x05, 0x05, 0x00, 0x01, 0x00, 0x00, 0x0C, 0xFC, 0xC0, 0x67, 0xBA, 0xDE, 0x1B, 0x40, // .........üÀgºÞ.@
/* 19D0 */ 0xBF, 0x8B, 0x9C, 0x8A, 0xD8, 0x39, 0x58, 0x04, 0x6F, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿...Ø9X.o7......
/* 19E0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x36, 0x5D, 0xE6, 0xC3, 0x1F, 0x14, 0x2F, 0x4D, // ........6]æÃ../M
/* 19F0 */ 0xA3, 0x03, 0xA8, 0x42, 0xEE, 0x75, 0x6A, 0x29, 0x82, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // £.¨Bîuj).7......
/* 1A00 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xCB, 0xBC, 0xAA, 0x9C, 0xB1, 0x61, 0x4B, 0x4B, // ........˼ª.±aKK
/* 1A10 */ 0x8B, 0xEC, 0xD1, 0x0A, 0x3C, 0x3A, 0xC2, 0xCE, 0x94, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ìÑ.<:ÂÎ.7......
/* 1A20 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x6E, 0xEA, 0x14, 0xE9, 0xFA, 0xA5, 0x39, 0x44, // ........nê.éú¥9D
/* 1A30 */ 0xA3, 0x94, 0xA9, 0xBB, 0x32, 0x93, 0xCA, 0x09, 0xA6, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // £.©»2.Ê.¦7......
/* 1A40 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x59, 0xCE, 0xCA, 0xD8, 0xD2, 0x33, 0xC7, 0x4A, // ........YÎÊØÒ3ÇJ
/* 1A50 */ 0x9B, 0x1B, 0x9B, 0x72, 0x33, 0x9C, 0x51, 0xC8, 0xBA, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...r3.QȺ7......
/* 1A60 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x65, 0x92, 0x9D, 0xEC, 0x1E, 0x9D, 0xD0, 0x4E, // ........e..ì..ÐN
/* 1A70 */ 0x83, 0x8A, 0xCD, 0xC2, 0x0F, 0x25, 0x51, 0xA1, 0xCE, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..ÍÂ.%Q¡Î7......
/* 1A80 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xBA, 0x1B, 0x0B, 0xD7, 0x93, 0xB8, 0x44, 0x45, // ........º..×.¸DE
/* 1A90 */ 0x96, 0xE2, 0xB7, 0xA3, 0x18, 0x09, 0x1C, 0x33, 0xE2, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .â·£...3â7......
/* 1AA0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x6F, 0x59, 0x50, 0xD4, 0x4D, 0x89, 0xE0, 0x49, // ........oYPÔM.àI
/* 1AB0 */ 0x96, 0x6A, 0xFD, 0x39, 0xED, 0x4C, 0x4C, 0x64, 0xF9, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .jý9íLLdù7......
/* 1AC0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x97, 0x41, 0x41, 0x4F, 0xC2, 0x0F, 0x01, 0x4C, // .........AAOÂ..L
/* 1AD0 */ 0xB6, 0x8A, 0x86, 0xCB, 0xB9, 0xAC, 0x25, 0x4C, 0x17, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¶..˹¬%L.8......
/* 1AE0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x10, 0x81, 0x9B, 0x82, 0x6F, 0x0E, 0x49, 0x43, // ............o.IC
/* 1AF0 */ 0xBC, 0xA4, 0x42, 0x80, 0x35, 0x77, 0x78, 0x8D, 0x2F, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¼¤B.5wx./8......
/* 1B00 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xBC, 0xDA, 0x7D, 0xDA, 0xBE, 0x3F, 0x47, 0x44, // ........¼Ú}Ú¾?GD
/* 1B10 */ 0x9E, 0x01, 0x6A, 0xB7, 0x44, 0x0B, 0x4C, 0xD4, 0x4B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..j·D.LÔK8......
/* 1B20 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x45, 0xCA, 0xBA, 0xCB, 0x6A, 0x55, 0x16, 0x44, // ........EʺËjU.D
/* 1B30 */ 0xAD, 0x03, 0xBD, 0xA5, 0x98, 0xEA, 0xA7, 0xC8, 0x68, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ­.½¥.ê§Èh8......
/* 1B40 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xCB, 0x06, 0x1A, 0x04, 0xB8, 0xC5, 0x72, 0x47, // ........Ë...¸ÅrG
/* 1B50 */ 0x80, 0x9F, 0x41, 0x6D, 0x03, 0xD1, 0x66, 0x54, 0x89, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..Am.ÑfT.8......
/* 1B60 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xE1, 0x4E, 0xE0, 0x83, 0x8D, 0xFA, 0x6D, 0x43, // ........áNà..úmC
/* 1B70 */ 0x89, 0x94, 0xD3, 0x1A, 0x86, 0x2C, 0xAB, 0x77, 0x9F, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..Ó..,«w.8......
/* 1B80 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x3D, 0xA2, 0xDF, 0xDE, 0xD1, 0x6E, 0xA6, 0x45, // ........=¢ßÞÑn¦E
/* 1B90 */ 0x85, 0xDC, 0x63, 0xCA, 0xE0, 0x54, 0x6D, 0xE6, 0xBE, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÜcÊàTmæ¾8......
/* 1BA0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xC1, 0x01, 0xF3, 0x6B, 0x4A, 0xB9, 0xE9, 0x43, // ........Á.ókJ¹éC
/* 1BB0 */ 0xBA, 0x31, 0xD4, 0x94, 0x59, 0x8C, 0x47, 0xFB, 0xD3, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // º1Ô.Y.GûÓ8......
/* 1BC0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xE3, 0xAB, 0x34, 0xB2, 0x57, 0x08, 0x9C, 0x4F, // ........ã«4²W..O
/* 1BD0 */ 0xB0, 0x5A, 0x4D, 0xC3, 0x14, 0xF8, 0x55, 0x57, 0xE9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °ZMÃ.øUWé8......
/* 1BE0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x21, 0x78, 0x2A, 0xAA, 0x27, 0x18, 0x2C, 0x4C, // ........!x*ª'.,L
/* 1BF0 */ 0x8F, 0x1D, 0x45, 0x13, 0xA3, 0x4D, 0xDA, 0x97, 0x03, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..E.£MÚ..9......
/* 1C00 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x20, 0xE6, 0x1F, 0x36, 0xF4, 0x64, 0xB5, 0x41, // ........ æ.6ôdµA
/* 1C10 */ 0xBA, 0x77, 0x84, 0xF8, 0xE0, 0x79, 0xB1, 0xF7, 0x1E, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ºw.øày±÷.9......
/* 1C20 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xDF, 0xBA, 0x11, 0xBB, 0xAA, 0xD8, 0x0E, 0x47, // ........ߺ.»ªØ.G
/* 1C30 */ 0x93, 0x11, 0x20, 0xEA, 0xF8, 0x0F, 0xE5, 0xCC, 0x3D, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .. êø.åÌ=9......
/* 1C40 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x85, 0x88, 0xC8, 0x0B, 0x8C, 0x71, 0x1D, 0x49, // ..........È..q.I
/* 1C50 */ 0x92, 0x1F, 0x6F, 0x21, 0x43, 0x49, 0xE7, 0x9C, 0x4E, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..o!CIç.N9......
/* 1C60 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x0C, 0x4D, 0x7C, 0xFC, 0x85, 0x2E, 0xB9, 0x4B, // .........M|ü..¹K
/* 1C70 */ 0xAF, 0xD4, 0x01, 0xED, 0x14, 0x76, 0xB5, 0xE9, 0x78, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¯Ô.í.vµéx9......
/* 1C80 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0x19, 0x66, 0x0F, 0x50, 0x93, 0xEF, 0x75, 0x4B, // .........f.P.ïuK
/* 1C90 */ 0xBC, 0xB4, 0x82, 0x81, 0x99, 0x98, 0xA3, 0xCA, 0x9C, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¼´....£Ê.9......
/* 1CA0 */ 0x02, 0x1B, 0x06, 0x05, 0x00, 0x00, 0x03, 0x00, 0xEB, 0xCE, 0x9B, 0x9E, 0x36, 0xE7, 0x26, 0x4F, // ........ëÎ..6ç&O
/* 1CB0 */ 0x88, 0xDE, 0x76, 0x3F, 0x87, 0xDC, 0xC4, 0x85, 0xBE, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Þv?.ÜÄ.¾9......
/* 1CC0 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0xE9, 0x54, 0x78, 0x23, 0xFC, 0x79, 0x97, 0x44, // ........éTx#üy.D
/* 1CD0 */ 0xA0, 0xC1, 0xA7, 0x09, 0x69, 0x69, 0x1C, 0x6B, 0xD1, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Á§.ii.kÑ9......
/* 1CE0 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x01, 0xA3, 0xF8, 0xC8, 0xF5, 0x19, 0x32, 0x41, // .........£øÈõ.2A
/* 1CF0 */ 0x96, 0xCE, 0x2D, 0xE9, 0xD4, 0xAD, 0xBD, 0x33, 0xE3, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .Î-éÔ­½3ã9......
/* 1D00 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x61, 0xFD, 0x31, 0x31, 0x4F, 0x5E, 0x08, 0x43, // ........aý11O^.C
/* 1D10 */ 0x8D, 0x6D, 0x62, 0xBE, 0x19, 0x87, 0xC9, 0x2C, 0xF7, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .mb¾..É,÷9......
/* 1D20 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x5F, 0x8B, 0xDD, 0x85, 0xA4, 0xEA, 0xF3, 0x4A, // ........_.Ý.¤êóJ
/* 1D30 */ 0xA6, 0x28, 0xCC, 0xE9, 0xE7, 0x7C, 0x9A, 0x03, 0x0E, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¦(Ìéç|...:......
/* 1D40 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x3F, 0xBF, 0xA2, 0x2C, 0x9E, 0x94, 0x6A, 0x44, // ........?¿¢,..jD
/* 1D50 */ 0x82, 0xC7, 0xE2, 0x5A, 0x15, 0xEC, 0x78, 0xC4, 0x2C, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ÇâZ.ìxÄ,:......
/* 1D60 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0xE3, 0xF0, 0x77, 0x17, 0x92, 0x73, 0x98, 0x41, // ........ãðw..s.A
/* 1D70 */ 0x97, 0xEA, 0x8A, 0xE4, 0xDE, 0x6F, 0x63, 0x81, 0x44, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .ê.äÞoc.D:......
/* 1D80 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0xCA, 0x4C, 0x3E, 0x9D, 0x72, 0xE1, 0xF1, 0x46, // ........ÊL>.ráñF
/* 1D90 */ 0xA2, 0xF4, 0x1D, 0x21, 0x07, 0x05, 0x14, 0x44, 0x61, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¢ô.!...Da:......
/* 1DA0 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x6E, 0x6C, 0x4C, 0x73, 0xBA, 0xB0, 0x98, 0x42, // ........nlLsº°.B
/* 1DB0 */ 0xA8, 0x91, 0x67, 0x17, 0x72, 0xB2, 0xBD, 0x1B, 0x77, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¨.g.r²½.w:......
/* 1DC0 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x4B, 0xA7, 0x12, 0x69, 0xFB, 0xA5, 0x1A, 0x40, // ........K§.iû¥.@
/* 1DD0 */ 0xBF, 0xDB, 0x2E, 0x3A, 0xB4, 0x6F, 0x4B, 0x02, 0x96, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¿Û.:´oK..:......
/* 1DE0 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0x8F, 0xF0, 0x5C, 0x5B, 0x1A, 0xB8, 0x1D, 0x43, // .........ð\[.¸.C
/* 1DF0 */ 0xB0, 0x80, 0x34, 0x50, 0xD8, 0x62, 0x05, 0x65, 0xAB, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // °.4PØb.e«:......
/* 1E00 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0xF3, 0x7D, 0x6D, 0xE0, 0xD0, 0xAA, 0x9D, 0x41, // ........ó}màЪ.A
/* 1E10 */ 0x8D, 0xFB, 0x0A, 0xC3, 0x7E, 0x2B, 0xDF, 0x39, 0xC1, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .û.Ã~+ß9Á:......
/* 1E20 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0xFE, 0x34, 0x98, 0x05, 0xEA, 0xA8, 0xFF, 0x4B, // ........þ4..ê¨ÿK
/* 1E30 */ 0xB6, 0x7B, 0x4D, 0x00, 0x6B, 0x54, 0x47, 0xD3, 0xDC, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ¶{M.kTGÓÜ:......
/* 1E40 */ 0x02, 0x1C, 0x06, 0x05, 0x00, 0x00, 0x05, 0x00, 0xD4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........Ô ......
/* 1E50 */ 0x00, 0xB5, 0xB2, 0x5B, 0x00, 0x00, 0x00, 0x00, 0x63, 0x45, 0x00, 0x00, 0x1C, 0x0E, 0x00, 0x00, // .µ²[....cE......
/* 1E60 */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ò ......
/* 1E70 */ 0x80, 0xE2, 0x9F, 0x57, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x00, 0x00, 0x1C, 0x0E, 0x00, 0x00, // .â.W....98......
/* 1E80 */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........!......
/* 1E90 */ 0x00, 0x7A, 0x60, 0x52, 0x00, 0x00, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x01, 0x19, 0x00, 0x00, // .z`R.....%......
/* 1EA0 */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........-!......
/* 1EB0 */ 0x80, 0xD2, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x23, 0x00, 0x00, 0x32, 0x15, 0x00, 0x00, // .Ò.P....ð#..2...
/* 1EC0 */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........E!......
/* 1ED0 */ 0x80, 0xFC, 0x62, 0x4D, 0x00, 0x00, 0x00, 0x00, 0xB1, 0x1D, 0x00, 0x00, 0x01, 0xD7, 0x00, 0x00, // .übM....±....×..
/* 1EE0 */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........d!......
/* 1EF0 */ 0x00, 0x31, 0x1B, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x72, 0x17, 0x00, 0x00, 0x01, 0xD7, 0x00, 0x00, // .1.J....r....×..
/* 1F00 */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x33, 0x36, 0x31, 0x32, 0x2D, 0x30, 0x30, // ........03612-00
/* 1F10 */ 0x32, 0x30, 0x36, 0x2D, 0x35, 0x35, 0x36, 0x2D, 0x31, 0x32, 0x33, 0x37, 0x32, 0x37, 0x2D, 0x30, // 206-556-123727-0
/* 1F20 */ 0x33, 0x2D, 0x31, 0x30, 0x33, 0x33, 0x2D, 0x31, 0x37, 0x37, 0x36, 0x33, 0x2E, 0x30, 0x30, 0x30, // 3-1033-17763.000
/* 1F30 */ 0x30, 0x2D, 0x32, 0x39, 0x37, 0x32, 0x30, 0x31, 0x38, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // 0-2972018.Window
/* 1F40 */ 0x73, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, // s.Windows Server
/* 1F50 */ 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x30, 0x33, 0x36, 0x31, 0x32, 0x2D, 0x30, 0x30, 0x30, 0x39, // 2019.03612-0009
/* 1F60 */ 0x36, 0x2D, 0x31, 0x39, 0x39, 0x2D, 0x37, 0x39, 0x39, 0x31, 0x38, 0x38, 0x2D, 0x30, 0x33, 0x2D, // 6-199-799188-03-
/* 1F70 */ 0x31, 0x30, 0x33, 0x33, 0x2D, 0x31, 0x37, 0x37, 0x36, 0x33, 0x2E, 0x30, 0x30, 0x30, 0x30, 0x2D, // 1033-17763.0000-
/* 1F80 */ 0x32, 0x39, 0x37, 0x32, 0x30, 0x31, 0x38, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x32, 0x30, // 2972018.Office20
/* 1F90 */ 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x30, // 10.Office 2010.0
/* 1FA0 */ 0x33, 0x36, 0x31, 0x32, 0x2D, 0x30, 0x30, 0x32, 0x30, 0x36, 0x2D, 0x32, 0x34, 0x30, 0x2D, 0x37, // 3612-00206-240-7
/* 1FB0 */ 0x31, 0x39, 0x36, 0x33, 0x39, 0x2D, 0x30, 0x33, 0x2D, 0x31, 0x30, 0x33, 0x33, 0x2D, 0x31, 0x37, // 19639-03-1033-17
/* 1FC0 */ 0x37, 0x36, 0x33, 0x2E, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x32, 0x39, 0x37, 0x32, 0x30, 0x31, 0x38, // 763.0000-2972018
/* 1FD0 */ 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, // .Office2013.Offi
/* 1FE0 */ 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x30, 0x33, 0x36, 0x31, 0x32, 0x2D, 0x30, 0x30, // ce 2013.03612-00
/* 1FF0 */ 0x32, 0x30, 0x36, 0x2D, 0x34, 0x33, 0x38, 0x2D, 0x30, 0x30, 0x34, 0x35, 0x33, 0x32, 0x2D, 0x30, // 206-438-004532-0
/* 2000 */ 0x33, 0x2D, 0x31, 0x30, 0x33, 0x33, 0x2D, 0x31, 0x37, 0x37, 0x36, 0x33, 0x2E, 0x30, 0x30, 0x30, // 3-1033-17763.000
/* 2010 */ 0x30, 0x2D, 0x32, 0x39, 0x37, 0x32, 0x30, 0x31, 0x38, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, // 0-2972018.Office
/* 2020 */ 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x36, // 2016.Office 2016
/* 2030 */ 0x00, 0x30, 0x33, 0x36, 0x31, 0x32, 0x2D, 0x30, 0x33, 0x38, 0x35, 0x38, 0x2D, 0x30, 0x35, 0x33, // .03612-03858-053
/* 2040 */ 0x2D, 0x30, 0x38, 0x39, 0x35, 0x31, 0x36, 0x2D, 0x30, 0x33, 0x2D, 0x31, 0x30, 0x33, 0x33, 0x2D, // -089516-03-1033-
/* 2050 */ 0x31, 0x37, 0x37, 0x36, 0x33, 0x2E, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x32, 0x39, 0x37, 0x32, 0x30, // 17763.0000-29720
/* 2060 */ 0x31, 0x38, 0x00, 0x57, 0x69, 0x6E, 0x43, 0x68, 0x69, 0x6E, 0x61, 0x47, 0x6F, 0x76, 0x00, 0x57, // 18.WinChinaGov.W
/* 2070 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x43, 0x68, 0x69, 0x6E, 0x61, 0x20, // indows 10 China
/* 2080 */ 0x47, 0x6F, 0x76, 0x65, 0x72, 0x6E, 0x6D, 0x65, 0x6E, 0x74, 0x00, 0x30, 0x33, 0x36, 0x31, 0x32, // Government.03612
/* 2090 */ 0x2D, 0x30, 0x30, 0x32, 0x30, 0x36, 0x2D, 0x36, 0x38, 0x34, 0x2D, 0x31, 0x33, 0x37, 0x36, 0x36, // -00206-684-13766
/* 20A0 */ 0x39, 0x2D, 0x30, 0x33, 0x2D, 0x31, 0x30, 0x33, 0x33, 0x2D, 0x31, 0x37, 0x37, 0x36, 0x33, 0x2E, // 9-03-1033-17763.
/* 20B0 */ 0x30, 0x30, 0x30, 0x30, 0x2D, 0x32, 0x39, 0x37, 0x32, 0x30, 0x31, 0x38, 0x00, 0x4F, 0x66, 0x66, // 0000-2972018.Off
/* 20C0 */ 0x69, 0x63, 0x65, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, // ice2019.Office 2
/* 20D0 */ 0x30, 0x31, 0x39, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x31, // 019.Windows 10 1
/* 20E0 */ 0x38, 0x30, 0x39, 0x20, 0x2F, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, // 809 / Server 201
/* 20F0 */ 0x39, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x31, 0x36, 0x30, // 9.Windows 10 160
/* 2100 */ 0x37, 0x20, 0x2F, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, // 7 / Server 2016.
/* 2110 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x2F, 0x20, 0x53, 0x65, // Windows 8.1 / Se
/* 2120 */ 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, 0x52, 0x32, 0x00, 0x57, 0x69, 0x6E, // rver 2012 R2.Win
/* 2130 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x20, 0x2F, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, // dows 8 / Server
/* 2140 */ 0x32, 0x30, 0x31, 0x32, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x20, 0x2F, // 2012.Windows 7 /
/* 2150 */ 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x52, 0x32, 0x20, // Server 2008 R2
/* 2160 */ 0x53, 0x50, 0x31, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x56, 0x69, 0x73, 0x74, // SP1.Windows Vist
/* 2170 */ 0x61, 0x20, 0x2F, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, // a / Server 2008
/* 2180 */ 0x53, 0x50, 0x32, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x00, 0x4F, 0x66, 0x66, 0x69, // SP2.Windows.Offi
/* 2190 */ 0x63, 0x65, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x32, 0x30, 0x31, // ce2010.Office201
/* 21A0 */ 0x33, 0x2B, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, // 3+.Windows Serve
/* 21B0 */ 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, // r 2019.Windows 1
/* 21C0 */ 0x30, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x28, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x29, 0x00, // 0 2019 (Volume).
/* 21D0 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x55, 0x6E, 0x6B, 0x6E, 0x6F, // Windows 10 Unkno
/* 21E0 */ 0x77, 0x6E, 0x20, 0x28, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, // wn (Volume).Wind
/* 21F0 */ 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x43, 0x68, 0x69, 0x6E, 0x61, 0x20, 0x47, 0x6F, 0x76, // ows 10 China Gov
/* 2200 */ 0x65, 0x72, 0x6E, 0x6D, 0x65, 0x6E, 0x74, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // ernment.Windows
/* 2210 */ 0x31, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x28, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x29, // 10 2016 (Volume)
/* 2220 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x28, 0x52, 0x65, 0x74, // .Windows 10 (Ret
/* 2230 */ 0x61, 0x69, 0x6C, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, // ail).Windows 10
/* 2240 */ 0x32, 0x30, 0x31, 0x35, 0x20, 0x28, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x29, 0x00, 0x57, 0x69, // 2015 (Volume).Wi
/* 2250 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // ndows 7.Windows
/* 2260 */ 0x38, 0x20, 0x28, 0x52, 0x65, 0x74, 0x61, 0x69, 0x6C, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // 8 (Retail).Windo
/* 2270 */ 0x77, 0x73, 0x20, 0x38, 0x20, 0x28, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x29, 0x00, 0x57, 0x69, // ws 8 (Volume).Wi
/* 2280 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x28, 0x52, 0x65, 0x74, 0x61, 0x69, // ndows 8.1 (Retai
/* 2290 */ 0x6C, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x28, // l).Windows 8.1 (
/* 22A0 */ 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // Volume).Windows
/* 22B0 */ 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // Preview.Windows
/* 22C0 */ 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x41, 0x20, 0x28, 0x57, // Server 2008 A (W
/* 22D0 */ 0x65, 0x62, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x48, 0x50, 0x43, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, // eb and HPC).Wind
/* 22E0 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, // ows Server 2008
/* 22F0 */ 0x42, 0x20, 0x28, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x61, 0x6E, 0x64, 0x20, // B (Standard and
/* 2300 */ 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, // Enterprise).Wind
/* 2310 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, // ows Server 2008
/* 2320 */ 0x43, 0x20, 0x28, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x29, 0x00, 0x57, // C (Datacenter).W
/* 2330 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, // indows Server 20
/* 2340 */ 0x30, 0x38, 0x20, 0x52, 0x32, 0x20, 0x41, 0x20, 0x28, 0x57, 0x65, 0x62, 0x20, 0x61, 0x6E, 0x64, // 08 R2 A (Web and
/* 2350 */ 0x20, 0x48, 0x50, 0x43, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, // HPC).Windows Se
/* 2360 */ 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x52, 0x32, 0x20, 0x42, 0x20, 0x28, // rver 2008 R2 B (
/* 2370 */ 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x45, 0x6E, 0x74, // Standard and Ent
/* 2380 */ 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // erprise).Windows
/* 2390 */ 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x52, 0x32, 0x20, // Server 2008 R2
/* 23A0 */ 0x43, 0x20, 0x28, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x29, 0x00, 0x57, // C (Datacenter).W
/* 23B0 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, // indows Server 20
/* 23C0 */ 0x31, 0x32, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, // 12.Windows Serve
/* 23D0 */ 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, 0x52, 0x32, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // r 2012 R2.Window
/* 23E0 */ 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x57, 0x69, // s Server 2016.Wi
/* 23F0 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x50, 0x72, 0x65, // ndows Server Pre
/* 2400 */ 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x56, 0x69, 0x73, // view.Windows Vis
/* 2410 */ 0x74, 0x61, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, // ta.Office 2010.O
/* 2420 */ 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, // ffice 2013.Offic
/* 2430 */ 0x65, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, // e 2013 (Pre-Rele
/* 2440 */ 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x36, // ase).Office 2016
/* 2450 */ 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x57, 0x69, 0x6E, // .Office 2019.Win
/* 2460 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, // dows Server 2019
/* 2470 */ 0x20, 0x41, 0x52, 0x4D, 0x36, 0x34, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, // ARM64.Windows S
/* 2480 */ 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x41, 0x7A, 0x75, 0x72, 0x65, // erver 2019 Azure
/* 2490 */ 0x20, 0x43, 0x6F, 0x72, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, // Core.Windows Se
/* 24A0 */ 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, // rver 2019 Datace
/* 24B0 */ 0x6E, 0x74, 0x65, 0x72, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, // nter.Windows Ser
/* 24C0 */ 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x45, 0x73, 0x73, 0x65, 0x6E, 0x74, 0x69, // ver 2019 Essenti
/* 24D0 */ 0x61, 0x6C, 0x73, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, // als.Windows Serv
/* 24E0 */ 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, // er 2019 Standard
/* 24F0 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, // .Windows Server
/* 2500 */ 0x32, 0x30, 0x31, 0x39, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x20, // 2019 Datacenter
/* 2510 */ 0x28, 0x53, 0x65, 0x6D, 0x69, 0x2D, 0x41, 0x6E, 0x6E, 0x75, 0x61, 0x6C, 0x20, 0x43, 0x68, 0x61, // (Semi-Annual Cha
/* 2520 */ 0x6E, 0x6E, 0x65, 0x6C, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, // nnel).Windows Se
/* 2530 */ 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, // rver 2019 Standa
/* 2540 */ 0x72, 0x64, 0x20, 0x28, 0x53, 0x65, 0x6D, 0x69, 0x2D, 0x41, 0x6E, 0x6E, 0x75, 0x61, 0x6C, 0x20, // rd (Semi-Annual
/* 2550 */ 0x43, 0x68, 0x61, 0x6E, 0x6E, 0x65, 0x6C, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // Channel).Windows
/* 2560 */ 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4C, // 10 Enterprise L
/* 2570 */ 0x54, 0x53, 0x43, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // TSC 2019.Windows
/* 2580 */ 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4C, // 10 Enterprise L
/* 2590 */ 0x54, 0x53, 0x43, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // TSC 2019 N.Windo
/* 25A0 */ 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, // ws 10 Enterprise
/* 25B0 */ 0x20, 0x47, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, // G.Windows 10 En
/* 25C0 */ 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x47, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, // terprise GN.Wind
/* 25D0 */ 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, // ows 10 Enterpris
/* 25E0 */ 0x65, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x4C, 0x54, 0x53, 0x42, 0x00, 0x57, 0x69, 0x6E, 0x64, // e 2016 LTSB.Wind
/* 25F0 */ 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, // ows 10 Enterpris
/* 2600 */ 0x65, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x4C, 0x54, 0x53, 0x42, 0x20, 0x4E, 0x00, 0x57, 0x69, // e 2016 LTSB N.Wi
/* 2610 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x48, 0x6F, 0x6D, 0x65, 0x00, 0x57, 0x69, // ndows 10 Home.Wi
/* 2620 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x48, 0x6F, 0x6D, 0x65, 0x20, 0x43, 0x6F, // ndows 10 Home Co
/* 2630 */ 0x75, 0x6E, 0x74, 0x72, 0x79, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x00, 0x57, // untry Specific.W
/* 2640 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x48, 0x6F, 0x6D, 0x65, 0x20, 0x4E, // indows 10 Home N
/* 2650 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x48, 0x6F, 0x6D, 0x65, // .Windows 10 Home
/* 2660 */ 0x20, 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x4C, 0x61, 0x6E, 0x67, 0x75, 0x61, 0x67, 0x65, // Single Language
/* 2670 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x64, 0x75, 0x63, // .Windows 10 Educ
/* 2680 */ 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, // ation.Windows 10
/* 2690 */ 0x20, 0x45, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, // Education N.Win
/* 26A0 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, // dows 10 Enterpri
/* 26B0 */ 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, // se.Windows 10 En
/* 26C0 */ 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x32, 0x30, 0x31, 0x35, 0x20, 0x4C, 0x54, // terprise 2015 LT
/* 26D0 */ 0x53, 0x42, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, // SB.Windows 10 En
/* 26E0 */ 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x32, 0x30, 0x31, 0x35, 0x20, 0x4C, 0x54, // terprise 2015 LT
/* 26F0 */ 0x53, 0x42, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, // SB N.Windows 10
/* 2700 */ 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, // Enterprise N.Win
/* 2710 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, // dows 10 Professi
/* 2720 */ 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x57, 0x6F, 0x72, 0x6B, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, // onal Workstation
/* 2730 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, // .Windows 10 Prof
/* 2740 */ 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x57, 0x6F, 0x72, 0x6B, 0x73, 0x74, 0x61, // essional Worksta
/* 2750 */ 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, // tion N.Windows 1
/* 2760 */ 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x00, 0x57, // 0 Professional.W
/* 2770 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, // indows 10 Profes
/* 2780 */ 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x45, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, // sional Education
/* 2790 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, // .Windows 10 Prof
/* 27A0 */ 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x45, 0x64, 0x75, 0x63, 0x61, 0x74, 0x69, // essional Educati
/* 27B0 */ 0x6F, 0x6E, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, // on N.Windows 10
/* 27C0 */ 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x4E, 0x00, 0x57, // Professional N.W
/* 27D0 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, // indows 10 Profes
/* 27E0 */ 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, // sional Preview.W
/* 27F0 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, // indows 10 Enterp
/* 2800 */ 0x72, 0x69, 0x73, 0x65, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, // rise Preview.Win
/* 2810 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, // dows 10 Enterpri
/* 2820 */ 0x73, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6C, 0x20, 0x44, // se for Virtual D
/* 2830 */ 0x65, 0x73, 0x6B, 0x74, 0x6F, 0x70, 0x73, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // esktops.Windows
/* 2840 */ 0x31, 0x30, 0x20, 0x52, 0x65, 0x6D, 0x6F, 0x74, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, // 10 Remote Server
/* 2850 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x53, 0x20, 0x28, 0x4C, // .Windows 10 S (L
/* 2860 */ 0x65, 0x61, 0x6E, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x20, 0x45, // ean).Windows 7 E
/* 2870 */ 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // nterprise.Window
/* 2880 */ 0x73, 0x20, 0x37, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x45, // s 7 Enterprise E
/* 2890 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, // .Windows 7 Enter
/* 28A0 */ 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // prise N.Windows
/* 28B0 */ 0x37, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x00, 0x57, // 7 Professional.W
/* 28C0 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, // indows 7 Profess
/* 28D0 */ 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x45, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // ional E.Windows
/* 28E0 */ 0x37, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x4E, // 7 Professional N
/* 28F0 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x20, 0x45, 0x6D, 0x62, 0x65, 0x64, // .Windows 7 Embed
/* 2900 */ 0x64, 0x65, 0x64, 0x20, 0x50, 0x4F, 0x53, 0x52, 0x65, 0x61, 0x64, 0x79, 0x00, 0x57, 0x69, 0x6E, // ded POSReady.Win
/* 2910 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x37, 0x20, 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, // dows 7 Embedded
/* 2920 */ 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // Standard.Windows
/* 2930 */ 0x20, 0x37, 0x20, 0x54, 0x68, 0x69, 0x6E, 0x50, 0x43, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // 7 ThinPC.Window
/* 2940 */ 0x73, 0x20, 0x38, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // s 8 Core.Windows
/* 2950 */ 0x20, 0x38, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x72, 0x79, 0x20, // 8 Core Country
/* 2960 */ 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // Specific.Windows
/* 2970 */ 0x20, 0x38, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // 8 Core N.Window
/* 2980 */ 0x73, 0x20, 0x38, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, // s 8 Core Single
/* 2990 */ 0x4C, 0x61, 0x6E, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // Language.Windows
/* 29A0 */ 0x20, 0x38, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, // 8 Professional
/* 29B0 */ 0x57, 0x4D, 0x43, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x20, 0x45, 0x6D, // WMC.Windows 8 Em
/* 29C0 */ 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x49, 0x6E, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x20, // bedded Industry
/* 29D0 */ 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x00, 0x57, 0x69, 0x6E, // Professional.Win
/* 29E0 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x20, 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, // dows 8 Embedded
/* 29F0 */ 0x49, 0x6E, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, // Industry Enterpr
/* 2A00 */ 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x20, 0x45, 0x6E, // ise.Windows 8 En
/* 2A10 */ 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, // terprise.Windows
/* 2A20 */ 0x20, 0x38, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4E, 0x00, // 8 Enterprise N.
/* 2A30 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, // Windows 8 Profes
/* 2A40 */ 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, // sional.Windows 8
/* 2A50 */ 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x4E, 0x00, // Professional N.
/* 2A60 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, 0x65, // Windows 8.1 Core
/* 2A70 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, // .Windows 8.1 Cor
/* 2A80 */ 0x65, 0x20, 0x41, 0x52, 0x4D, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, // e ARM.Windows 8.
/* 2A90 */ 0x31, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x72, 0x79, 0x20, 0x53, // 1 Core Country S
/* 2AA0 */ 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // pecific.Windows
/* 2AB0 */ 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // 8.1 Core N.Windo
/* 2AC0 */ 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x53, 0x69, 0x6E, 0x67, // ws 8.1 Core Sing
/* 2AD0 */ 0x6C, 0x65, 0x20, 0x4C, 0x61, 0x6E, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, // le Language.Wind
/* 2AE0 */ 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, // ows 8.1 Professi
/* 2AF0 */ 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6E, 0x74, 0x00, 0x57, 0x69, 0x6E, // onal Student.Win
/* 2B00 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, // dows 8.1 Profess
/* 2B10 */ 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x53, 0x74, 0x75, 0x64, 0x65, 0x6E, 0x74, 0x20, 0x4E, 0x00, // ional Student N.
/* 2B20 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x50, 0x72, 0x6F, 0x66, // Windows 8.1 Prof
/* 2B30 */ 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x57, 0x4D, 0x43, 0x00, 0x57, 0x69, 0x6E, // essional WMC.Win
/* 2B40 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x43, 0x6F, // dows 8.1 Core Co
/* 2B50 */ 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x65, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, // nnected.Windows
/* 2B60 */ 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x20, 0x43, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, // 8.1 Core Connect
/* 2B70 */ 0x65, 0x64, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x72, 0x79, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, // ed Country Speci
/* 2B80 */ 0x66, 0x69, 0x63, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, // fic.Windows 8.1
/* 2B90 */ 0x43, 0x6F, 0x72, 0x65, 0x20, 0x43, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x4E, // Core Connected N
/* 2BA0 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x43, 0x6F, 0x72, // .Windows 8.1 Cor
/* 2BB0 */ 0x65, 0x20, 0x43, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x53, 0x69, 0x6E, 0x67, // e Connected Sing
/* 2BC0 */ 0x6C, 0x65, 0x20, 0x4C, 0x61, 0x6E, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, // le Language.Wind
/* 2BD0 */ 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, // ows 8.1 Enterpri
/* 2BE0 */ 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x45, // se.Windows 8.1 E
/* 2BF0 */ 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, // nterprise N.Wind
/* 2C00 */ 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, // ows 8.1 Professi
/* 2C10 */ 0x6F, 0x6E, 0x61, 0x6C, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, // onal.Windows 8.1
/* 2C20 */ 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x4E, 0x00, // Professional N.
/* 2C30 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x45, 0x6D, 0x62, 0x65, // Windows 8.1 Embe
/* 2C40 */ 0x64, 0x64, 0x65, 0x64, 0x20, 0x49, 0x6E, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x20, 0x50, 0x72, // dded Industry Pr
/* 2C50 */ 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // ofessional.Windo
/* 2C60 */ 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, // ws 8.1 Embedded
/* 2C70 */ 0x49, 0x6E, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x20, 0x41, 0x75, 0x74, 0x6F, 0x6D, 0x6F, 0x74, // Industry Automot
/* 2C80 */ 0x69, 0x76, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x31, 0x20, // ive.Windows 8.1
/* 2C90 */ 0x45, 0x6D, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x49, 0x6E, 0x64, 0x75, 0x73, 0x74, 0x72, // Embedded Industr
/* 2CA0 */ 0x79, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, // y Enterprise.Win
/* 2CB0 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, // dows 10 Enterpri
/* 2CC0 */ 0x73, 0x65, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // se Preview.Windo
/* 2CD0 */ 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, // ws 10 Profession
/* 2CE0 */ 0x61, 0x6C, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // al Preview.Windo
/* 2CF0 */ 0x77, 0x73, 0x20, 0x31, 0x30, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, // ws 10 Profession
/* 2D00 */ 0x61, 0x6C, 0x20, 0x57, 0x4D, 0x43, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, // al WMC Preview.W
/* 2D10 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x78, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, // indows 8.x Previ
/* 2D20 */ 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x38, 0x2E, 0x78, 0x20, 0x50, // ew.Windows 8.x P
/* 2D30 */ 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x20, 0x41, 0x52, 0x4D, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // review ARM.Windo
/* 2D40 */ 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x57, // ws Server 2008 W
/* 2D50 */ 0x65, 0x62, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, // eb.Windows Serve
/* 2D60 */ 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x43, 0x6F, 0x6D, 0x70, 0x75, 0x74, 0x65, 0x20, 0x43, // r 2008 Compute C
/* 2D70 */ 0x6C, 0x75, 0x73, 0x74, 0x65, 0x72, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, // luster.Windows S
/* 2D80 */ 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, // erver 2008 Stand
/* 2D90 */ 0x61, 0x72, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, // ard.Windows Serv
/* 2DA0 */ 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, // er 2008 Standard
/* 2DB0 */ 0x20, 0x77, 0x69, 0x74, 0x68, 0x6F, 0x75, 0x74, 0x20, 0x48, 0x79, 0x70, 0x65, 0x72, 0x2D, 0x56, // without Hyper-V
/* 2DC0 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, // .Windows Server
/* 2DD0 */ 0x32, 0x30, 0x30, 0x38, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, // 2008 Enterprise.
/* 2DE0 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, // Windows Server 2
/* 2DF0 */ 0x30, 0x30, 0x38, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x77, // 008 Enterprise w
/* 2E00 */ 0x69, 0x74, 0x68, 0x6F, 0x75, 0x74, 0x20, 0x48, 0x79, 0x70, 0x65, 0x72, 0x2D, 0x56, 0x00, 0x57, // ithout Hyper-V.W
/* 2E10 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, // indows Server 20
/* 2E20 */ 0x30, 0x38, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x00, 0x57, 0x69, // 08 Datacenter.Wi
/* 2E30 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, // ndows Server 200
/* 2E40 */ 0x38, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74, // 8 Datacenter wit
/* 2E50 */ 0x68, 0x6F, 0x75, 0x74, 0x20, 0x48, 0x79, 0x70, 0x65, 0x72, 0x2D, 0x56, 0x00, 0x57, 0x69, 0x6E, // hout Hyper-V.Win
/* 2E60 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, // dows Server 2008
/* 2E70 */ 0x20, 0x66, 0x6F, 0x72, 0x20, 0x49, 0x74, 0x61, 0x6E, 0x69, 0x75, 0x6D, 0x00, 0x57, 0x69, 0x6E, // for Itanium.Win
/* 2E80 */ 0x64, 0x6F, 0x77, 0x73, 0x20, 0x4D, 0x75, 0x6C, 0x74, 0x69, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x20, // dows MultiPoint
/* 2E90 */ 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x57, 0x69, 0x6E, 0x64, // Server 2010.Wind
/* 2EA0 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, // ows Server 2008
/* 2EB0 */ 0x52, 0x32, 0x20, 0x57, 0x65, 0x62, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, // R2 Web.Windows S
/* 2EC0 */ 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x52, 0x32, 0x20, 0x48, 0x50, // erver 2008 R2 HP
/* 2ED0 */ 0x43, 0x20, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // C Edition.Window
/* 2EE0 */ 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x52, 0x32, // s Server 2008 R2
/* 2EF0 */ 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // Standard.Window
/* 2F00 */ 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x52, 0x32, // s Server 2008 R2
/* 2F10 */ 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, // Enterprise.Wind
/* 2F20 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, // ows Server 2008
/* 2F30 */ 0x52, 0x32, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x00, 0x57, 0x69, // R2 Datacenter.Wi
/* 2F40 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x30, // ndows Server 200
/* 2F50 */ 0x38, 0x20, 0x52, 0x32, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x49, 0x74, 0x61, 0x6E, 0x69, 0x75, 0x6D, // 8 R2 for Itanium
/* 2F60 */ 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, // Enterprise.Wind
/* 2F70 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, // ows Server 2012
/* 2F80 */ 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // Datacenter.Windo
/* 2F90 */ 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, 0x4D, // ws Server 2012 M
/* 2FA0 */ 0x75, 0x6C, 0x74, 0x69, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x20, 0x50, 0x72, 0x65, 0x6D, 0x69, 0x75, // ultiPoint Premiu
/* 2FB0 */ 0x6D, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, // m.Windows Server
/* 2FC0 */ 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, 0x4D, 0x75, 0x6C, 0x74, 0x69, 0x50, 0x6F, 0x69, 0x6E, 0x74, // 2012 MultiPoint
/* 2FD0 */ 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, // Standard.Window
/* 2FE0 */ 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, 0x53, 0x74, // s Server 2012 St
/* 2FF0 */ 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, // andard.Windows S
/* 3000 */ 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, 0x52, 0x32, 0x20, 0x43, 0x6C, // erver 2012 R2 Cl
/* 3010 */ 0x6F, 0x75, 0x64, 0x20, 0x53, 0x74, 0x6F, 0x72, 0x61, 0x67, 0x65, 0x00, 0x57, 0x69, 0x6E, 0x64, // oud Storage.Wind
/* 3020 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x32, 0x20, // ows Server 2012
/* 3030 */ 0x52, 0x32, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x00, 0x57, 0x69, // R2 Datacenter.Wi
/* 3040 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, // ndows Server 201
/* 3050 */ 0x32, 0x20, 0x52, 0x32, 0x20, 0x45, 0x73, 0x73, 0x65, 0x6E, 0x74, 0x69, 0x61, 0x6C, 0x73, 0x00, // 2 R2 Essentials.
/* 3060 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, // Windows Server 2
/* 3070 */ 0x30, 0x31, 0x32, 0x20, 0x52, 0x32, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x00, // 012 R2 Standard.
/* 3080 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, // Windows Server 2
/* 3090 */ 0x30, 0x31, 0x36, 0x20, 0x41, 0x7A, 0x75, 0x72, 0x65, 0x20, 0x43, 0x6F, 0x72, 0x65, 0x00, 0x57, // 016 Azure Core.W
/* 30A0 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, // indows Server 20
/* 30B0 */ 0x31, 0x36, 0x20, 0x43, 0x6C, 0x6F, 0x75, 0x64, 0x20, 0x53, 0x74, 0x6F, 0x72, 0x61, 0x67, 0x65, // 16 Cloud Storage
/* 30C0 */ 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, // .Windows Server
/* 30D0 */ 0x32, 0x30, 0x31, 0x36, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x00, // 2016 Datacenter.
/* 30E0 */ 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, // Windows Server 2
/* 30F0 */ 0x30, 0x31, 0x36, 0x20, 0x45, 0x73, 0x73, 0x65, 0x6E, 0x74, 0x69, 0x61, 0x6C, 0x73, 0x00, 0x57, // 016 Essentials.W
/* 3100 */ 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, // indows Server 20
/* 3110 */ 0x31, 0x36, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x00, 0x57, 0x69, 0x6E, 0x64, // 16 Standard.Wind
/* 3120 */ 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, // ows Server 2016
/* 3130 */ 0x41, 0x52, 0x4D, 0x36, 0x34, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, // ARM64.Windows Se
/* 3140 */ 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, // rver 2016 Datace
/* 3150 */ 0x6E, 0x74, 0x65, 0x72, 0x20, 0x28, 0x53, 0x65, 0x6D, 0x69, 0x2D, 0x41, 0x6E, 0x6E, 0x75, 0x61, // nter (Semi-Annua
/* 3160 */ 0x6C, 0x20, 0x43, 0x68, 0x61, 0x6E, 0x6E, 0x65, 0x6C, 0x29, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, // l Channel).Windo
/* 3170 */ 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x53, // ws Server 2016 S
/* 3180 */ 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x28, 0x53, 0x65, 0x6D, 0x69, 0x2D, 0x41, 0x6E, // tandard (Semi-An
/* 3190 */ 0x6E, 0x75, 0x61, 0x6C, 0x20, 0x43, 0x68, 0x61, 0x6E, 0x6E, 0x65, 0x6C, 0x29, 0x00, 0x57, 0x69, // nual Channel).Wi
/* 31A0 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, // ndows Server 201
/* 31B0 */ 0x36, 0x20, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6E, 0x74, 0x65, 0x72, 0x20, 0x50, 0x72, 0x65, // 6 Datacenter Pre
/* 31C0 */ 0x76, 0x69, 0x65, 0x77, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x56, 0x69, 0x73, // view.Windows Vis
/* 31D0 */ 0x74, 0x61, 0x20, 0x42, 0x75, 0x73, 0x69, 0x6E, 0x65, 0x73, 0x73, 0x00, 0x57, 0x69, 0x6E, 0x64, // ta Business.Wind
/* 31E0 */ 0x6F, 0x77, 0x73, 0x20, 0x56, 0x69, 0x73, 0x74, 0x61, 0x20, 0x42, 0x75, 0x73, 0x69, 0x6E, 0x65, // ows Vista Busine
/* 31F0 */ 0x73, 0x73, 0x20, 0x4E, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x56, 0x69, 0x73, // ss N.Windows Vis
/* 3200 */ 0x74, 0x61, 0x20, 0x45, 0x6E, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x00, 0x57, 0x69, // ta Enterprise.Wi
/* 3210 */ 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x56, 0x69, 0x73, 0x74, 0x61, 0x20, 0x45, 0x6E, 0x74, 0x65, // ndows Vista Ente
/* 3220 */ 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x4E, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // rprise N.Office
/* 3230 */ 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, // Access 2010.Offi
/* 3240 */ 0x63, 0x65, 0x20, 0x45, 0x78, 0x63, 0x65, 0x6C, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, // ce Excel 2010.Of
/* 3250 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x47, 0x72, 0x6F, 0x6F, 0x76, 0x65, 0x20, 0x32, 0x30, 0x31, 0x30, // fice Groove 2010
/* 3260 */ 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x49, 0x6E, 0x66, 0x6F, 0x50, 0x61, 0x74, 0x68, // .Office InfoPath
/* 3270 */ 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4D, 0x6F, 0x6E, // 2010.Office Mon
/* 3280 */ 0x64, 0x6F, 0x20, 0x31, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, // do 1 2010.Office
/* 3290 */ 0x20, 0x4D, 0x6F, 0x6E, 0x64, 0x6F, 0x20, 0x32, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, // Mondo 2 2010.Of
/* 32A0 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x4F, 0x6E, 0x65, 0x4E, 0x6F, 0x74, 0x65, 0x20, 0x32, 0x30, 0x31, // fice OneNote 201
/* 32B0 */ 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4F, 0x75, 0x74, 0x4C, 0x6F, 0x6F, 0x6B, // 0.Office OutLook
/* 32C0 */ 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x6F, 0x77, // 2010.Office Pow
/* 32D0 */ 0x65, 0x72, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, // erPoint 2010.Off
/* 32E0 */ 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, // ice Professional
/* 32F0 */ 0x20, 0x50, 0x6C, 0x75, 0x73, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, // Plus 2010.Offic
/* 3300 */ 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, // e Project Pro 20
/* 3310 */ 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, // 10.Office Projec
/* 3320 */ 0x74, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, // t Standard 2010.
/* 3330 */ 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x73, 0x68, 0x65, 0x72, // Office Publisher
/* 3340 */ 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, 0x6D, 0x61, // 2010.Office Sma
/* 3350 */ 0x6C, 0x6C, 0x20, 0x42, 0x75, 0x73, 0x69, 0x6E, 0x65, 0x73, 0x73, 0x20, 0x42, 0x61, 0x73, 0x69, // ll Business Basi
/* 3360 */ 0x63, 0x73, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, // cs 2010.Office S
/* 3370 */ 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, // tandard 2010.Off
/* 3380 */ 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x50, 0x72, 0x65, 0x6D, 0x69, 0x75, // ice Visio Premiu
/* 3390 */ 0x6D, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, // m 2010.Office Vi
/* 33A0 */ 0x73, 0x69, 0x6F, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, // sio Pro 2010.Off
/* 33B0 */ 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, // ice Visio Standa
/* 33C0 */ 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x57, // rd 2010.Office W
/* 33D0 */ 0x6F, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x30, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // ord 2010.Office
/* 33E0 */ 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, // Access 2013.Offi
/* 33F0 */ 0x63, 0x65, 0x20, 0x45, 0x78, 0x63, 0x65, 0x6C, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, // ce Excel 2013.Of
/* 3400 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x49, 0x6E, 0x66, 0x6F, 0x50, 0x61, 0x74, 0x68, 0x20, 0x32, 0x30, // fice InfoPath 20
/* 3410 */ 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4C, 0x79, 0x6E, 0x63, 0x20, 0x32, // 13.Office Lync 2
/* 3420 */ 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4D, 0x6F, 0x6E, 0x64, 0x6F, // 013.Office Mondo
/* 3430 */ 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4F, 0x6E, 0x65, // 2013.Office One
/* 3440 */ 0x4E, 0x6F, 0x74, 0x65, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, // Note 2013.Office
/* 3450 */ 0x20, 0x4F, 0x75, 0x74, 0x4C, 0x6F, 0x6F, 0x6B, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, // OutLook 2013.Of
/* 3460 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x6F, 0x77, 0x65, 0x72, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x20, // fice PowerPoint
/* 3470 */ 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x66, // 2013.Office Prof
/* 3480 */ 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x50, 0x6C, 0x75, 0x73, 0x20, 0x32, 0x30, // essional Plus 20
/* 3490 */ 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, // 13.Office Projec
/* 34A0 */ 0x74, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, // t Pro 2013.Offic
/* 34B0 */ 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, // e Project Standa
/* 34C0 */ 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, // rd 2013.Office P
/* 34D0 */ 0x75, 0x62, 0x6C, 0x69, 0x73, 0x68, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, // ublisher 2013.Of
/* 34E0 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, // fice Standard 20
/* 34F0 */ 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, // 13.Office Visio
/* 3500 */ 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // Pro 2013.Office
/* 3510 */ 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, // Visio Standard 2
/* 3520 */ 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x57, 0x6F, 0x72, 0x64, 0x20, // 013.Office Word
/* 3530 */ 0x32, 0x30, 0x31, 0x33, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x41, 0x63, 0x63, 0x65, // 2013.Office Acce
/* 3540 */ 0x73, 0x73, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, // ss 2013 (Pre-Rel
/* 3550 */ 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x45, 0x78, 0x63, // ease).Office Exc
/* 3560 */ 0x65, 0x6C, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, // el 2013 (Pre-Rel
/* 3570 */ 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x47, 0x72, 0x6F, // ease).Office Gro
/* 3580 */ 0x6F, 0x76, 0x65, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, // ove 2013 (Pre-Re
/* 3590 */ 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x49, 0x6E, // lease).Office In
/* 35A0 */ 0x66, 0x6F, 0x50, 0x61, 0x74, 0x68, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, // foPath 2013 (Pre
/* 35B0 */ 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, // -Release).Office
/* 35C0 */ 0x20, 0x4C, 0x79, 0x6E, 0x63, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, // Lync 2013 (Pre-
/* 35D0 */ 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // Release).Office
/* 35E0 */ 0x4D, 0x6F, 0x6E, 0x64, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, // Mondo 2013 (Pre-
/* 35F0 */ 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // Release).Office
/* 3600 */ 0x4F, 0x6E, 0x65, 0x4E, 0x6F, 0x74, 0x65, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, // OneNote 2013 (Pr
/* 3610 */ 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, // e-Release).Offic
/* 3620 */ 0x65, 0x20, 0x4F, 0x75, 0x74, 0x6C, 0x6F, 0x6F, 0x6B, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, // e Outlook 2013 (
/* 3630 */ 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, // Pre-Release).Off
/* 3640 */ 0x69, 0x63, 0x65, 0x20, 0x50, 0x6F, 0x77, 0x65, 0x72, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x20, 0x32, // ice PowerPoint 2
/* 3650 */ 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, // 013 (Pre-Release
/* 3660 */ 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, // ).Office Profess
/* 3670 */ 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x50, 0x6C, 0x75, 0x73, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, // ional Plus 2013
/* 3680 */ 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, // (Pre-Release).Of
/* 3690 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, 0x6F, // fice Project Pro
/* 36A0 */ 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, // 2013 (Pre-Relea
/* 36B0 */ 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, // se).Office Proje
/* 36C0 */ 0x63, 0x74, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x33, // ct Standard 2013
/* 36D0 */ 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, // (Pre-Release).O
/* 36E0 */ 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x73, 0x68, 0x65, 0x72, 0x20, // ffice Publisher
/* 36F0 */ 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, // 2013 (Pre-Releas
/* 3700 */ 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, // e).Office Visio
/* 3710 */ 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, // Pro 2013 (Pre-Re
/* 3720 */ 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, // lease).Office Vi
/* 3730 */ 0x73, 0x69, 0x6F, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, // sio Standard 201
/* 3740 */ 0x33, 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, // 3 (Pre-Release).
/* 3750 */ 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x57, 0x6F, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x33, // Office Word 2013
/* 3760 */ 0x20, 0x28, 0x50, 0x72, 0x65, 0x2D, 0x52, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x29, 0x00, 0x4F, // (Pre-Release).O
/* 3770 */ 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x32, 0x30, 0x31, // ffice Access 201
/* 3780 */ 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x45, 0x78, 0x63, 0x65, 0x6C, 0x20, 0x32, // 6.Office Excel 2
/* 3790 */ 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4D, 0x6F, 0x6E, 0x64, 0x6F, // 016.Office Mondo
/* 37A0 */ 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4D, 0x6F, 0x6E, // 2016.Office Mon
/* 37B0 */ 0x64, 0x6F, 0x20, 0x52, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, // do R 2016.Office
/* 37C0 */ 0x20, 0x4F, 0x6E, 0x65, 0x4E, 0x6F, 0x74, 0x65, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, // OneNote 2016.Of
/* 37D0 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x4F, 0x75, 0x74, 0x6C, 0x6F, 0x6F, 0x6B, 0x20, 0x32, 0x30, 0x31, // fice Outlook 201
/* 37E0 */ 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x6F, 0x77, 0x65, 0x72, 0x70, 0x6F, // 6.Office Powerpo
/* 37F0 */ 0x69, 0x6E, 0x74, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // int 2016.Office
/* 3800 */ 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x50, 0x6C, 0x75, // Professional Plu
/* 3810 */ 0x73, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, // s 2016.Office Pr
/* 3820 */ 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, // oject Pro 2016.O
/* 3830 */ 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, // ffice Project Pr
/* 3840 */ 0x6F, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x43, 0x32, 0x52, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, // o 2016 C2R.Offic
/* 3850 */ 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, // e Project Standa
/* 3860 */ 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, // rd 2016.Office P
/* 3870 */ 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, // roject Standard
/* 3880 */ 0x32, 0x30, 0x31, 0x36, 0x20, 0x43, 0x32, 0x52, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // 2016 C2R.Office
/* 3890 */ 0x50, 0x75, 0x62, 0x6C, 0x69, 0x73, 0x68, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, // Publisher 2016.O
/* 38A0 */ 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, 0x6B, 0x79, 0x70, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, // ffice Skype for
/* 38B0 */ 0x42, 0x75, 0x73, 0x69, 0x6E, 0x65, 0x73, 0x73, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, // Business 2016.Of
/* 38C0 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, // fice Standard 20
/* 38D0 */ 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, // 16.Office Visio
/* 38E0 */ 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, // Pro 2016.Office
/* 38F0 */ 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x43, // Visio Pro 2016 C
/* 3900 */ 0x32, 0x52, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, // 2R.Office Visio
/* 3910 */ 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, // Standard 2016.Of
/* 3920 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, // fice Visio Stand
/* 3930 */ 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x36, 0x20, 0x43, 0x32, 0x52, 0x00, 0x4F, 0x66, 0x66, // ard 2016 C2R.Off
/* 3940 */ 0x69, 0x63, 0x65, 0x20, 0x57, 0x6F, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x36, 0x00, 0x4F, 0x66, // ice Word 2016.Of
/* 3950 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, // fice Professiona
/* 3960 */ 0x6C, 0x20, 0x50, 0x6C, 0x75, 0x73, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, 0x43, 0x32, 0x52, 0x20, // l Plus 2019 C2R
/* 3970 */ 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, // Preview.Office P
/* 3980 */ 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x39, 0x20, // roject Pro 2019
/* 3990 */ 0x43, 0x32, 0x52, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x4F, 0x66, 0x66, 0x69, // C2R Preview.Offi
/* 39A0 */ 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, // ce Visio Pro 201
/* 39B0 */ 0x39, 0x20, 0x43, 0x32, 0x52, 0x20, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x00, 0x4F, 0x66, // 9 C2R Preview.Of
/* 39C0 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x32, 0x30, 0x31, 0x39, // fice Access 2019
/* 39D0 */ 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x45, 0x78, 0x63, 0x65, 0x6C, 0x20, 0x32, 0x30, // .Office Excel 20
/* 39E0 */ 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x4F, 0x75, 0x74, 0x6C, 0x6F, 0x6F, // 19.Office Outloo
/* 39F0 */ 0x6B, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x6F, // k 2019.Office Po
/* 3A00 */ 0x77, 0x65, 0x72, 0x70, 0x6F, 0x69, 0x6E, 0x74, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, // werpoint 2019.Of
/* 3A10 */ 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x66, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x61, // fice Professiona
/* 3A20 */ 0x6C, 0x20, 0x50, 0x6C, 0x75, 0x73, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, // l Plus 2019.Offi
/* 3A30 */ 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, // ce Project Pro 2
/* 3A40 */ 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x72, 0x6F, 0x6A, 0x65, // 019.Office Proje
/* 3A50 */ 0x63, 0x74, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x39, // ct Standard 2019
/* 3A60 */ 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x73, 0x68, 0x65, // .Office Publishe
/* 3A70 */ 0x72, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, 0x6B, // r 2019.Office Sk
/* 3A80 */ 0x79, 0x70, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x42, 0x75, 0x73, 0x69, 0x6E, 0x65, 0x73, 0x73, // ype for Business
/* 3A90 */ 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x53, 0x74, 0x61, // 2019.Office Sta
/* 3AA0 */ 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, // ndard 2019.Offic
/* 3AB0 */ 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x32, 0x30, 0x31, 0x39, // e Visio Pro 2019
/* 3AC0 */ 0x00, 0x4F, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x56, 0x69, 0x73, 0x69, 0x6F, 0x20, 0x53, 0x74, // .Office Visio St
/* 3AD0 */ 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, 0x4F, 0x66, 0x66, 0x69, // andard 2019.Offi
/* 3AE0 */ 0x63, 0x65, 0x20, 0x57, 0x6F, 0x72, 0x64, 0x20, 0x32, 0x30, 0x31, 0x39, 0x00, // ce Word 2019.
};
__pure size_t getDefaultKmsDataSize()
{
return sizeof(DefaultKmsData);
}
#endif // NO_INTERNAL_DATA

1167
src/kmsdata.c Normal file

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more