From 92a8bda865a64c76ad1e0eba03f724dfe8eb2034 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 21 Oct 2008 00:03:16 +0200 Subject: [PATCH] The domain of the email must be included in the poisonous source file. Signed-off-by: Florent Bruneau --- modules/poison.php | 2 +- modules/poison/poison.inc.php | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/poison.php b/modules/poison.php index 6c68e1f..bf37589 100644 --- a/modules/poison.php +++ b/modules/poison.php @@ -28,7 +28,7 @@ class PoisonModule extends PLModule return array( 'pe' => $this->make_hook('poison', AUTH_PUBLIC, 'user', NO_HTTPS), 'pem' => $this->make_hook('mailto', AUTH_PUBLIC, 'user', NO_HTTPS), - // 'per' => $this->make_hook('rand', AUTH_PUBLIC, 'user', NO_HTTPS), + // 'per' => $this->make_hook('rand', AUTH_PUBLIC, 'user', NO_HTTPS), ); } diff --git a/modules/poison/poison.inc.php b/modules/poison/poison.inc.php index fdfea00..3e9b471 100644 --- a/modules/poison/poison.inc.php +++ b/modules/poison/poison.inc.php @@ -38,11 +38,6 @@ function get_poison_emails($seed, $count) while (!feof($fd) && $i < $count) { $line = trim(fgets($fd)); if (strlen($line) > 0) { - if ($seed % 27 > 13) { - $line .= '@' . $globals->mail->domain; - } else { - $line .= '@' . $globals->mail->domain2; - } $emails[] = $line; ++$seed; } @@ -61,7 +56,10 @@ function randomize_poison_file() while (!feof($fd)) { $line = trim(fgets($fd)); if (strlen($line) > 0) { - $entries[$line] = md5($line); + $m1 = $line . '@' . $globals->mail->domain; + $entries[$m1] = md5($m1); + $m2 = $line . '@' . $globals->mail->domain2; + $entries[$m2] = md5($m2); } } fclose($fd); -- 2.1.4