Skip to content

Instantly share code, notes, and snippets.

@test482
Last active April 19, 2024 16:34
Show Gist options
  • Save test482/e195d639567628956803ed1403fded84 to your computer and use it in GitHub Desktop.
Save test482/e195d639567628956803ed1403fded84 to your computer and use it in GitHub Desktop.
vlmcsd usage

VLMCSD usage

deploy server

  • Docker

    curl -LO 'https://gist.githubusercontent.com/test482/e195d639567628956803ed1403fded84/raw/Dockerfile'
    docker build -t vlmcsd:local-v1 .
    # Build multi arch
    # docker buildx build --platform linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 -t vlmcsd:local-v1 .
    
    docker run --name vlmcsd --restart unless-stopped -itd -p 1688:1688 vlmcsd:local-v1
  • Termux (Android)

    curl -Lo ~/kms.sh 'https://gist.githubusercontent.com/test482/e195d639567628956803ed1403fded84/raw/py-kms-on-termux.sh' && chmod +x ~/kms.sh && ~/kms.sh
  • Arch Linux

    https://aur.archlinux.org/packages/vlmcsd-git

client usage

  • command line way

    Start a Command Prompt as an Administrator.

    # activation windows
    ## https://learn.microsoft.com/en-us/windows-server/get-started/  kms-client-activation-keys
    ## example
    ## slmgr /upk | slmgr /skms 192.168.1.1 | slmgr /ipk   M7XTQ-FN8P6-TTKYV-9D4CC-J462D | slmgr /ato
    slmgr /upk | slmgr /skms <server IP address> | slmgr /ipk <Generic Volume License Key> | slmgr /ato
    
    # activation office
    ## https://learn.microsoft.com/en-us/DeployOffice/vlactivation/gvlks
    ## example
    ## cd "C:\Program Files\Microsoft Office\Office16"
    cd "Your Office Directory, Program Files (x86) for 32-bit office"
    cscript ospp.vbs /sethst:<server IP address>
    cscript ospp.vbs /inpkey:<Generic Volume License Key>
    cscript ospp.vbs /act
  • GUI tool

    • Windows:
      • use CMWTAT_Digital_Edition to switch between different editions of Windows or activation Windows by digital license.
    • Office

check status

# Windows
slmgr /dli

# Office
cscript ospp.vbs /dstatus
FROM alpine:latest as builder
WORKDIR /root
RUN apk add --no-cache git make build-base && \
git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git && \
cd vlmcsd/ && \
make
FROM alpine:latest
WORKDIR /root/
COPY --from=builder /root/vlmcsd/bin/vlmcsd /usr/bin/vlmcsd
EXPOSE 1688/tcp
CMD [ "/usr/bin/vlmcsd", "-D", "-d", "-e" ]
#! /usr/bin/env bash
# you may wanna run `termux-change-repo` first
install_dpes() {
if [ -d "$HOME/py-kms" ]; then
return 0
fi
echo '[🛠] Installing git python ...'
pkg update && pkg upgrade -y && pkg install git python
echo '[✈️] Clone py-kms repo to HOME ...'
git clone https://github.com/Py-KMS-Organization/py-kms.git ~/py-kms >/dev/null 2>&1
echo '[⚙️] Installing py-kms deps ...'
pip3 install -r ~/py-kms/requirements.txt >/dev/null 2>&1
}
run_pykms() {
echo '[🤖] Running py-kms ...'
python3 ~/py-kms/py-kms/pykms_Server.py --logfile "FILEOFF"
}
# main
install_dpes
run_pykms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment