From b5e5decfdf9c5e34b923ea5da3f6d9a24742e187 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 25 Nov 2023 09:48:37 +1100 Subject: [PATCH] Processing packets on the command line can be archives as well --- app/Console/Commands/PacketInfo.php | 2 +- app/Console/Commands/PacketProcess.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/PacketInfo.php b/app/Console/Commands/PacketInfo.php index 988b457..af657f1 100644 --- a/app/Console/Commands/PacketInfo.php +++ b/app/Console/Commands/PacketInfo.php @@ -45,7 +45,7 @@ class PacketInfo extends Command if ($this->argument('ftn')) { $a = Address::findFTN($this->argument('ftn')); - } elseif (preg_match(sprintf('/^%s\.pkt$/',Packet::regex),$this->argument('file'),$m)) { + } elseif (preg_match(sprintf('/^%s\.(.{3})$/',Packet::regex),$this->argument('file'),$m)) { $a = Address::findOrFail(hexdec($m[1])); } diff --git a/app/Console/Commands/PacketProcess.php b/app/Console/Commands/PacketProcess.php index b28030c..22a8c16 100644 --- a/app/Console/Commands/PacketProcess.php +++ b/app/Console/Commands/PacketProcess.php @@ -48,7 +48,7 @@ class PacketProcess extends Command if ($this->argument('ftn')) { $a = Address::findFTN($this->argument('ftn')); - } elseif (preg_match(sprintf('/^%s\.pkt$/',Packet::regex),$this->argument('file'),$m)) { + } elseif (preg_match(sprintf('/^%s\.(.{3})$/',Packet::regex),$this->argument('file'),$m)) { $a = Address::findOrFail(hexdec($m[1])); } else {