From 889a773d875384b3b5197d21ec1fcb10425a7ef7 Mon Sep 17 00:00:00 2001 From: Junior Date: Sat, 10 Jan 2026 16:21:22 -0500 Subject: [PATCH] Add a script to trigger target to send status update --- .gitignore | 3 +++ requeststatus.php | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 requeststatus.php diff --git a/.gitignore b/.gitignore index a00cc3a..bac38be 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/requeststatus.php b/requeststatus.php new file mode 100644 index 0000000..bb87fa6 --- /dev/null +++ b/requeststatus.php @@ -0,0 +1,26 @@ +\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();