3 Initiates a whois query on the domain names of newly added URLs,
4 compares gathered informations against "BannedLinks" data (names
5 or email / addresses) and blocks any suspect 'contributions'. Works
6 only in conjunction with "plugins/edit/spam_deface".
8 @feature: spammer-lookup-whois
9 @depends: spam-link-deface
10 @title: spammer whois lookup
11 @desc: scans newly submitted links against whois databases
15 $ewiki_plugins["ban_loopup"][] = "ewiki_spam_ban_whois_lookup";
17 function ewiki_spam_ban_whois_lookup($href) {
19 $b = &$ewiki_config["banned"]; // is already filled at this point
21 $p1 = strpos($href, "//") + 2;
22 $domain = substr($href, $p1);
23 $domain = substr($href, 0, strpos($domain, "/"));
25 $whoistxt = `whois -H -T dn,ro,pn $domain`;
26 if ($whoistxt = strtolower($whoistxt)) {
27 foreach (explode("\n", $b) as $pat) {
28 if (strpos($whoistxt, $pat)) {