X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fpoison.php;h=27dae4ca9e04d318fc7642c5fb152323b2c19185;hb=2a1cd4ab034c1c4dccd132a76253cf4a7f84bf7d;hp=02d973e91d45c2cba00a6ba190bc7fb404155416;hpb=30543c79c2fab23f4b37d841b0e33e432660dfe6;p=platal.git diff --git a/modules/poison.php b/modules/poison.php index 02d973e..27dae4c 100644 --- a/modules/poison.php +++ b/modules/poison.php @@ -1,6 +1,6 @@ $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), + 'pet' => $this->make_hook('tags', AUTH_PUBLIC, 'user', NO_HTTPS), + // 'per' => $this->make_hook('rand', AUTH_PUBLIC, 'user', NO_HTTPS), ); } - function handler_poison(&$page, $seed = null, $count = 20) + function handler_poison($page, $seed = null, $count = 20) { $this->load('poison.inc.php'); if ($seed == null) { @@ -46,7 +47,24 @@ class PoisonModule extends PLModule exit; } - function handler_mailto(&$page, $seed = null, $count = 20) + function handler_tags($page, $seed = null, $count = 20) + { + global $globals; + + $this->load('poison.inc.php'); + if ($seed == null) { + $seed = time(); + } + $emails = get_poison_emails($seed, $count); + + foreach ($emails as $email) { + echo "$email". "\n"; + } + echo 'suite'; + exit; + } + + function handler_mailto($page, $seed = null, $count = 20) { global $globals; @@ -64,7 +82,7 @@ class PoisonModule extends PLModule exit; } - function handler_rand(&$page) { + function handler_rand($page) { $this->load('poison.inc.php'); randomize_poison_file(); exit;