diff options
| -rwxr-xr-x | dbxrecover | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -179,8 +179,6 @@ use strict; # it also helps in cases when there are dbx files contained inside dbx $self->{file}->seek($chunksize, 1); - $self->{hash} = undef; - ($self->{id}, $self->{chunksize}, $self->{datasize}, $self->{next}) = ($id, $chunksize, $datasize, $next); bless ($self, $class); return $self; } @@ -215,22 +213,23 @@ use strict; sub data { my $self = shift; + my $datasize = unpack("V", substr($self->{header}, 8, 4)); my $data; $self->{file}->setpos($self->{filepos}); - $self->{file}->read($data, $self->{datasize}); + $self->{file}->read($data, $datasize); return $data; } sub id { my $self = shift; - return $self->{id}; + return scalar unpack("V", $self->{header}); } sub next { my $self = shift; - return $self->{next}; + return scalar unpack("V", substr($self->{header}, 12, 4)); } } |
