Add a script to trigger target to send status update

This commit is contained in:
Junior 2026-01-10 16:21:22 -05:00
parent e890afb4f5
commit 889a773d87
2 changed files with 29 additions and 0 deletions

3
.gitignore vendored
View File

@ -11,6 +11,9 @@ Thumbs.db
# The active config file copied from config-dist.php
config.php
# The button log
buttonlog.txt
# Vim
*.swp
*.swo

26
requeststatus.php Normal file
View File

@ -0,0 +1,26 @@
<?php
require "header.php";
function usage() {
echo "Usage: requeststatus.php <idmask>\n";
echo "";
exit();
}
if ( php_sapi_name() != "cli" ) exit();
if ( $argc != 2 ) usage();
$idmask = intval($argv[1]);
if ( ($idmask <= 0) || ($idmask > 31) ) usage();
$command = 0x04;
$target = $idmask;
$unique = mt_rand(1, 2000000000);
$data = pack("LLLCL", PACKETFILTER[0], PACKETFILTER[1], $unique, $command, $target);
transmitMessage($data);
exit();