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 #!/usr/bin/env php8
<?php <?php
# TODO: add PORT option
$version = 'v1.2.1'; $version = 'v1.2.1';
require_once './src/Daemon.php'; require_once './src/Daemon.php';

4
src/Check.php

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

Loading…
Cancel
Save