adjust a $length_of_length variable. also had it issue a warning because i've not seen my code go down that route, yet

This commit is contained in:
jake 2024-11-16 02:48:27 -05:00
parent 3745dea40d
commit 03e6ae523b
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,7 @@ use KeyData;
plugin Config => {file => $ARGV[1]}; plugin Config => {file => $ARGV[1]};
my $VERSION = "1.0.1"; my $VERSION = "1.0.2";
my $config = app->config(); # hypnotoad -f ./keyserver ./keyserver.conf my $config = app->config(); # hypnotoad -f ./keyserver ./keyserver.conf
my $start_time; my $start_time;

View file

@ -96,8 +96,9 @@ class KeyData {
$length_field = unpack('n', substr($data, 1, $length_of_length)); $length_field = unpack('n', substr($data, 1, $length_of_length));
} }
elsif ($bits[6]) { elsif ($bits[6]) {
$length_of_length = 3; $length_of_length = 4;
$length_field = unpack('N', substr($data, 1, $length_of_length)); $length_field = unpack('N', substr($data, 1, $length_of_length));
warn "Give me the key that caused this to be emited";
} }
else { else {
$length_of_length = 1; $length_of_length = 1;