Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/11/2007, 17:41
Avatar de Shiryu_Libra
Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 18 años, 1 mes
Puntos: 88
Re: Ataque a mi sitio web

pues al parecer este Aleman tambien tuvo ese tipo de percance con el tal valentino guxxi, he implemento esta funcion en PHP....
Código PHP:
Ich finde es zwar nettdass Du so gerne in Formulare
("I find it to be sure nicely, that you so gladly into forms")

"Hello, Your site is great. Regards, Valintino Guxxi"

eingibstaber dass dann wenig später auf dem gleichen Weg Spam versendet oder in Webseiten eingetragen wirddass finde ich weniger nett.
(
"Input, but that then little later on the same way spam sends or is registered in web pages, that find I fewer nicely.  ")

Deshalb habe ich mir erlaubt eine kleine PHP-Funktion zu schreiben, die etwa so funktioniert:
(
"Therefore I have myself permitted a small PHP-function to write, that about so functions: ")
function 
is_spam($str) {
    
# Muster: Eintrag beginnt mit Link:
    
$arMuster[]='^http.//';
    
#Muster: Beginnt mit <a href
    
$arMuster[]='^<a href';
    
#Muster: Beginnt mit [url=
        
$arMuster[]='^[url=';
    
# Muster: Eintrag enthält mindestens 3 Links:
    
$arMuster[]='http.//.*http.//.*http.//';
    
#Muster: Enthält tramadol oder viagra
        
$arMuster[]='[tT][rR][aA][mM][aA][dD][oO0][1liI]';
        
$arMuster[]='[vV][1liI][aA][gG][rA][aA]';
    
#Muster: Enthält Valintino Guxxi
    
$arMuster[]='Valintino Guxxi';

        
# Ab hier nichts mehr ändern.
    
$str=trim($str);
    foreach (
$arMuster as $strMuster)
    if (
eregi ($strMuster$str)) {
        die(
'Lass das spammen...');
    }
return 
false;
}

Der Aufruf geht ganz einfach mit
The proclamation goes along very simply
if (isset($_POST['TextEingabeFeld'])) {
        
$dummy=is_spam($_POST['TextEingabeFeld']);
}
JaMeine Seite ist "great"Und mit dem Code lassen sich auch andere PHP-Skripte ganz einfachschnell und ohne Nebenwirkungen nachrüstenDas kostet nicht viel.
(
"Yes.  My side is "great".  And with the code, also other PHP-scripts let very simply, quickly and without side-effect retrofit themselves.  That does not cost much.  "
al parecer evita el SPAM, algun con mas agricultura sabra traducir esa funcion???
__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra