kms服务器搭建及测试

47 篇文章 0 订阅
32 篇文章 2 订阅

 vlmcsd代码仓库:https://github.com/Wind4/vlmcsd

搭建步骤

 本次操作环境centos7,通过内网进行搭建

1.安装依赖环境

yum install gcc git make -y

 2.下载源码,编译安装

cd /var/opt/
git clone https://github.com/Wind4/vlmcsd.git
cd vlmcsd
make -j 4 

编译日志如下:

[root@localhost vlmcsd]# make -j 4 
make[1]: warning: -j16 forced in submake: resetting jobserver mode.
make[1]: Entering directory '/var/opt/vlmcsd/src'
	CC	vlmcs.o <- vlmcs.c
	CC	kmsdata-full.o <- kmsdata-full.c
	CC	crypto.o <- crypto.c
	CC	kms.o <- kms.c
	CC	endian.o <- endian.c
	CC	output.o <- output.c
	CC	shared_globals.o <- shared_globals.c
	CC	helpers.o <- helpers.c
	CC	network.o <- network.c
	CC	rpc.o <- rpc.c
	CC	crypto_internal.o <- crypto_internal.c
	CC	dns_srv.o <- dns_srv.c
	CC	vlmcsd.o <- vlmcsd.c
	CC	kmsdata.o <- kmsdata.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
	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
make[1]: Leaving directory '/var/opt/vlmcsd/src'

 可以看到 bin目录下有编译成功后的文件,复制文件到/usr/local/bin/目录下

cp bin/vlmcsd /usr/local/bin/
cp etc/vlmcsd.ini /etc/

默认配置文件如下,默认监听1688端口

#
# 
# 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

启动

# 直接执行命令即可

/usr/local/bin/vlmcsd

# 指定配置文件启动

/usr/local/bin/vlmcsd -i /etc/vlmcsd.ini

 win10专业版测试

10.66.66.79  为刚才搭建的kms服务器的IP地址
@echo off
slmgr /skms 10.66.66.79
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
slmgr /ato
slmgr /xpr

已经成功,有效时间是180天 

 部分key:wokey/README.md at main · nineaiyu/wokey · GitHub

上面操作步骤过于复杂,可以参考下面脚本进行操作

GitHub - massgravel/Microsoft-Activation-Scripts: A Windows and Office activator using HWID / KMS38 / Online KMS activation methods, with a focus on open-source code and fewer antivirus detections.
 

Windows 10/11

 右键单击 Windows 开始菜单并选择 PowerShell 或终端

irm https://massgrave.dev/get | iex

 根据提示操作即可

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值