From: henoheno Date: Sat, 5 May 2007 16:02:53 +0000 (+0900) Subject: Domain exposure (gate-big5) X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki_sandbox.git;a=commitdiff_plain;h=472c7922197c275e3de4467187f0790b5b33aee6 Domain exposure (gate-big5) --- diff --git a/spam/spam.php b/spam/spam.php index 846acba..7ce706e 100644 --- a/spam/spam.php +++ b/spam/spam.php @@ -1,5 +1,5 @@ http://nasty.example.org/?refer=victim.example.org and original $string = preg_replace( - '#http://' . + '#h?ttp://' . '(' . 'ime\.nu' . '|' . // 2ch.net 'ime\.st' . '|' . // 2ch.net @@ -474,6 +474,23 @@ function spam_uri_pickup_preprocess($string = '') $string ); + // Domain exposure (gate-big5) + // http://victim.example.org/gate/big5/nasty.example.org/path + // => http://nasty.example.org/?refer=victim.example.org and original + $string = preg_replace( + '#h?ttp://' . + '(' . + 'big5.51job.com' . '|' . + 'big5.china.com' . '|' . + 'big5.xinhuanet.com' . '|' . + ')' . + '/gate/big5' . + '/([a-z0-9.%_-]+\.[a-z0-9.%_-]+)' . + '#i', // nasty.example.org + 'http://$2/?refer=$1 $0', // Preserve $0 or remove? + $string + ); + // Domain exposure (See _preg_replace_callback_domain_exposure()) $string = preg_replace_callback( array(