diff options
-rwxr-xr-x | decode.pl | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -714,8 +714,6 @@ for ( my $i = 0 ; $i < ( $n - 2 ) ; ++$i ) { my ( $data_bits, $key_bits ) = extract( $d->[$i], $d->[ $i + 1 ], $d->[ $i + 2 ] ); - my $plain = decrypt( $data_bits, $key_bits ); - next unless defined($plain); my $min = le_bcd_to_int( substr( $key_bits, 0, 8 ) ); my $hour = le_bcd_to_int( substr( $key_bits, 8, 8 ) ); @@ -726,6 +724,12 @@ for ( my $i = 0 ; $i < ( $n - 2 ) ; ++$i ) { my $mins_since_midnight = $min + ( $hour * 60 ); + next unless ( $mins_since_midnight %3) == 2; + + my $plain = decrypt( $data_bits, $key_bits ); + + next unless defined $plain ; + my $dt = DateTime->new( year => $year, month => $month, |