From 96d8d7227295125e2f8c8020b6e3adf7989e9400 Mon Sep 17 00:00:00 2001 From: pp Date: Mon, 31 Jul 2006 23:54:47 +0000 Subject: - information about recently discovered weakness of 1 pass version git-svn-id: https://siedziba.pl:790/svn/repos/dbxrecover@239 455248ca-bdda-0310-9134-f4ebb693071a --- README | 7 +++++-- dbxrecover-1p | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README b/README index 8757601..2342db6 100644 --- a/README +++ b/README @@ -20,8 +20,11 @@ It is caused by a fact, that it is impossible, in general, to detect the first fragment of a message. The last fragment is easy to find, as it has 0 as an id of the next fragment. The first fragment, on the other hand, is not marked in any way. Currently the script treats a fragment as first if it starts with one -of common headers such as "From:" or "Received:". The probability of writing -incomplete message is low though, due to the following factors: +of common headers such as "From:" or "Received:" (update: some mail systems and +antivirus/antispam solutions add their non standard headers at the top of the +message, thus making this test not effective; better solution is needed). The +probability of writing incomplete message is low though, due to the following +factors: - the message must contain one or more of the header strings in its body - the string must be located at the start of a fragment, which means a diff --git a/dbxrecover-1p b/dbxrecover-1p index 0ed226c..bd40cd2 100755 --- a/dbxrecover-1p +++ b/dbxrecover-1p @@ -161,7 +161,7 @@ use warnings; ($next, $data) = $self->combine($idhash, $nexthash, $next, $data, 1); ($id, $data) = $self->combine($nexthash, $idhash, $id, $data, 0); - # the test for first chunk is very simple and naive, but it works well enough + # TODO: better test for first chunk. Maybe a grace period to keep seemingly complete messages, in case of false positives. $self->{stats}->{chainscompl}++,return($data->join()) if (($next == 0) && ($data->first() =~ /^(From|From:|Return-Path:|Received:) /)); $idhash->{$id} = {} if (!defined($idhash->{$id})); $nexthash->{$next} = {} if (!defined($nexthash->{$next})); -- cgit v1.2.3