5 * @author Thomas Zeithaml <info@spider-trap.de>
6 * @copyright (c) 2005-2006 Spider-Trap Team
8 * The contents of this file are subject to the Mozilla Public License
9 * Version 1.1 (the "License"); you may not use this file except in
10 * compliance with the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS"
14 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
15 * License for the specific language governing rights and limitations
18 require 'settings.php';
19 include trap_core_path."core.inc.php";
21 function ts_gfx($ts_random) {
22 $rcode = hexdec(md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['SERVER_SOFTWARE'] . $_SERVER['HTTP_ACCEPT_CHARSET'] . sitekey . $ts_random . datekey . filemtime("settings.php")));
23 $code = substr($rcode, 2, 6);
32 $fontwidth = ImageFontWidth($font) * strlen($code);
33 $fontheight = ImageFontHeight($font);
35 $max_lines = $fontheight / 4;
36 if (random_lines == true)
38 $lines = rand(1, $max_lines);
44 if ($lines > $max_lines) $lines = $max_lines;
46 $im = @imagecreate ($width,$height);
47 $background_color = imagecolorallocate ($im, rand(0,100),rand(0,100),rand(0,100));
48 $text_color = imagecolorallocate ($im, rand(200,255),rand(200,255),rand(200,255)); // Random Text
50 $r=0.01;$g=0.51;$b=0.87;
51 for ($i=1;$i<=$circles;$i++) {
52 $value=rand(200, 255);
53 $randomcolor = imagecolorallocate ($im , $value*$r, $value*$g,$value*$b);
54 imagefilledellipse($im,rand(0,$width-10),rand(0,$height-3),
55 rand(20,70),rand(20,70),$randomcolor);
58 imagerectangle($im,0,0,$width-1,$height-1,$text_color);
60 $w_pos = rand(5, abs($width - $fontwidth));
61 $h_pos = rand(5, abs($height - 1 - $fontheight));
62 imagestring ($im, $font, $w_pos, $h_pos, $code, $text_color);
65 for ($i=0;$i<$lines;$i++) {
66 while(abs($y2 - $y) < 2)
68 $y=rand($h_pos, ($h_pos + $fontheight));
71 $randomcolor=imagecolorallocate($im, 0,0, rand(100, 255));
72 imageline($im, 0, $y, $width, $y, $randomcolor);
75 header ("Content-type: image/jpeg");
76 imagejpeg ($im,'',80);
81 $pos= strpos($_SERVER['REQUEST_URI'], '?');
82 $basename = basename(substr($_SERVER['REQUEST_URI'], 0, $pos));
83 if($basename==basename(__FILE__))
84 ts_gfx($_GET['ts_random']);
86 $value = getCaptchaId();
87 if($_POST['unbanme'] == $value ){
88 remove_blacklist(getip(), $_SERVER["HTTP_USER_AGENT"]);
89 header("Location: ../");
93 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
95 <meta name="robots" content="noindex,nofollow" />
96 <title>403 - Zugriff verboten</title>
98 <h1><font face="Verdana, Arial, Helvetica, sans-serif">Zugriff auf diese Website können Sie hier freischalten </font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
102 if($_POST['unbanme'] != '' && $_POST['unbanme'] != $value){
103 echo "<h2>Falsche Eingabe - Sperre nicht aufgehoben !</h2>";
106 <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <strong>Diese Seite dient zum Schutz vor sogenannten "bösen" Spambots.</strong> Oft ist es der Fall, dass man persönliche Daten wie z.B. die Bankverbindung
107 auf einer Webseite angibt. Damit diese Daten nicht in den Suchmaschinen auftauchen
108 hat man sich auf einen Standard geeinigt, wie man Websiten vor der Indexierung ausschließen kann.*<br>
111 <strong>Sie sind einem Link gefolgt der für diesen Spambot gedacht war und haben dadurch eine Sperre Ihrer IP-Adresse ausgelöst. </strong></font>
112 <p><font color="#FF0000" size="2" face="Verdana, Arial, Helvetica, sans-serif"> <strong>Um
113 diese Sperre aufzuheben, müssen Sie in das folgende Formular den unten
114 angezeigten Wert eintragen und danach abschicken - dann haben Sie sofort
115 wieder Zugriff auf diese Website.</strong></font>
117 <img src="forbid.php?ts_random=<?php echo $ts_random."\""; ?> />
118 <FORM METHOD="post" ACTION="forbid.php">
119 <label for="unbanme">Bitte Wert eingeben:</label>
120 <input name="unbanme" id="unbanme" style="width: 165px;" />
121 <input class="submit" type="submit" value="Speichern" name="save" />
126 <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
129 <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">* Dazu legt man eine Datei mit Namen robots.txt in das Root Verzeichnis des Webspaces und hinterlegt darin, welche Seiten indexiert werden dürfen und welche nicht. Suchmaschinen wie MSN, Yahoo oder Google halten sich an diese Regeln. Spambots aber lesen Internetseiten aus ohne dabei auf diese Richtlinien zu achten. Um dies zu unterbinden und damit die Webseiten zu schützen, werden diese Spambots ausgesperrt. Mehr Informationen über Webcrawler gibt es z.B: bei <a href="http://www.robotstxt.org/wc/robots.html">http://www.robotstxt.org/wc/robots.html</a><br>
131 <p><?php include ("randlink.php"); ?></p>
132 <font size="2" face="Verdana, Arial, Helvetica, sans-serif">powered by Spider-trap.de