ich habe seit langer zeit problem mit spamern. Ich habe den aspam schon geändert passwort wird dem user zugewiesen und trozdem kommt sie immernoch. Hauptsächlich im Forum. Kann man dort vill eine Post freigabe für user posts konfigurieren.
hier noch mein aspam
function spamkey($laenge) { $key = ""; $string="ABCDEFGHIJKLMNPQRSTUVWXYZ123456789"; mt_srand((double)microtime()*1000000); for ($i=1; $i <= $laenge; $i++) { $key .= substr($string, mt_rand(0,strlen($string)-1), 1); } return $key; } function chk_antispam ($page) { $code = $_POST["antispam"]; $key = $_POST["key"]; if (isset($_SESSION["spam_code"][$page]) and !empty($code) and !empty($key)) { $encode_ausgabe = decode($key); $spam_code = strtoupper($code); $spam_in = decrypt($_SESSION["spam_code"][$page], $encode_ausgabe); unset($_SESSION["spam_code"][$page]); if ($spam_code == $spam_in) { $out = true; } else { $out = false; } } else { unset($_SESSION["spam_code"][$page]); $out = false; } if (has_right($allgAr['antispam'])) { return true; } else { return $out; } } function get_antispam ($page, $null) { $spam_code = spamkey(6); $encode = spamkey(15); $_SESSION["spam_code"][$page] = encrypt($spam_code, $encode); $encodea = array("1" => substr($encode, 0, 3), "3" => substr($encode, 3, 6), "2" => substr($encode, 9, 4), "0" => substr($encode, 13, 2),); $encode_ausgabe = $encodea["0"].$encodea["1"].$encodea["2"].$encodea["3"]; $out = '<span><table width="200" border="0" cellspacing="0"><tr><td valign="middle" align="left">'. '<img src="include/images/spam/z.php?c='.$encode_ausgabe.'&page='.$page.'" alt="" /></td><td valign="middle" align="left">'. '<input autocomplete="off" name="antispam" size="6" maxlength="6"/> <input type="hidden" value="'.$encode_ausgabe.'" name="key" /> </td></tr></table></span>'; if (has_right($allgAr['antispam'])) { return ''; } else { if ($null == 1) { return ('<tr><td class="Cmite">Antispam</td><td class="Cnorm">'.$out.'</td></tr>'); } else { return ($out); } } } function decode ($string) { $decode = array("3" => substr($string, 0, 2), "0" => substr($string, 2, 3), "2" => substr($string, 5, 4), "1" => substr($string, 9, 6)); $ausgabe = $decode["0"].$decode["1"].$decode["2"].$decode["3"]; return $ausgabe; } function decrypt($string, $key) { $result = ''; $string = base64_decode($string); for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)-ord($keychar)); $result.=$char; } return $result; } function encrypt($string, $key) { $result = ''; for($i=0; $i<strlen ($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } return base64_encode($result); } function randomnum($a, $b) { $num = rand($a, $b); return $num; }
session_name ('sid'); session_start (); if (isset($_SESSION["spam_code"][$_GET["page"]]) and isset($_GET["c"]) and isset($_GET["page"])) { $encode_ausgabe = decode($_GET["c"]); $page = $_GET["page"]; $code = decrypt($_SESSION["spam_code"][$page],$encode_ausgabe); for ($i = 0; $i < strlen($code); $i++) { $encode[] = $code{$i}; } header("Content-Type: image/PNG"); $bild = imagecreatefrompng("background.png"); //$bild = imagecreate (120 , 40); //imagecolorallocate ($bild, 255, 255, 255); for ($i = 0; $i < 6; $i++) { if ($i == 0) { $left = 6; } else { $left = $left + 19; } $textnr = randomnum(12, 15); $fonts = array( "0" => "fonts/verdana.ttf", "1" => "fonts/tahoma.ttf", "2" => "fonts/Dosis-Medium.ttf", "3" => "fonts/Pure-ThinDuranGo.ttf"); $font = randomnum(0, 3); $winkel = randomnum(-15, 15); $text_top = randomnum(22, 30); $color = array("0" => randomnum(0, 100), "1" => randomnum(0, 100), "2" => randomnum(0, 100),); $text_farbe = ImageColorAllocate ($bild, $color["0"], $color["1"], $color["2"]); ImageTTFText ($bild,$textnr, $winkel, $left, $text_top, $text_farbe, $fonts[$font], $encode[$i]); } ImagePNG ($bild); } function decode ($string) { $decode = array("3" => substr($string, 0, 2), "0" => substr($string, 2, 3), "2" => substr($string, 5, 4), "1" => substr($string, 9, 6)); $ausgabe = $decode["0"].$decode["1"].$decode["2"].$decode["3"]; return $ausgabe; } function decrypt($string, $key) { $result = ''; $string = base64_decode($string); for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)-ord($keychar)); $result.=$char; } return $result; } function randomnum($a, $b) { $num = rand($a, $b); return $num; }
verwendete ilch Version: 1.1 O
betroffene Homepage: externer Link