Browse Source

feat: colorful shell output

master
Dnomd343 2 years ago
parent
commit
190456c13c
  1. 2
      kms.php
  2. 4
      src/Check.php

2
kms.php

@ -1,6 +1,8 @@
#!/usr/bin/env php8
<?php
# TODO: add PORT option
$version = 'v1.2.1';
require_once './src/Daemon.php';

4
src/Check.php

@ -71,6 +71,6 @@ function kmsCheckCli(string $host): void {
echo "Invalid port\n";
exit;
}
echo "KMS Server: $host ($port) -> ";
echo (vlmcsCheck($host, $port) ? 'available': 'connect failed') . PHP_EOL;
echo "KMS Server: \033[33m$host\033[0m\033[36m:$port\033[0m ->";
echo (vlmcsCheck($host, $port) ? "\033[32m available\033[0m": "\033[31m connect failed\033[0m") . PHP_EOL;
}

Loading…
Cancel
Save