Sign inSign up

gkuzet/kms

By gkuzet

Updated about 9 years ago

KMS Server written in C

Image
1

50K+

gkuzet/kms repository overview

About

vlmcsd - portable open-source KMS Emulator in C.

Files are from third party programming effort, see https://forums.mydigitallife.net/threads/50234/ and https://github.com/Wind4/vlmcsd

No association.

You can download the source and compile, resulting in following binaries: vlmcs vlmcsd.

The following docker file should automate KMS server deployment (install required packages, download third party GitHub master branch program files, unzip, compile binaries and place in relevant file system area), running vlmcsd in a container instance with -D to run in foreground, hence run as pid 1.

Dockerfile also cleans up installation removing compile directory and downloaded zip from file system.

This could probably be improved further detecting changes in third party repo to trigger automatic docker build, but that seems a bit hard to do or requires further magic (third party web hooks??)

Therefore, automatic docker build will either be triggered manually (when I see third party developer has updated GitHub program version, and trigger manual build) or via docker file changes (less likely) in my linked repo.

While ENTRYPOINT is used, one could use CMD section to provide customised/different start parameters (override CMD parameters when starting container), remembering -D is required to run vlmcsd in foreground (or container will exit).


Container Start (no further CMDs required unless changing/overriding start options, see docker file)

docker run -d -p 1688:1688/tcp --name kms-server gkuzet/kms

Explanation: start in daemon mode (-d), port translate (-p) external host port 1688 to container port 1688, with name (--name) kms-server.

Container access after being started (open bash console into container)

docker exec -ti kms-server /bin/bash

Explanation: execute container interactive (-i) terminal (-t) session using bash (/bin/bash)

Container vlmcsd running state

By default, without specifying further options, vlmcsd listens on all IPs (0.0.0.0) and TCP port 1688. This is done so deoployment is easier, not IP bound specific.

netstat -atun | grep 1688

tcp 0 0 0.0.0.0:1688 0.0.0.0:* LISTEN

As previously stated, one could override CMD parameters when starting a container (for example to only listen on specific IP and/or a different TCP port). See program man pages for all the options.

Log file

By default, log file is written at /var/log/vlmcsd.log

Man page

Man pages have been installed

man vlmcsd

man vlmcs

DOCKERFILE

Dockerfile exec version (preferred)

Treats commands and parameters as an array items. If shell commands need to be executed, invoking shell is required, or they wont be interpreted

FROM ubuntu

MAINTAINER First Last "[email protected]"

RUN ["sh", "-c", "apt-get update && apt-get install -y \

wget \

unzip \

build-essential \

man-db \

"]

RUN ["sh", "-c", "wget https://github.com/Wind4/vlmcsd/archive/master.zip"]

RUN ["sh", "-c", "unzip master.zip"]

WORKDIR /vlmcsd-master

RUN ["sh", "-c", "make"]

WORKDIR /vlmcsd-master/bin

RUN ["sh", "-c", "cp * /usr/local/bin"]

WORKDIR /usr/local/share/man

RUN ["sh", "-c", "mkdir man1 man7 man8"]

WORKDIR /vlmcsd-master/man

RUN ["sh", "-c", "cp vlmcs.1 /usr/local/share/man/man1/"]

RUN ["sh", "-c", "cp vlmcsd.7 /usr/local/share/man/man7/"]

RUN ["sh", "-c", "cp vlmcsd.8 /usr/local/share/man/man8/"]

RUN ["sh", "-c", "mandb"]

WORKDIR /

RUN ["sh", "-c", "rm -rf /vlmcsd-master"]

RUN ["sh", "-c", "rm master.zip"]

ENTRYPOINT ["/usr/local/bin/vlmcsd", "-D"]

CMD ["-l", "/var/log/vlmcsd.log"]

EXPOSE 1688

Dockerfile shell version (not so preferred, due to behaviour of ENTRYPOINT ignoring CMD arguments)

Commands can be run as normal shell instead of array of commands. Unfortunately using shell line can cause issues, so its better to follow preferred exec version.

NOTE

vlmcsd is

  • a replacement for Microsoft's KMS server
  • It contains vlmcs, a KMS test client, mainly for debugging purposes, that also can "charge" a genuine KMS server designed to run on an always-on or often-on device, e.g. router, NAS Box, ...
  • intended to help people who lost activation of their legally-owned licenses, e.g. due to a change of hardware (motherboard, CPU, ...)

vlmcsd is not

  • a one-click activation or crack tool
  • intended to activate illegal copies of software (Windows, Office, Project, Visio)

Caveat emptor

Tag summary

Content type

Image

Digest

Size

149.8 MB

Last updated

about 9 years ago

docker pull gkuzet/kms