Processing packets on the command line can be archives as well

This commit is contained in:
Deon George 2023-11-25 09:48:37 +11:00
parent 6abf10ab0b
commit b5e5decfdf
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class PacketInfo extends Command
if ($this->argument('ftn')) { if ($this->argument('ftn')) {
$a = Address::findFTN($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])); $a = Address::findOrFail(hexdec($m[1]));
} }

View File

@ -48,7 +48,7 @@ class PacketProcess extends Command
if ($this->argument('ftn')) { if ($this->argument('ftn')) {
$a = Address::findFTN($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])); $a = Address::findOrFail(hexdec($m[1]));
} else { } else {