T1
This commit is contained in:
@@ -135,3 +135,6 @@
|
|||||||
# Disable or enable the privacy mode (default is false)
|
# Disable or enable the privacy mode (default is false)
|
||||||
# Command line:
|
# Command line:
|
||||||
;PrivacyMode = false
|
;PrivacyMode = false
|
||||||
|
|
||||||
|
# Disable or enable the ability to count the request (default is false)
|
||||||
|
;CountingReq = false
|
||||||
@@ -652,10 +652,10 @@ endif
|
|||||||
$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
|
$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(REAL_PROGRAM_NAME) $(REAL_MULTI_NAME) $(REAL_DLL_NAME) $(REAL_CLIENT_NAME) $(OBJ_NAME) $(REAL_A_NAME) ../bin/* ../build/* *.d
|
rm -rf $(REAL_PROGRAM_NAME) $(REAL_MULTI_NAME) $(REAL_DLL_NAME) $(REAL_CLIENT_NAME) $(OBJ_NAME) $(REAL_A_NAME) ../bin/* ../build/* *.d
|
||||||
|
|
||||||
dnsclean:
|
dnsclean:
|
||||||
rm -f ../build/dns_srv.o
|
rm -rf ../build/dns_srv.o
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."
|
@echo "Help is available by typing 'make help' in directory $(shell realpath `pwd`/..). Use 'cd ..' to get there."
|
||||||
|
|||||||
+6
-126
@@ -10,8 +10,6 @@
|
|||||||
* new version.
|
* new version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
* Useful customizations. These options are mandatory. You cannot comment them out.
|
* Useful customizations. These options are mandatory. You cannot comment them out.
|
||||||
@@ -37,30 +35,22 @@
|
|||||||
* uncomment one or more lines starting with "//#define"
|
* uncomment one or more lines starting with "//#define"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* -------------------------------
|
* -------------------------------
|
||||||
* Defaults
|
* Defaults
|
||||||
* -------------------------------
|
* -------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef INI_FILE
|
#ifndef INI_FILE
|
||||||
/*
|
/*
|
||||||
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
|
* Uncomment and customize the following line if you want vlmcsd to look for an ini file
|
||||||
* at a default location.
|
* at a default location.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define INI_FILE "/etc/vlmcsd.ini"
|
#define INI_FILE "/etc/vlmcsd.ini"
|
||||||
|
|
||||||
#endif // INI_FILE
|
#endif // INI_FILE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef DATA_FILE
|
#ifndef DATA_FILE
|
||||||
/*
|
/*
|
||||||
* Uncomment and customize the following line if you want vlmcsd to look for a KMS data file
|
* Uncomment and customize the following line if you want vlmcsd to look for a KMS data file
|
||||||
@@ -71,7 +61,6 @@
|
|||||||
|
|
||||||
#endif // DATA_FILE
|
#endif // DATA_FILE
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
* Troubleshooting options. Please note that disabling features may also help troubleshooting.
|
* Troubleshooting options. Please note that disabling features may also help troubleshooting.
|
||||||
@@ -81,7 +70,6 @@
|
|||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef CHILD_HANDLER
|
#ifndef CHILD_HANDLER
|
||||||
/*
|
/*
|
||||||
* Uncomment the following #define if you are compiling for a platform that does
|
* Uncomment the following #define if you are compiling for a platform that does
|
||||||
@@ -95,7 +83,6 @@
|
|||||||
|
|
||||||
#endif // CHILD_HANDLER
|
#endif // CHILD_HANDLER
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_TIMEOUT
|
#ifndef NO_TIMEOUT
|
||||||
/*
|
/*
|
||||||
* Uncomment the following #define if you are compiling for a platform that does
|
* Uncomment the following #define if you are compiling for a platform that does
|
||||||
@@ -106,7 +93,6 @@
|
|||||||
|
|
||||||
#endif // NO_TIMEOUT
|
#endif // NO_TIMEOUT
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_DNS
|
#ifndef NO_DNS
|
||||||
/*
|
/*
|
||||||
* Uncomment the following #define if you have trouble with accessing routines
|
* Uncomment the following #define if you have trouble with accessing routines
|
||||||
@@ -118,7 +104,6 @@
|
|||||||
|
|
||||||
#endif // NO_DNS
|
#endif // NO_DNS
|
||||||
|
|
||||||
|
|
||||||
#ifndef TERMINAL_FIXED_WIDTH
|
#ifndef TERMINAL_FIXED_WIDTH
|
||||||
/*
|
/*
|
||||||
* Uncomment the following #define and optionally change its value if you are compiling for
|
* Uncomment the following #define and optionally change its value if you are compiling for
|
||||||
@@ -130,9 +115,6 @@
|
|||||||
|
|
||||||
#endif // TERMINAL_FIXED_WIDTH
|
#endif // TERMINAL_FIXED_WIDTH
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _PEDANTIC
|
#ifndef _PEDANTIC
|
||||||
/*
|
/*
|
||||||
* Uncomment the following #define if you want to do vlmcs and vlmcsd more checks on the data
|
* Uncomment the following #define if you want to do vlmcs and vlmcsd more checks on the data
|
||||||
@@ -144,9 +126,6 @@
|
|||||||
|
|
||||||
#endif // _PEDANTIC
|
#endif // _PEDANTIC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_PROCFS
|
#ifndef NO_PROCFS
|
||||||
/*
|
/*
|
||||||
* Cygwin, Linux, Android, NetBSD, DragonflyBSD:
|
* Cygwin, Linux, Android, NetBSD, DragonflyBSD:
|
||||||
@@ -167,9 +146,6 @@
|
|||||||
|
|
||||||
#endif // NO_PROCFS
|
#endif // NO_PROCFS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef USE_AUXV
|
#ifndef USE_AUXV
|
||||||
/*
|
/*
|
||||||
* Linux only:
|
* Linux only:
|
||||||
@@ -186,13 +162,10 @@
|
|||||||
* It is 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
|
#endif // USE_AUXV
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _OPENSSL_NO_HMAC
|
#ifndef _OPENSSL_NO_HMAC
|
||||||
/*
|
/*
|
||||||
* If you configured vlmcsd to use OpenSSL (which you shouldn't) you may use this option
|
* If you configured vlmcsd to use OpenSSL (which you shouldn't) you may use this option
|
||||||
@@ -205,16 +178,12 @@
|
|||||||
|
|
||||||
#endif // _OPENSSL_NO_HMAC
|
#endif // _OPENSSL_NO_HMAC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
* Modes of operation
|
* Modes of operation
|
||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef USE_THREADS
|
#ifndef USE_THREADS
|
||||||
/*
|
/*
|
||||||
* Do not use fork() but threads to serve your clients.
|
* Do not use fork() but threads to serve your clients.
|
||||||
@@ -239,9 +208,6 @@
|
|||||||
|
|
||||||
#endif // USE_THREADS
|
#endif // USE_THREADS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _CRYPTO_POLARSSL
|
#ifndef _CRYPTO_POLARSSL
|
||||||
/*
|
/*
|
||||||
* Not available on native Windows. Can be used with Cygwin.
|
* Not available on native Windows. Can be used with Cygwin.
|
||||||
@@ -260,9 +226,6 @@
|
|||||||
|
|
||||||
#endif // _CRYPTO_POLARSSL
|
#endif // _CRYPTO_POLARSSL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _CRYPTO_OPENSSL
|
#ifndef _CRYPTO_OPENSSL
|
||||||
/*
|
/*
|
||||||
* Not available on native Windows. Can be used with Cygwin.
|
* Not available on native Windows. Can be used with Cygwin.
|
||||||
@@ -281,9 +244,6 @@
|
|||||||
|
|
||||||
#endif // _CRYPTO_OPENSSL
|
#endif // _CRYPTO_OPENSSL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _USE_AES_FROM_OPENSSL
|
#ifndef _USE_AES_FROM_OPENSSL
|
||||||
/*
|
/*
|
||||||
* DANGEROUS: Tweak OpenSSL to perform KMSv4 CMAC and KMSv6 modified AES. This option creates the expanded
|
* DANGEROUS: Tweak OpenSSL to perform KMSv4 CMAC and KMSv6 modified AES. This option creates the expanded
|
||||||
@@ -301,10 +261,6 @@
|
|||||||
|
|
||||||
#endif // _USE_AES_FROM_OPENSSL
|
#endif // _USE_AES_FROM_OPENSSL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _OPENSSL_SOFTWARE
|
#ifndef _OPENSSL_SOFTWARE
|
||||||
/*
|
/*
|
||||||
* Use this only if you have defined _CRYPTO_OPENSSL and _USE_AES_FROM_OPENSSL. It has no effect otherwise.
|
* Use this only if you have defined _CRYPTO_OPENSSL and _USE_AES_FROM_OPENSSL. It has no effect otherwise.
|
||||||
@@ -317,20 +273,15 @@
|
|||||||
|
|
||||||
#endif // _OPENSSL_SOFTWARE
|
#endif // _OPENSSL_SOFTWARE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef FULL_INTERNAL_DATA
|
#ifndef FULL_INTERNAL_DATA
|
||||||
/*
|
/*
|
||||||
* Includes the full database in vlmcsd.
|
* Includes the full database in vlmcsd.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define FULL_INTERNAL_DATA
|
#define FULL_INTERNAL_DATA
|
||||||
|
|
||||||
#endif // FULL_INTERNAL_DATA
|
#endif // FULL_INTERNAL_DATA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
* Removal of features. Allows you to remove features of vlmcsd you do not need or want.
|
* Removal of features. Allows you to remove features of vlmcsd you do not need or want.
|
||||||
@@ -338,7 +289,6 @@
|
|||||||
* ----------------------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_FREEBIND
|
#ifndef NO_FREEBIND
|
||||||
/*
|
/*
|
||||||
* Do not compile support for FREEBIND (Linux) and IP_BINDANY (FreeBSD). This disables the -F1 command
|
* Do not compile support for FREEBIND (Linux) and IP_BINDANY (FreeBSD). This disables the -F1 command
|
||||||
@@ -350,21 +300,15 @@
|
|||||||
|
|
||||||
#endif // NO_FREEBIND
|
#endif // NO_FREEBIND
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_TAP
|
#ifndef NO_TAP
|
||||||
/*
|
/*
|
||||||
* Do not compile support for using a VPN adapter under Windows. Disables -O command line option.
|
* Do not compile support for using a VPN adapter under Windows. Disables -O command line option.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define NO_TAP
|
#define NO_TAP
|
||||||
|
|
||||||
#endif // NO_TAP
|
#endif // NO_TAP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_VERSION_INFORMATION
|
#ifndef NO_VERSION_INFORMATION
|
||||||
/*
|
/*
|
||||||
* Removes the -V option from vlmcsd and vlmcs that displays the version information
|
* Removes the -V option from vlmcsd and vlmcs that displays the version information
|
||||||
@@ -374,9 +318,6 @@
|
|||||||
|
|
||||||
#endif // NO_VERSION_INFORMATION
|
#endif // NO_VERSION_INFORMATION
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_VERBOSE_LOG
|
#ifndef NO_VERBOSE_LOG
|
||||||
/*
|
/*
|
||||||
* Removes the ability to do verbose logging and disables -v and -q in vlmcsd. It does not remove the -v
|
* Removes the ability to do verbose logging and disables -v and -q in vlmcsd. It does not remove the -v
|
||||||
@@ -387,9 +328,6 @@
|
|||||||
|
|
||||||
#endif // NO_VERBOSE_LOG
|
#endif // NO_VERBOSE_LOG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_LOG
|
#ifndef NO_LOG
|
||||||
/*
|
/*
|
||||||
* Disables logging completely. You can neither log to a file nor to the console. -D and -f will
|
* Disables logging completely. You can neither log to a file nor to the console. -D and -f will
|
||||||
@@ -401,9 +339,6 @@
|
|||||||
|
|
||||||
#endif // NO_LOG
|
#endif // NO_LOG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_STRICT_MODES
|
#ifndef NO_STRICT_MODES
|
||||||
/*
|
/*
|
||||||
* Disables emulator detection protection. Removes -M0, -M1, -E0, -E1, -K0, -K1, -K2 and -K3 from
|
* Disables emulator detection protection. Removes -M0, -M1, -E0, -E1, -K0, -K1, -K2 and -K3 from
|
||||||
@@ -415,10 +350,6 @@
|
|||||||
|
|
||||||
#endif // NO_STRICT_MODES
|
#endif // NO_STRICT_MODES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_CLIENT_LIST
|
#ifndef NO_CLIENT_LIST
|
||||||
/*
|
/*
|
||||||
* Disables the ability to maintain a list of Client Machine IDs (CMIDs). Removes -M0, -M1, -E0 and -E1
|
* Disables the ability to maintain a list of Client Machine IDs (CMIDs). Removes -M0, -M1, -E0 and -E1
|
||||||
@@ -429,8 +360,6 @@
|
|||||||
|
|
||||||
#endif // !NO_CLIENT_LIST
|
#endif // !NO_CLIENT_LIST
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_RANDOM_EPID
|
#ifndef NO_RANDOM_EPID
|
||||||
/*
|
/*
|
||||||
* Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
|
* Disables the ability to generate random ePIDs. Useful if you managed to grab ePID/HWID from a
|
||||||
@@ -442,9 +371,6 @@
|
|||||||
|
|
||||||
#endif // NO_RANDOM_EPID
|
#endif // NO_RANDOM_EPID
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_INI_FILE
|
#ifndef NO_INI_FILE
|
||||||
/*
|
/*
|
||||||
* Disables the ability to use a configuration file (aka ini file). Removes -i from the command line.
|
* Disables the ability to use a configuration file (aka ini file). Removes -i from the command line.
|
||||||
@@ -454,9 +380,6 @@
|
|||||||
|
|
||||||
#endif // NO_INI_FILE
|
#endif // NO_INI_FILE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_PID_FILE
|
#ifndef NO_PID_FILE
|
||||||
/*
|
/*
|
||||||
* Disables the abilty to write a pid file containing the process id of vlmcsd. If your init system
|
* Disables the abilty to write a pid file containing the process id of vlmcsd. If your init system
|
||||||
@@ -468,9 +391,6 @@
|
|||||||
|
|
||||||
#endif // NO_PID_FILE
|
#endif // NO_PID_FILE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_EXTERNAL_DATA
|
#ifndef NO_EXTERNAL_DATA
|
||||||
/*
|
/*
|
||||||
* Disables the abilty to load external KMS data from a file. Disables command line options -j
|
* Disables the abilty to load external KMS data from a file. Disables command line options -j
|
||||||
@@ -481,9 +401,6 @@
|
|||||||
|
|
||||||
#endif // NO_EXTERNAL_DATA
|
#endif // NO_EXTERNAL_DATA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_INTERNAL_DATA
|
#ifndef NO_INTERNAL_DATA
|
||||||
/*
|
/*
|
||||||
* Compiles vlmcsd and vlmcs without an internal database. If no database is found at
|
* Compiles vlmcsd and vlmcs without an internal database. If no database is found at
|
||||||
@@ -495,9 +412,6 @@
|
|||||||
|
|
||||||
#endif // NO_INTERNAL_DATA
|
#endif // NO_INTERNAL_DATA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef UNSAFE_DATA_LOAD
|
#ifndef UNSAFE_DATA_LOAD
|
||||||
/*
|
/*
|
||||||
* Does not check an external KMS data file for integrity.
|
* Does not check an external KMS data file for integrity.
|
||||||
@@ -508,9 +422,6 @@
|
|||||||
|
|
||||||
#endif // UNSAFE_DATA_LOAD
|
#endif // UNSAFE_DATA_LOAD
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_USER_SWITCH
|
#ifndef NO_USER_SWITCH
|
||||||
/*
|
/*
|
||||||
* Disables switching to another uid and/or gid after starting the program and setting up the sockets.
|
* Disables switching to another uid and/or gid after starting the program and setting up the sockets.
|
||||||
@@ -526,9 +437,6 @@
|
|||||||
|
|
||||||
#endif // NO_USER_SWITCH
|
#endif // NO_USER_SWITCH
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_HELP
|
#ifndef NO_HELP
|
||||||
/*
|
/*
|
||||||
* Disables display of help in both vlmcsd and vlmcs. Saves some bytes but only makes sense if you have
|
* Disables display of help in both vlmcsd and vlmcs. Saves some bytes but only makes sense if you have
|
||||||
@@ -539,9 +447,6 @@
|
|||||||
|
|
||||||
#endif // NO_HELP
|
#endif // NO_HELP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_CUSTOM_INTERVALS
|
#ifndef NO_CUSTOM_INTERVALS
|
||||||
/*
|
/*
|
||||||
* Disables the ability to specify custom interval for renewing and retrying activation. Newer versions of the Microsoft's
|
* Disables the ability to specify custom interval for renewing and retrying activation. Newer versions of the Microsoft's
|
||||||
@@ -553,9 +458,6 @@
|
|||||||
|
|
||||||
#endif // NO_CUSTOM_INTERVALS
|
#endif // NO_CUSTOM_INTERVALS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_PRIVATE_IP_DETECT
|
#ifndef NO_PRIVATE_IP_DETECT
|
||||||
/*
|
/*
|
||||||
* Disables the ability to protect vlmcsd against KMS requests from public IP addresses.
|
* Disables the ability to protect vlmcsd against KMS requests from public IP addresses.
|
||||||
@@ -566,9 +468,6 @@
|
|||||||
|
|
||||||
#endif // NO_PRIVATE_IP_DETECT
|
#endif // NO_PRIVATE_IP_DETECT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
/*
|
/*
|
||||||
* Disables standalone startup of vlmcsd. If you use this config directive, you must start vlmcsd from an internet
|
* Disables standalone startup of vlmcsd. If you use this config directive, you must start vlmcsd from an internet
|
||||||
@@ -580,9 +479,6 @@
|
|||||||
|
|
||||||
#endif // NO_SOCKETS
|
#endif // NO_SOCKETS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_CL_PIDS
|
#ifndef NO_CL_PIDS
|
||||||
/*
|
/*
|
||||||
* Disables the ability to specify ePIDs and HWID at the command line. You still may use them in the ini file.
|
* Disables the ability to specify ePIDs and HWID at the command line. You still may use them in the ini file.
|
||||||
@@ -593,9 +489,6 @@
|
|||||||
|
|
||||||
#endif // NO_CL_PIDS
|
#endif // NO_CL_PIDS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_LIMIT
|
#ifndef NO_LIMIT
|
||||||
/*
|
/*
|
||||||
* Disables the ability to limit the number of worker threads or processes that vlmcsd uses. While you should set a
|
* Disables the ability to limit the number of worker threads or processes that vlmcsd uses. While you should set a
|
||||||
@@ -612,9 +505,6 @@
|
|||||||
|
|
||||||
#endif // NO_LIMIT
|
#endif // NO_LIMIT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_SIGHUP
|
#ifndef NO_SIGHUP
|
||||||
/*
|
/*
|
||||||
* Disables the ability to signal hangup (SIGHUP) to vlmcsd to restart it (rereading the ini file). The SIGHUP
|
* Disables the ability to signal hangup (SIGHUP) to vlmcsd to restart it (rereading the ini file). The SIGHUP
|
||||||
@@ -632,9 +522,6 @@
|
|||||||
|
|
||||||
#endif // NO_SIGHUP
|
#endif // NO_SIGHUP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef SIMPLE_RPC
|
#ifndef SIMPLE_RPC
|
||||||
/*
|
/*
|
||||||
* Uses a simple version of the RPC protocol which does not support NDR64 and BTFN.
|
* Uses a simple version of the RPC protocol which does not support NDR64 and BTFN.
|
||||||
@@ -645,9 +532,6 @@
|
|||||||
// #define SIMPLE_RPC
|
// #define SIMPLE_RPC
|
||||||
#endif // !SIMPLE_RPC
|
#endif // !SIMPLE_RPC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef SIMPLE_SOCKETS
|
#ifndef SIMPLE_SOCKETS
|
||||||
/*
|
/*
|
||||||
* Disables the ability to choose IP addresses using the -L option in vlmcsd. vlmcsd will listen on all IP addresses.
|
* Disables the ability to choose IP addresses using the -L option in vlmcsd. vlmcsd will listen on all IP addresses.
|
||||||
@@ -658,9 +542,6 @@
|
|||||||
|
|
||||||
#endif // SIMPLE_SOCKETS
|
#endif // SIMPLE_SOCKETS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef PRIVACY_ON
|
#ifndef PRIVACY_ON
|
||||||
/*
|
/*
|
||||||
* This flag enables the ability to hide the incoming request information and outcoming request
|
* This flag enables the ability to hide the incoming request information and outcoming request
|
||||||
@@ -669,9 +550,8 @@
|
|||||||
|
|
||||||
// #define PRIVACY_ON
|
// #define PRIVACY_ON
|
||||||
|
|
||||||
#endif // PRIVACY_ON
|
#endif
|
||||||
|
|
||||||
/* Don't change anything BELOW this line */
|
/* Don't change anything BELOW this line */
|
||||||
|
|
||||||
|
|
||||||
#endif /* CONFIG_H_ */
|
#endif /* CONFIG_H_ */
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ typedef ssize_t(*sendrecv_t)(int, void*, size_t, int);
|
|||||||
typedef int (WINAPI *sendrecv_t)(SOCKET, void*, int, int);
|
typedef int (WINAPI *sendrecv_t)(SOCKET, void*, int, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_LOG
|
||||||
|
#include "output.h"
|
||||||
|
#include <time.h>
|
||||||
|
#endif // NO_LOG
|
||||||
|
|
||||||
// Send or receive a fixed number of bytes regardless if received in one or more chunks
|
// 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_fast8_t sendrecv(SOCKET sock, BYTE *data, int len, int_fast8_t do_send)
|
||||||
@@ -1045,6 +1049,10 @@ int runServer()
|
|||||||
serveClient(STDIN_FILENO, RpcAssocGroup);
|
serveClient(STDIN_FILENO, RpcAssocGroup);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#ifndef NO_LOG
|
||||||
|
static uint32_t CountKMSReq = 0;
|
||||||
|
time_t startClock = time(NULL);
|
||||||
|
#endif // NO_LOG
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@@ -1085,6 +1093,24 @@ int runServer()
|
|||||||
# else // NO_LOG || !_PEDANTIC
|
# else // NO_LOG || !_PEDANTIC
|
||||||
serveClientAsync(s_client, RpcAssocGroup);
|
serveClientAsync(s_client, RpcAssocGroup);
|
||||||
# endif // NO_LOG || !_PEDANTIC
|
# endif // NO_LOG || !_PEDANTIC
|
||||||
|
|
||||||
|
#ifndef NO_LOG
|
||||||
|
if (isCounting == TRUE) {
|
||||||
|
CountKMSReq++;
|
||||||
|
|
||||||
|
time_t checkPointClock = time(NULL);
|
||||||
|
double uptimeReq = (double)(checkPointClock - startClock);
|
||||||
|
double reqRate = CountKMSReq / uptimeReq;
|
||||||
|
|
||||||
|
logger(
|
||||||
|
"Total %d %s in %.2lf seconds (%.4lf reqs/sec)\n",
|
||||||
|
CountKMSReq,
|
||||||
|
(CountKMSReq == 1) ? "request" : "requests",
|
||||||
|
uptimeReq,
|
||||||
|
reqRate
|
||||||
|
);
|
||||||
|
}
|
||||||
|
#endif // NO_LOG
|
||||||
}
|
}
|
||||||
# endif // NO_SOCKETS
|
# endif // NO_SOCKETS
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ int_fast8_t logverbose = 0;
|
|||||||
int_fast8_t isPrivacyOn = FALSE;
|
int_fast8_t isPrivacyOn = FALSE;
|
||||||
#else
|
#else
|
||||||
int_fast8_t isPrivacyOn = TRUE;
|
int_fast8_t isPrivacyOn = TRUE;
|
||||||
#endif
|
#endif // PRIVACY_ON
|
||||||
|
|
||||||
|
int_fast8_t isCounting = FALSE;
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
int_fast8_t ExitLevel = 0;
|
int_fast8_t ExitLevel = 0;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#endif // !defined(NO_LIMIT) && !__minix__
|
#endif // !defined(NO_LIMIT) && !__minix__
|
||||||
#else
|
#else
|
||||||
//#ifndef USE_MSRPC
|
//#ifndef USE_MSRPC
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
//#endif // USE_MSRPC
|
//#endif // USE_MSRPC
|
||||||
@@ -220,4 +221,6 @@ extern int_fast8_t freebind;
|
|||||||
extern int_fast8_t isPrivacyOn;
|
extern int_fast8_t isPrivacyOn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern int_fast8_t isCounting;
|
||||||
|
|
||||||
#endif // INCLUDED_SHARED_GLOBALS_H
|
#endif // INCLUDED_SHARED_GLOBALS_H
|
||||||
|
|||||||
@@ -31,6 +31,10 @@
|
|||||||
* =============
|
* =============
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <winioctl.h>
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
#define TAP_WIN_CONTROL_CODE(request,method) \
|
#define TAP_WIN_CONTROL_CODE(request,method) \
|
||||||
CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
|
CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
|
||||||
//#ifndef USE_MSRPC
|
//#ifndef USE_MSRPC
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
//#include <ws2tcpip.h>
|
//#include <ws2tcpip.h>
|
||||||
//#endif // USE_MSRPC
|
//#endif // USE_MSRPC
|
||||||
|
|||||||
+6
-3
@@ -696,8 +696,9 @@ static void displayResponse(const RESPONSE_RESULT result, const REQUEST* request
|
|||||||
"\n\nResponse from KMS server\n========================\n\n"
|
"\n\nResponse from KMS server\n========================\n\n"
|
||||||
"Size of KMS Response : %u (0x%x)\n", result.effectiveResponseSize, result.effectiveResponseSize
|
"Size of KMS Response : %u (0x%x)\n", result.effectiveResponseSize, result.effectiveResponseSize
|
||||||
);
|
);
|
||||||
|
#ifndef NO_LOG
|
||||||
logResponseVerbose(ePID, hwid, response, &printf);
|
logResponseVerbose(ePID, hwid, response, &printf);
|
||||||
|
#endif // NO_LOG
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
# endif // NO_VERBOSE_LOG
|
# endif // NO_VERBOSE_LOG
|
||||||
@@ -1387,7 +1388,9 @@ static void CreateRequestBase(REQUEST *Request)
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
printf("\nRequest Parameters\n==================\n\n");
|
printf("\nRequest Parameters\n==================\n\n");
|
||||||
|
#ifndef NO_LOG
|
||||||
logRequestVerbose(Request, &printf);
|
logRequestVerbose(Request, &printf);
|
||||||
|
#endif // NO_LOG
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
# endif // NO_VERBOSE_LOG
|
# endif // NO_VERBOSE_LOG
|
||||||
@@ -1398,12 +1401,12 @@ int __stdcall WinStartUp(void)
|
|||||||
{
|
{
|
||||||
WCHAR **szArgList;
|
WCHAR **szArgList;
|
||||||
int argc;
|
int argc;
|
||||||
|
|
||||||
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
|
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
|
|
||||||
int i;
|
|
||||||
char **argv = (char**)vlmcsd_malloc(sizeof(char*)*argc);
|
char **argv = (char**)vlmcsd_malloc(sizeof(char*)*argc);
|
||||||
|
|
||||||
for (i = 0; i < argc; i++)
|
for (int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
|
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
|
||||||
argv[i] = (char*)vlmcsd_malloc(size);
|
argv[i] = (char*)vlmcsd_malloc(size);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include CONFIG
|
#include CONFIG
|
||||||
|
|
||||||
#if !defined(USE_MSRPC) && defined(_WIN32)
|
#if !defined(USE_MSRPC) && defined(_WIN32)
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif // defined(USE_MSRPC) && defined(_WIN32)
|
#endif // defined(USE_MSRPC) && defined(_WIN32)
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
@@ -17,6 +18,11 @@
|
|||||||
#endif // USE_MSRPC
|
#endif // USE_MSRPC
|
||||||
#include "kms.h"
|
#include "kms.h"
|
||||||
|
|
||||||
|
#if _MSC_VER
|
||||||
|
#include <windows.h>
|
||||||
|
#include <shellapi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MULTI_CALL_BINARY < 1
|
#if MULTI_CALL_BINARY < 1
|
||||||
#define client_main main
|
#define client_main main
|
||||||
#else
|
#else
|
||||||
|
|||||||
+36
-22
@@ -88,7 +88,7 @@ Volume License Management Service DAEMON (vlmcsd)
|
|||||||
#include "wintap.h"
|
#include "wintap.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *const optstring = "a:N:B:m:t:A:R:u:g:L:p:i:H:P:l:r:U:W:C:c:F:O:o:x:T:K:E:M:j:SseDdVvqkZX";
|
static const char *const optstring = "a:N:B:m:t:A:R:u:g:L:p:i:H:P:l:r:U:W:C:c:F:O:o:x:T:K:E:M:j:SseDdVvqkZXw";
|
||||||
|
|
||||||
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
#if !defined(NO_SOCKETS) && !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||||
static uint_fast8_t maxsockets = 0;
|
static uint_fast8_t maxsockets = 0;
|
||||||
@@ -178,6 +178,7 @@ static IniFileParameter_t IniFileParameterList[] =
|
|||||||
{"LogDateAndTime", INI_PARAM_LOG_DATE_AND_TIME},
|
{"LogDateAndTime", INI_PARAM_LOG_DATE_AND_TIME},
|
||||||
{"LogFile", INI_PARAM_LOG_FILE},
|
{"LogFile", INI_PARAM_LOG_FILE},
|
||||||
{"PrivacyMode", INI_PARAM_PRIVACY_MODE},
|
{"PrivacyMode", INI_PARAM_PRIVACY_MODE},
|
||||||
|
{"CountingReq", INT_PARAM_COUNTING_REQ},
|
||||||
#ifndef NO_VERBOSE_LOG
|
#ifndef NO_VERBOSE_LOG
|
||||||
{"LogVerbose", INI_PARAM_LOG_VERBOSE},
|
{"LogVerbose", INI_PARAM_LOG_VERBOSE},
|
||||||
#endif // NO_VERBOSE_LOG
|
#endif // NO_VERBOSE_LOG
|
||||||
@@ -296,7 +297,7 @@ static __noreturn void usage()
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
//// ePID randomization level is used
|
//// ePID randomization level is used
|
||||||
#ifndef NO_RANDOM_EPID
|
#ifndef NO_RANDOM_EPID
|
||||||
" -r (0|1|2)\t\tSet randomization level of the ePIDs (default is \"0\")\n\t\t\t\t\"0\" stands for no randomization, which also means VLMCSD will use the default ePID that is built-in. It is useful for emulating/replicating real KMS servers\n\t\t\t\t\"1\" stands for randomization of each KMS request, but it also poses a risk of being detected non-genuine KMS Server, causing clients to fail to be activated\n\t\t\t\t\"2\" is as same as the \"1\" option, but only for debugging\n"
|
" -r (0|1|2)\t\tSet randomization level of the ePIDs (default is \"0\")\n\t\t\t\t\"0\" stands for no randomization, which also means VLMCSD will use the default ePID that is built-in\n\t\t\t\t\"1\" stands for randomization of each KMS request, but it also poses a risk of being detected non-genuine KMS Server\n\t\t\t\t\"2\" is as same as the \"1\" option, but only for debugging\n"
|
||||||
" -C <LCID>\t\tUse fixed Windows Language Code Identifier in random ePIDs\n\t\t\t\tSee https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c for correct LCIDs\n"
|
" -C <LCID>\t\tUse fixed Windows Language Code Identifier in random ePIDs\n\t\t\t\tSee https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c for correct LCIDs\n"
|
||||||
" -H <build>\t\tUse fixed Windows build number for activation\n\t\t\t\tUseful when the client requires a proper KMS Server\n\t\t\t\tSee all build numbers here: https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions\n"
|
" -H <build>\t\tUse fixed Windows build number for activation\n\t\t\t\tUseful when the client requires a proper KMS Server\n\t\t\t\tSee all build numbers here: https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions\n"
|
||||||
#endif // NO_RANDOM_EPID
|
#endif // NO_RANDOM_EPID
|
||||||
@@ -362,8 +363,8 @@ static __noreturn void usage()
|
|||||||
" -K (0|1|2|3)\t\tSet white-listing level which product VLMCSD accepts or refuses (default 0)\n\t\t\t\t\"0\" Activate all products with an unknown, retail or beta/preview KMS IDs\n\t\t\t\t\"1\" Activate products with a retail or beta/preview KMS ID but refuse to activate products with an unknown KMS ID\n\t\t\t\t\"2\" Activate products with an unknown KMS ID but refuse products with a retail or beta/preview KMS ID\n\t\t\t\t\"3\" Activate only products with a known volume license RTM KMS ID and refuse all others\n"
|
" -K (0|1|2|3)\t\tSet white-listing level which product VLMCSD accepts or refuses (default 0)\n\t\t\t\t\"0\" Activate all products with an unknown, retail or beta/preview KMS IDs\n\t\t\t\t\"1\" Activate products with a retail or beta/preview KMS ID but refuse to activate products with an unknown KMS ID\n\t\t\t\t\"2\" Activate products with an unknown KMS ID but refuse products with a retail or beta/preview KMS ID\n\t\t\t\t\"3\" Activate only products with a known volume license RTM KMS ID and refuse all others\n"
|
||||||
" -c (0|1)\t\tDisable (0)/Enable (1) client time checking\n\t\t\t\tIf the client time is different than 4 hours compare to the KMS Host, the host will deny the activation (default 0)\n\t\t\t\tNote: It is recommended that the VLMCSD has a reliable time service (e.g. sync the time with time.windows.com)\n"
|
" -c (0|1)\t\tDisable (0)/Enable (1) client time checking\n\t\t\t\tIf the client time is different than 4 hours compare to the KMS Host, the host will deny the activation (default 0)\n\t\t\t\tNote: It is recommended that the VLMCSD has a reliable time service (e.g. sync the time with time.windows.com)\n"
|
||||||
#ifndef NO_CLIENT_LIST
|
#ifndef NO_CLIENT_LIST
|
||||||
" -M (0|1)\t\tDisable (0)/Enable (1) maintaining clients (default 0)\n\t\t\t\tNote: Enabling this service is not recommended, except you have to do so to prevent the activation failling\n\t\t\t\tIt is because the VLMCSD can only keep maximum of 16777215 clients. If that number exceed, VLMCSD will no longer accept any new connect, nor activation requests\n"
|
" -M (0|1)\t\tDisable (default, 0)/Enable (1) maintaining clients\n\t\t\t\tNote: Enabling this service is not recommended, except you have to do so to prevent the activation failling\n\t\t\t\tIt is because the VLMCSD can only keep maximum of 16777215 clients. If that number exceed, VLMCSD will no longer accept any new connect, nor activation requests\n"
|
||||||
" -E (0|1)\t\tDisable (0)/Enable (1) starting VLMCSD with empty client list (Default 0)\n\t\t\t\tNote: It is recommended to keep the default, because Office will not activate unless your KMS Host has at least 5 active clients.\n\t\t\t\tSee more: https://learn.microsoft.com/en-us/office/troubleshoot/administration/0xc004f038-computer-not-activate\n"
|
" -E (0|1)\t\tDisable (default, 0)/Enable (1) starting VLMCSD with empty client list\n\t\t\t\tNote: It is recommended to keep the default, because Office will not activate unless your KMS Host has at least 5 active clients.\n\t\t\t\tSee more: https://learn.microsoft.com/en-us/office/troubleshoot/administration/0xc004f038-computer-not-activate\n"
|
||||||
#endif // !NO_CLIENT_LIST
|
#endif // !NO_CLIENT_LIST
|
||||||
#endif // !NO_STRICT_MODES
|
#endif // !NO_STRICT_MODES
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@@ -374,42 +375,42 @@ static __noreturn void usage()
|
|||||||
#if !defined(NO_TIMEOUT) && !__minix__
|
#if !defined(NO_TIMEOUT) && !__minix__
|
||||||
" -t <seconds>\t\tDisconnect client after an amount of time of inactivity (default 30)\n"
|
" -t <seconds>\t\tDisconnect client after an amount of time of inactivity (default 30)\n"
|
||||||
#endif // !defined(NO_TIMEOUT) && !__minix__
|
#endif // !defined(NO_TIMEOUT) && !__minix__
|
||||||
" -d\t\t\tDisconnect each client after processing one activation request.\n"
|
" -d\t\t\tDisconnect each client after processing one activation request\n"
|
||||||
" -k\t\t\tDo not disconnect clients after processing an activation request (default if \"-d\" defined in external VLMCSD configuration file).\n"
|
" -k\t\t\tDo not disconnect clients after processing an activation request (default if \"-d\" defined in external VLMCSD configuration file)\n"
|
||||||
#ifndef SIMPLE_RPC
|
#ifndef SIMPLE_RPC
|
||||||
" -N (0|1)\t\tDisable (0)/Enable (default, 1) NDR64. Only useful when on Windows Vista/7 32-bit, where enabling NDR64 will make VLMCSD by running higher Windows build number.\n"
|
" -N (0|1)\t\tDisable (0)/Enable (default, 1) NDR64. Only useful when on Windows Vista/7 32-bit, where enabling NDR64 will make VLMCSD by running higher Windows build number\n"
|
||||||
" -B (0|1)\t\tDisable (0)/Enable (1) bind time feature negotiation in RPC protocol.\n"
|
" -B (0|1)\t\tDisable (0)/Enable (1) bind time feature negotiation in RPC protocol\n"
|
||||||
#endif // !SIMPLE_RPC
|
#endif // !SIMPLE_RPC
|
||||||
#endif // USE_MSRPC
|
#endif // USE_MSRPC
|
||||||
#ifndef NO_PID_FILE
|
#ifndef NO_PID_FILE
|
||||||
" -p <file>\t\tCreate pid file filename. This is used by standard init scripts (typically found in \"/etc/init.d\").\n"
|
" -p <file>\t\tCreate pid file filename. This is used by standard init scripts (typically found in \"/etc/init.d\")\n"
|
||||||
#endif // NO_PID_FILE
|
#endif // NO_PID_FILE
|
||||||
#ifndef NO_INI_FILE
|
#ifndef NO_INI_FILE
|
||||||
" -i <file>\t\tUse external VLMCSD configuration file. Default name of that file is \"vlmcsd.ini\".\n"
|
" -i <file>\t\tUse external VLMCSD configuration file. Default name of that file is \"vlmcsd.ini\"\n"
|
||||||
#endif // NO_INI_FILE
|
#endif // NO_INI_FILE
|
||||||
#ifndef NO_EXTERNAL_DATA
|
#ifndef NO_EXTERNAL_DATA
|
||||||
" -j <file>\t\tUse external VLMCSD ePID database. Default name of that file is \"vlmcsd.kmd\".\n"
|
" -j <file>\t\tUse external VLMCSD ePID database. Default name of that file is \"vlmcsd.kmd\"\n"
|
||||||
#endif // !NO_EXTERNAL_DATA
|
#endif // !NO_EXTERNAL_DATA
|
||||||
#ifndef NO_CUSTOM_INTERVALS
|
#ifndef NO_CUSTOM_INTERVALS
|
||||||
" -R <interval>\t\tRenew activation every <interval> (default 1w).\n"
|
" -R <interval>\t\tRenew activation every <interval> (default 1w)\n"
|
||||||
" -A <interval>\t\tRetry activation every <interval>, if the previous activation/reactivation is failed (default 2h).\n"
|
" -A <interval>\t\tRetry activation every <interval>, if the previous activation/reactivation is failed (default 2h)\n"
|
||||||
#endif // NO_CUSTOM_INTERVALS
|
#endif // NO_CUSTOM_INTERVALS
|
||||||
#ifndef NO_LOG
|
#ifndef NO_LOG
|
||||||
" -l <file>\t\tWrites VLMCSD log into a file. Note: Make sure you have read+write access to that file.\n"
|
" -l <file>\t\tWrites VLMCSD log into a file. Note: Make sure you have rw access to that file\n"
|
||||||
" -T0, -T1\t\tDisable (0)/Enable logging client connection with time and date (default 1).\n"
|
" -T0, -T1\t\tDisable (0)/Enable (default, 1) logging client connection with time and date\n"
|
||||||
#ifndef PRIVACY_ON
|
#ifndef PRIVACY_ON
|
||||||
" -X\t\t\tAllow running in Privacy Mode (experiment).\n"
|
" -X\t\t\tAllow running in Privacy Mode (hide detail of incoming and response requests)\n"
|
||||||
#endif // PRIVACY_ON
|
#endif // PRIVACY_ON
|
||||||
|
" -w\t\t\tDisplay total KMS requests\n"
|
||||||
#ifndef NO_VERBOSE_LOG
|
#ifndef NO_VERBOSE_LOG
|
||||||
" -v\t\t\tAllow logging verbose.\n"
|
" -v\t\t\tAllow logging verbose\n"
|
||||||
" -q\t\t\tDon't allow log verbose (default).\n"
|
" -q\t\t\tDon't allow log verbose (default)\n"
|
||||||
#endif // NO_VERBOSE_LOG
|
#endif // NO_VERBOSE_LOG
|
||||||
#endif // NO_LOG
|
#endif // NO_LOG
|
||||||
#ifndef NO_VERSION_INFORMATION
|
#ifndef NO_VERSION_INFORMATION
|
||||||
" -V\t\t\tDisplay version information and exit\n"
|
" -V\t\t\tDisplay version information and exit\n"
|
||||||
#endif // NO_VERSION_INFORMATION
|
#endif // NO_VERSION_INFORMATION
|
||||||
,
|
,Version, global_argv[0]);
|
||||||
Version, global_argv[0]);
|
|
||||||
exit(VLMCSD_EINVAL);
|
exit(VLMCSD_EINVAL);
|
||||||
}
|
}
|
||||||
#endif // HELP
|
#endif // HELP
|
||||||
@@ -681,6 +682,10 @@ static BOOL setIniFileParameter(uint_fast8_t id, const char *const iniarg)
|
|||||||
break;
|
break;
|
||||||
#endif // PRIVACY_ON
|
#endif // PRIVACY_ON
|
||||||
|
|
||||||
|
case INT_PARAM_COUNTING_REQ:
|
||||||
|
isCounting = getIniFileArgumentBool(&isCounting, iniarg);
|
||||||
|
break;
|
||||||
|
|
||||||
case INI_PARAM_LOG_FILE:
|
case INI_PARAM_LOG_FILE:
|
||||||
fn_log = vlmcsd_strdup(iniarg);
|
fn_log = vlmcsd_strdup(iniarg);
|
||||||
break;
|
break;
|
||||||
@@ -1293,6 +1298,11 @@ static void parseGeneralArguments()
|
|||||||
break;
|
break;
|
||||||
#endif // PRIVACY_ON
|
#endif // PRIVACY_ON
|
||||||
|
|
||||||
|
case 'w':
|
||||||
|
isCounting = TRUE;
|
||||||
|
ignoreIniFileParameter(INT_PARAM_COUNTING_REQ);
|
||||||
|
break;
|
||||||
|
|
||||||
#ifndef NO_SOCKETS
|
#ifndef NO_SOCKETS
|
||||||
#if !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
#if !defined(USE_MSRPC) && !defined(SIMPLE_SOCKETS)
|
||||||
case 'L':
|
case 'L':
|
||||||
@@ -2027,6 +2037,10 @@ int newmain()
|
|||||||
logger("Privacy mode is turned on\n");
|
logger("Privacy mode is turned on\n");
|
||||||
#endif //PRIVACY_ON
|
#endif //PRIVACY_ON
|
||||||
|
|
||||||
|
if (isCounting == TRUE) {
|
||||||
|
logger("Counting request is turned on\n");
|
||||||
|
}
|
||||||
|
|
||||||
#endif // !defined(NO_LOG) && !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
#endif // !defined(NO_LOG) && !defined(NO_SOCKETS) && !defined(USE_MSRPC)
|
||||||
|
|
||||||
#if defined(_NTSERVICE) && !defined(USE_MSRPC)
|
#if defined(_NTSERVICE) && !defined(USE_MSRPC)
|
||||||
@@ -2055,12 +2069,12 @@ int __stdcall WinStartUp(void)
|
|||||||
{
|
{
|
||||||
WCHAR** szArgList;
|
WCHAR** szArgList;
|
||||||
int argc;
|
int argc;
|
||||||
|
|
||||||
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
|
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
|
|
||||||
int i;
|
|
||||||
char** argv = (char**)vlmcsd_malloc(sizeof(char*) * argc);
|
char** argv = (char**)vlmcsd_malloc(sizeof(char*) * argc);
|
||||||
|
|
||||||
for (i = 0; i < argc; i++)
|
for (int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
|
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
|
||||||
argv[i] = (char*)vlmcsd_malloc(size);
|
argv[i] = (char*)vlmcsd_malloc(size);
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ extern char *fn_log;
|
|||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#if _MSC_VER
|
||||||
|
#include <windows.h>
|
||||||
|
#include <shellapi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
//int main(int argc, CARGV);
|
//int main(int argc, CARGV);
|
||||||
extern void cleanup();
|
extern void cleanup();
|
||||||
|
|
||||||
@@ -57,6 +62,7 @@ int server_main(int argc, CARGV argv);
|
|||||||
#define INI_PARAM_VPN 29
|
#define INI_PARAM_VPN 29
|
||||||
#define INI_PARAM_EXIT_LEVEL 30
|
#define INI_PARAM_EXIT_LEVEL 30
|
||||||
#define INI_PARAM_PRIVACY_MODE 31
|
#define INI_PARAM_PRIVACY_MODE 31
|
||||||
|
#define INT_PARAM_COUNTING_REQ 32
|
||||||
|
|
||||||
#define INI_FILE_PASS_1 1
|
#define INI_FILE_PASS_1 1
|
||||||
#define INI_FILE_PASS_2 2
|
#define INI_FILE_PASS_2 2
|
||||||
|
|||||||
@@ -108,12 +108,12 @@ int __stdcall WinStartUp(void)
|
|||||||
{
|
{
|
||||||
WCHAR** szArgList;
|
WCHAR** szArgList;
|
||||||
int argc;
|
int argc;
|
||||||
|
|
||||||
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
|
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
|
|
||||||
int i;
|
|
||||||
char** argv = (char**)vlmcsd_malloc(sizeof(char*) * argc);
|
char** argv = (char**)vlmcsd_malloc(sizeof(char*) * argc);
|
||||||
|
|
||||||
for (i = 0; i < argc; i++)
|
for (int i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
|
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
|
||||||
argv[i] = (char*)vlmcsd_malloc(size);
|
argv[i] = (char*)vlmcsd_malloc(size);
|
||||||
|
|||||||
Reference in New Issue
Block a user