diff --git a/src/KeysWeb.php b/src/KeysWeb.php deleted file mode 100644 index 5da6a7d..0000000 --- a/src/KeysWeb.php +++ /dev/null @@ -1,22 +0,0 @@ -'; - echo ''; - echo ''; - echo "$header
"; - foreach ($kmsKeys as $title => $keys) { - echo "

$title

"; - echo ''; - foreach ($keys as $caption => $key) { - echo ""; - } - echo '
操作系统KMS密钥
$caption$key
'; - } - echo '
'; -} - -require_once 'Basis.php'; - -$keys = getKeys(); -showKeysWeb($keys, 'Windows KMS Keys'); diff --git a/src/KmsWeb.php b/src/KmsWeb.php new file mode 100644 index 0000000..5cbc72c --- /dev/null +++ b/src/KmsWeb.php @@ -0,0 +1,36 @@ +'; + echo ''; + echo ''; + echo "$header
"; + foreach ($kmsKeys as $title => $keys) { + echo "

$title

"; + echo ''; + foreach ($keys as $caption => $key) { + echo ""; + } + echo '
操作系统KMS密钥
$caption$key
'; + } + echo '
'; +} + + +function showHelpWeb(string $site) { + echo ''; + echo ''; + echo ''; + echo 'Windows Activation'; + echo '

Windows KMS Activation

';
+    echo ' slmgr /upk\n slmgr /ipk KMS_KEY\n slmgr /skms ' . $site . '\n slmgr /ato\n slmgr /dlv ';
+    echo '

KMS (Office)
'; + echo 'KMS_KEY (Windows)
'; + echo 'KMS_KEY (Windows Server)

'; +} + +require_once 'Basis.php'; + +//$keys = getKeys(); +//showKeysWeb($keys, 'Windows KMS Keys'); +showHelpWeb('kms.343.re'); diff --git a/src/KeysCli.php b/src/kmsCli.php similarity index 53% rename from src/KeysCli.php rename to src/kmsCli.php index 2c77390..4b4b64a 100644 --- a/src/KeysCli.php +++ b/src/kmsCli.php @@ -18,3 +18,20 @@ function showKeysCli(array $kmsKeys, bool $isGbk = false): void { // show kms ke } echo $isGbk ? iconv('utf-8', 'gb2312', $ret) : $ret; // utf-8 or gbk } + +function showHelpCli(string $site): void { + $length = strlen($site); + echo "\n" . genStr(floor(($length - 2) / 2)) . "Activation Command\n"; + echo "┏" . genStr($length + 14, '-') . "┓\n"; + echo "| slmgr /upk" . genStr($length + 3) . "|\n"; + echo "| slmgr /ipk KMS_KEY" . genStr($length - 5) . "|\n"; + echo "| slmgr /skms $site |\n"; + echo "| slmgr /ato" . genStr($length + 3) . "|\n"; + echo "| slmgr /dlv" . genStr($length + 3) . "|\n"; + echo "┗" . genStr($length + 14, '-') . "┛\n\n"; + echo "Office -> http://$site/office\n\n"; + echo "KMS_KEY -> http://$site/win\n"; + echo " -> http://$site/win-server\n\n"; + echo "KMS_KEY(GBK) -> http://$site/win/gbk\n"; + echo " -> http://$site/win-server/gbk\n\n"; +}