↓ 跳过正文
  1. 文章/

快速搭建一个KMS服务器

··409 字·1 分钟
sshuo
作者
sshuo
松鼠A(sshuo),安全研究者。记录渗透测试、安全研究与折腾日常。

KMS用来激活 VOL 版本的 Windows 和 Office。经常能在网上看到有人提供的 KMS 服务器地址,那么你有没有想过自己也来搞一个这样的服务呢?最近看到了大佬的一键脚本点击查看于是写篇文章水一下。以祭我这长了蜘蛛网的博客。

root登录服务器复制粘贴以下命令并回车

wget --no-check-certificate https://github.com/teddysun/across/raw/master/kms.sh && chmod +x kms.sh && ./kms.sh

安装完成后执行以下命令查看端口状态(一般都没啥问题)

netstat -nxtlp | grep 1688


本脚本安装完成后,会将 KMS 服务加入开机自启动

查看运行状态

使用方法
win
管理员身份运行cmd或新建bat文件输入以下内容

/d “%SystemRoot%\system32”

slmgr /skms 你的VPS的IP或者绑定的域名
slmgr /ato
slmgr /xpr

office
同上,命令如下

/d “%ProgramFiles%\Microsoft Office\Office15”

#依次执行下面的命令
cscript ospp.vbs /sethst:你的VPS的IP或者绑定的域名
cscript ospp.vbs /act
cscript ospp.vbs /dstatus

常用命令

启动:/etc/init.d/kms start
停止:/etc/init.d/kms stop
重启:/etc/init.d/kms restart
状态:/etc/init.d/kms status
卸载:./kms.sh uninstall

提示:KMS方式激活是有时间限制的,本文章仅供娱乐

相关文章

php笔记--登陆验证和curl

··578 字·2 分钟
登录验证 # <?php include "config/config.php"; $name = $_POST['name'];//post获得用户名表单值 $passowrd = $_POST['password'];//post获得用户密码单值 if ($name && $passowrd){//如果用户名和密码都不为空 $sql = "select * from user where name = '$name' and password='$passowrd'";//检测数据库是否有对应的username和password的sql $result = mysqli_query($conn,$sql);//执行sql @$rows=mysqli_num_rows($result);//返回一个数值 if($rows){//0 false 1 true session_start(); $_SESSION['username'] = $name; header("refresh:0;url=admin/index.php");//如果成功跳转至welcome.html页面 exit; }else{ echo "用户名或密码错误"; echo " <script> setTimeout(function(){window.location.href='login.php';},1000); </script> ";//如果错误使用js 1秒后跳转到登录页面重试; } }else{//如果用户名或密码有空 echo "表单填写不完整"; echo " <script> setTimeout(function(){window.location.href='login.php';},1000); </script>"; //如果错误使用js 1秒后跳转到登录页面重试; }` ## 权限认证 session_start(); if (!isset($_SESSION['username'])) { echo "<script>window.location.href='../login.php';</script>"; } ?> ## CURL $ch = curl_init();//起手式 curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $a= curl_exec($ch);//获取输出内容 curl_close($ch);//收工 echo "$a";输出内容