Giter Club home page Giter Club logo

vlmcsd's People

Contributors

gnaggnoyil avatar rouben avatar simonsmh avatar wind4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vlmcsd's Issues

build faild by openssl 1.1

crypto_openssl.c: In function 'Sha256HmacInit_OpenSSL':
crypto_openssl.c:18:2: warning: implicit declaration of function 'HMAC_CTX_init'; did you mean 'HMAC_CTX_new'? [-Wimplicit-function-declaration]
HMAC_CTX_init(c);
^~~~~~~~~~~~~
HMAC_CTX_new
crypto_openssl.c: In function 'Sha256HmacFinish_OpenSSL':
crypto_openssl.c:36:2: warning: implicit declaration of function 'HMAC_CTX_cleanup'; did you mean 'HMAC_CTX_get_md'? [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(c);
^~~~~~~~~~~~~~~~
HMAC_CTX_get_md
crypto_openssl.c: In function 'Sha256Hmac':
crypto_openssl.c:42:11: error: storage size of 'Ctx' isn't known
HMAC_CTX Ctx;
^~~
crypto_openssl.c:42:11: warning: unused variable 'Ctx' [-Wunused-variable]
crypto_openssl.c:59:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[1]: *** [../build/crypto_openssl.o] Error 1
make: *** [vlmcsd] Error 2

Custom vlmcsd

Thank Wind4, this portable very good.
Now i want to add new key active for a new production, how to do or custom it?
Thank

Linux Release for Build 1112

When can we expect version 1112 to be release for Linux? I was able to download the current 1112 release for Windows, but I did not find the proper makefile for Linux.

Possible OS Command Injection

This causes a new process to execute and is difficult to use safely.

Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run.

LABEL: Bug
SEVERITY: Major
SOLUTION: Application path in first argument
COMMON WEAKNESS ENUMERATION INDEX: CWE-78

Instances found in the GitHub repository:

  • src\vlmcsd.c:954
  • src\vlmcsd.c:950

It's better to use UNIX line endings (LF) in ini

vlmcsd.ini uses Windows line endings (CR LF)

This cause problems on some UNIX systems. For example, my Mi Router 3G with Padavan firmware

My vlmcsd.ini:

# Listen on all private IP addresses and reject incoming requests from public IP addresses
# Command line: -o
PublicIPProtectionLevel = 3
/etc/storage # ./vlmcsd -i /etc/storage/vlmcsd.ini
". Must be integer between 0 and 3ine 55: "PublicIPProtectionLevel = 3

Converting ini to LF solves problem.

Update KMD DB

There are some new products f.e. Office 2019. Or instruction how to add entries to the KMD

Feature request: Rejecting all activation requests

I suggest adding a feature to the -K switch(e.g. -K99), to reject all activation requests, regardless the validity of the requests.

Hoping that this feature could help sysadmins, to identify KMS clients that were missed out from new deployments, while the original KMS server cannot be taken offline yet due to various reasons.

Can't build on Debian Jessie

Just cloned the repo locally into Debian Jessie (64 bit - headless server). According to README.compile-and-pre-built-binaries if gcc is installed it should build with just make.

# apt-cache policy gcc
gcc:
  Installed: 4:4.9.2-2
  Candidate: 4:4.9.2-2
  Version table:
 *** 4:4.9.2-2 0
        500 http://http.debian.net/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status

Unfortunately it's not building for me :(

# make
make[1]: Entering directory '/usr/local/src/vlmcsd/src'
fatal: No annotated tags can describe 'b8fdaf9a6bca531306bd8818df46ce43138efa19'
However, there were unannotated tags: try --tags.
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/local/src/vlmcsd/src'

I note that what is described in the error matches the most recent commit ID:

# git log -1
commit b8fdaf9a6bca531306bd8818df46ce43138efa19
Author: Wind4 <[email protected]>
Date:   Wed Nov 16 12:12:36 2016 +0800

    vlmcsd-1103-2016-11-05-Hotbird64

Any ideas?

0x87E10BC6 when running slmgr -ato

Attempting to activate Windows Server 2019 Datacenter initially succeeds but during subsequent attempts to activate will return 0x87E10BC6. Additionally, the "Activate Windows" watermark appears in the lower right.

Can't build vlmsc with GCC 9.2

Hello!
Linker can't find libresolv because TARGETPLATFORM in makefile is empty.
Locale and language is ru_RU.UTF-8.
When I set en_US.UTF8 to LC_ALL instead LANG, all work perfect.
No problem with GCC 8.2, 7.3.

bash-5.0# LANG=en_US.UTF8 cc -v 2>&1
Используются внутренние спецификации.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Целевая архитектура: x86_64-pc-linux-gnu
Параметры конфигурации: ../gcc-9.2.0/configure --prefix=/usr --disable-multilib --disable-bootstrap --with-system-zlib --disable-libmpx
Модель многопоточности: posix
gcc версия 9.2.0 (GCC)

bash-5.0# LC_ALL=en_US.UTF8 cc -v 2>&1
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-9.2.0/configure --prefix=/usr --disable-multilib --disable-bootstrap --with-system-zlib --disable-libmpx
Thread model: posix
gcc version 9.2.0 (GCC)

How to determine activated application from the logs

I'm trying to decipher how to determine what product is being activated. Windows/Office? What version?

Looking at logs, the best I see are entries like this:

Line 20977: 2020-11-20 23:45:27: Application ID                  : 0ff1ce15-a989-479d-af46-f275c6370663 (Unknown)
Line 20999: 2020-11-20 23:45:31: Application ID                  : 55c92734-d682-4d71-983e-d6ec3f16059f (Unknown)

I assume the first is Office, unless that is a highly coincidental GUID which looks a lot like "office."
But, I don't see anywhere in plain-text what the activated product is.

How can one decipher the logs for this?

vlmcsd not binding?

vlmcsdmulti-Windows-x64.exe vlmcsd -v
Warning: [::]:1688: An attempt was made to access a socket in a way forbidden by its access permissions.
Warning: 0.0.0.0:1688: An attempt was made to access a socket in a way forbidden by its access permissions.
Fatal: Could not listen on any socket.

WIN10 EE get error 0x8007000D for mingw32/64 vlmcsd ,BUT working good in linux vlmcsd .

ubuntu64 17XX ,
all the gcc version are 6.3 , vlmcs -l 11 127.0.01
when " make CC=gcc/arm-linux-/mipsel-linux- " , run vlmcsd , WIN10 EE not any error !!
Sending activation request (KMS V6) 1 of 1 -> 03612-00206-507-155388-03-2067-14393.0000-2512016 (3A1C049600B60076)
when " make CC=**-w64-mingw32-gcc " , run vlmcsd , WIN10 EE say 0x8007000D error
Sending activation request (KMS V6) 1 of 1 -> 03612-00206-503-210187-03-3081-14393.0000-0022017 (3A1C049600B60076)

:D , Very insteresting !

WMC

Can vlmcsd activate Windows Media Center (WMC) 8.1?

The Software Licensing Service reported that the product SKU is not found

When I activate office2016, I type "cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99",Prompt message:

Microsoft (R) Windows Script Host Version 5.812
版权所有(C) Microsoft Corporation。保留所有权利。

---Processing--------------------------

ERROR CODE: 0xC004F069
ERROR DESCRIPTION: The Software Licensing Service reported that the product SKU is not found.

---Exiting-----------------------------

Error 0x8007000d even with TAP adapter installed.

Hello. First of all, I would like to thank you very much for putting the effort into creating this project.

I am experiencing an issue. I am trying to activate MondoVolume that is installed on a machine that I have.

I think I did all the steps correctly. I installed OpenVPN TAP adapter 9.21.2, I point my KMS server using "cscript //nologo ospp.vbs /sethst:" to 10.10.10.9 (10.10.10.10 does not work), I opened a firewall rule for vlmcsd, and then I run vlmcsd with "-O ." parameter (I do not use -s because I do not want it to run as a service). For some reason, I still receive the error 0x8007000d.

If I ping 10.10.10.9, I successfully get a response back so the TAP adapter must be working.
If I send an activation request to 10.10.10.9 using vlmcs, I successfully get a response back as well.
If I run vlmcsd on a different machine on the network and point my KMS server to the IP of that machine, I successfully activate Mondo.

Any help would be highly appreciated. Thank you.

Buffer copy without checking size of input

Does not check for buffer overflows.

LABEL: Bug
SEVERITY: Major
SOLUTION: Use sprintf_s, snprintf, or vsnprintf.
COMMON WEAKNESS ENUMERATION INDEX: CWE-120

Instances found in the GitHub repository:

  • src\kms.c:281
  • src\output.c:168

logfile in vlmcsd.ini is not working

hi:
I tried vlmcsd version svn1112.
vlmcsd -l /var/log/vlmscd.log -D => it works fine.
vlmcsd -i /etc/vlmcsd/vlmcsd.ini -D ( "logfile =/var/log/vlmcsd.log" defined at vlmcsd.ini) => not working. there is nothing in the log file.

other parameter like "logverbose = true" defined at vlmcsd.ini is working fine. but "logfile" is not.

vlmcsd on windows without tap adapter

Hello,
thank you for this software.

Can i install on windows without a tap adapter?
i know kms not working on 127.0.0.1 so i execute this steps

cmd as admin
netsh int ip add addr 1 192.168.123.2/32 st=persistent sk=tr

then
slmgr /skms 192.168.123.2
slmgr /ato

but not work...

i wrong in something?

Thank you

gh-pages

What is gh-pages branch used for?

OpenBSD 6.1/5.9 amd64 compile failing

vlmcsd fails to compile with error in file './src/kms.c'on line 187:
kms.c:(.text.InitializeClientLists+0xbb): undefined reference to `pthread_mutexattr_setpshared'

Tested on OpenBSD 5.9 and 6.1; got the same error.

Output:

user@xxx:vlmcsd-master $ uname -a
OpenBSD xxxxxxxxxx 5.9 GENERIC.MP#0 amd64
user@xxx:vlmcsd-master $ gmake
gmake[1]: Entering directory '/home/user/vlmcsd-master/src'
        CC      vlmcs.o <- vlmcs.c
        CC      kmsdata-full.o <- kmsdata-full.c
        CC      crypto.o <- crypto.c
        CC      endian.o <- endian.c
        CC      kms.o <- kms.c
        CC      output.o <- output.c
        CC      helpers.o <- helpers.c
        CC      shared_globals.o <- shared_globals.c
        CC      network.o <- network.c
        CC      rpc.o <- rpc.c
        CC      crypto_internal.o <- crypto_internal.c
kms.c: In function 'InitializeClientLists':
kms.c:185: warning: implicit declaration of function 'pthread_mutexattr_setpshared'
        CC      dns_srv.o <- dns_srv.c
        CC      ns_parse.o <- ns_parse.c
        CC      ns_name.o <- ns_name.c
        CC      kmsdata.o <- kmsdata.c
        CC      vlmcsd.o <- vlmcsd.c
        LD      ../bin/vlmcs <- vlmcs.o kmsdata-full.o crypto.o kms.o endian.o output.o shared_globals.o helpers.o network.o rpc.o crypto_internal.o dns_srv.o ns_parse.o ns_name.o
../build/vlmcs.o: In function `updateIniFile':
/home/user/vlmcsd-master/src/vlmcs.c:982: warning: warning: strcpy() is almost always misused, please use strlcpy()
../build/vlmcs.o: In function `CreateRequestBase':
/home/user/vlmcsd-master/src/vlmcs.c:1391: warning: warning: rand() may return deterministic values, is that what you want?
../build/vlmcs.o: In function `updateIniFile':
/home/user/vlmcsd-master/src/vlmcs.c:983: warning: warning: strcat() is almost always misused, please use strlcat()
../build/kms.o: In function `itoc':
/home/user/vlmcsd-master/src/kms.c:239: warning: warning: sprintf() is often misused, please use snprintf()
        LD      ../bin/vlmcsd <- vlmcsd.o kmsdata.o crypto.o kms.o endian.o output.o shared_globals.o helpers.o network.o rpc.o crypto_internal.o
../build/kms.o: In function `itoc':
/home/user/vlmcsd-master/src/kms.c:229: warning: warning: strcpy() is almost always misused, please use strlcpy()
../build/kms.o: In function `get16RandomBytes':
/home/user/vlmcsd-master/src/kms.c:691: warning: warning: rand() may return deterministic values, is that what you want?
../build/kms.o: In function `itoc':
/home/user/vlmcsd-master/src/kms.c:238: warning: warning: strcat() is almost always misused, please use strlcat()
/home/user/vlmcsd-master/src/kms.c:239: warning: warning: sprintf() is often misused, please use snprintf()
../build/kms.o: In function `InitializeClientLists':
kms.c:(.text.InitializeClientLists+0xbb): undefined reference to `pthread_mutexattr_setpshared'
collect2: ld returned 1 exit status
GNUmakefile:601: recipe for target '../bin/vlmcsd' failed
gmake[1]: *** [../bin/vlmcsd] Error 1
gmake[1]: Leaving directory '/home/user/vlmcsd-master/src'
GNUmakefile:110: recipe for target 'all' failed
gmake: *** [all] Error 2

hide tap or connection with it

Hello,
i write on ticket
#16
but it's closed.

can i hide tap adapter ?
because my problem is when i am offline (without wireless network or ethernet connection) windows 10 show tray icon with an alert ... seems i have problem with internet instead i don't have any connection...

so there is a way to hide adapter or connection with it?

thank you againg

How to build a statically-linked binary

I try to run the following command:

$ git clone https://github.com/Wind4/vlmcsd
$ cd vlmcsd
$ make

And I can find the binary in the bin directory.

But how to build a statically-linked binary? Thanks for your help.

Error 0x803f7001 on a computer running non-core edition

When I point my new win10 vm to vlmcsd running in a container on my server, I'm getting an odd error.

C:\Windows\system32>ver Microsoft Windows [Version 10.0.19043.1052]
When I set slmgr/skms to point to my server, i get a positive message saying that it was pointed properly.
When i run slmgr /ato, it sends a pop window that says "error 0x803f7001 on a computer running Microsoft Windows non-core edition, run slui.exe 0x803f7001 to display the error text."

When I run slui.exe 0x803f7001, it doesn't appear to do anything. No error, no output, no feedback... just line feed and back to the prompt.

I downloaded the ISO directly from microsoft using the media creation tool. when i run slmgr /xpr, it says "windows professional edition: windows is in notification mode."

Has something changed? Did I miss a step? Is there a way to double check which version of windows I installed? I always install pro, but maybe I clicked the wrong one this time... but I don't know how to tell. The error seems like something I would get while trying to activate the wrong version...

Error installing

Here's the command's output:

root@743:~/KMS/scripts# ./install.sh
--2016-09-01 07:42:44-- https://wind4.github.io/vlmcsd/scripts/install-debian.sh
Resolving wind4.github.io (wind4.github.io)... 151.101.56.133
Connecting to wind4.github.io (wind4.github.io)|151.101.56.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1163 (1.1K) [application/x-sh]
Saving to: ‘vlmcsd-debian.sh’

100%[==========================================================>] 1,163 --.-K/s in 0s

2016-09-01 07:42:44 (158 MB/s) - ‘vlmcsd-debian.sh’ saved [1163/1163]

Downloading vlmcsd ...
Downloading startup script ...
Configuring deamon ...
update-rc.d: warning: /etc/init.d/vlmcsd missing LSB information
update-rc.d: see http://wiki.debian.org/LSBInitScripts
Adding system startup for /etc/init.d/vlmcsd ...
/etc/rc0.d/K20vlmcsd -> ../init.d/vlmcsd
/etc/rc1.d/K20vlmcsd -> ../init.d/vlmcsd
/etc/rc6.d/K20vlmcsd -> ../init.d/vlmcsd
/etc/rc2.d/S20vlmcsd -> ../init.d/vlmcsd
/etc/rc3.d/S20vlmcsd -> ../init.d/vlmcsd
/etc/rc4.d/S20vlmcsd -> ../init.d/vlmcsd
/etc/rc5.d/S20vlmcsd -> ../init.d/vlmcsd
/etc/init.d/vlmcsd: 13: /etc/init.d/vlmcsd: source: not found
Starting service...
Service started.
Installed successfully.

However, I can't activate Windows since I received error about not being able to reach the activation server. Based on above output, am I missing something?

Thanks.

RDS CAL

EXCELLENT PROJECT. A big thank you to the author(s)

Is it possible to extend the project in the future to support RDS CAL activation?

Thanks again

Can't reach KMS host

Windows 10 still can't reach KMS host for activation, even after successful installation of service in Ubuntu.

vlmcsd.log

2016-09-01 17:52:15: Listening on [::]:1688
2016-09-01 17:52:15: Listening on 0.0.0.0:1688
2016-09-01 17:52:15: vlmcsd svn1003, built 2016-08-27 18:13:16 UTC started successfully

netstat -tuple

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 :ssh *: LISTEN root 8729 811/sshd
tcp 0 0 :1688 *: LISTEN root 9304 875/vlmcsd
tcp 0 0 :43867 *: LISTEN root 10080 1045/python
tcp6 0 0 [::]:ssh [::]:* LISTEN root 8732 811/sshd
tcp6 0 0 [::]:1688 [::]:* LISTEN root 9303 875/vlmcsd
tcp6 0 0 [::]:https [::]:* LISTEN root 11659 1338/docker-proxy
tcp6 0 0 [::]:mdns [::]:* LISTEN root 12274 1454/docker-proxy
tcp6 0 0 [::]:http-alt [::]:* LISTEN root 12835 1374/caddy
tcp6 0 0 [::]:http [::]:* LISTEN root 11826 1424/docker-proxy
udp 0 0 :openvpn *: root 8771 864/openvpn
udp6 0 0 [::]:mdns [::]:* root 12489 1530/docker-proxy
udp6 0 0 [::]:domain [::]:* root 11096 1195/docker-proxy

netstat -ntlp | grep LISTEN

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 811/sshd
tcp 0 0 0.0.0.0:1688 0.0.0.0:* LISTEN 875/vlmcsd
tcp 0 0 0.0.0.0:43867 0.0.0.0:* LISTEN 1045/python
tcp6 0 0 :::22 :::* LISTEN 811/sshd
tcp6 0 0 :::1688 :::* LISTEN 875/vlmcsd
tcp6 0 0 :::443 :::* LISTEN 1338/docker-proxy
tcp6 0 0 :::5353 :::* LISTEN 1454/docker-proxy
tcp6 0 0 :::8080 :::* LISTEN 1374/caddy
tcp6 0 0 :::80 :::* LISTEN 1424/docker-proxy

However, open ports check (yougetsignal.com/tools/open-ports) indicates that port 1688 on my server is closed. ufw is inactive, so does anyone know how I can troubleshoot this?

Error not passed to output cmd

When using the command: START "" /WAIT /b "%~dp0vlmcs-Windows-x64.exe" 192.168.2.14 -v
the output is missing information when the kms server cannot be contacted.

for example; when the kms server can't be contacted, the output from cmd is:

Request Parameters
==================

Protocol version                : 6.0
Client is a virtual machine     : No
Licensing status                : 2 (OOB grace)
Remaining time (0 = forever)    : 43200 minutes
Application ID                  : 55c92734-d682-4d71-983e-d6ec3f16059f (Windows)
SKU ID (aka Activation ID)      : 8de8eb62-bbe0-40ac-ac17-f75595071ea3 (Windows Server 2019 ARM64)
KMS ID (aka KMS counted ID)     : 8449b1fb-f0ea-497a-99ab-66ca96e9a0f5 (Windows Server 2019)
Client machine ID               : e6448d51-6852-48f1-a6d7-4a7df1d5bc4f
Previous client machine ID      : 00000000-0000-0000-0000-000000000000
Client request timestamp (UTC)  : 2022-07-29 21:17:17
Workstation name                : ns1.microsoft.com.tw
N count policy (minimum clients): 5

Connecting to 192.168.2.14:1688 ...

but the error part is missing from the output:

Connecting to 192.168.2.14:1688 ... 192.168.2.14:1688: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Fatal: Could not connect to any KMS server

I know that I can use the Pause or Timeout /t command, but I'm trying to pass the output to a C# application, and I can't get it to work. Is there a solution for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.