English
PHP, HTML & JavaScript- Forum

Spams prevent

 

Julian
Schmidt
Hi,
watts yesterday, withal small rake-Captcha, over my Guestbook[...]  zugespamt.
have straight a small bath-Word-list added.
what are so The häufigsten Wörter/criteria to whom one effectively Spams filter out can? my list sees straight so from.
 $spots += 1 * substr_count(strtolower($content),'<');
 $spots += 1 * substr_count(strtolower($content),'>');
 $spots += 1 * substr_count(strtolower($content),'!');
 $spots += 2 * substr_count(strtolower($content),'</');
 $spots += 2 * substr_count(strtolower($content),'100%');
 $spots += 2 * substr_count(strtolower($content),'viagra');
 $spots += 2 * substr_count(strtolower($content),'porn');
 $spots += 2 * substr_count(strtolower($content),'free');
 $spots += 2 * substr_count(strtolower($content),'poker');
 $spots += 2 * substr_count(strtolower($content),'https://');
 $spots += 3 * substr_count(strtolower($content),'href');

Please no misery long word-lists post, separate only potenziale Spam-terms, which one normal User probably eh never use would. About 5 Points show I momentarily Spamverdacht.
How can itself yet to Spams protect?

Greeting.

Julian

[OFFTOPIC]@iF: New Header-solid gefällt not. [/OFFTOPIC]
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/29/13  
 



gives Yes many such lists,
your find I that's all right and short and almost.

time one small 8-spots-plan:

make another 1) further Input type Text in a span style display none namens
website - Visitors can there nothing present but one offered becomes there mostly something
deposit.

If you The arithmetical problem 2) zeitversetzt first by JS beget then helps the too
as well as 3) instead of only 1 Image 3 small Images bestehend.

examine too whom 4) Referer and the 5) Browser as well as the 6) old the Session the with
Besuchern, The something in that Input type, seldom under 15 sec lying.

Ausserdem one 7) onwmkeydown-Flag by JS settle if what in that Input
typed and is so one input type hidden on 1 or cake or window.
navigator settle. Bots type mostly Yes nothing.

yet tougher Better get going for Bots if you additionally yet The 8) Captchaeingaben
first on the following site exaction.

[offtopic]Header-solid nuja...[/offtopic]
 
04/30/13  
 



yet what...

hunt whom Gesamttext to check hierdurch:
;function __secure_plaintext($s,$means="\%") {

    ;return trim(ext_str_replace('  ',' ',preg_replace("/[^a-zA-Z0-9öäüÖÄÜß".$means." ]/","",str_replace("'","",str_replace("'","",$s)))))

;}

;function ext_str_replace($s,$ss,$sss) {

    ;$sss=str_replace($s,$ss,$sss)
    ;while (strpos(chr(0).$sss,$s)>0) $sss=str_replace($s,$ss,$sss)
    ;return $sss

;}


and make then one explode(" ",strtolower($pruefText)) and then by foreach one
assoziatives aray $words[$key]=1 befüllen. so have You any words by $words["wort"]=1
and can then against simply look whether $words["100%"]==1 is.
 
04/30/13  
 




Julian
Schmidt
OK thanks, will be then time look How and I of it umsetze.
drop it Topic here first for Rückfragen for may part and naturally for further useful Tipps open.

Greeting
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/30/13  
 




Julian
Schmidt
OK, be now times the list sturr stampeded.

1) Input type Text hidden

2) arithmetical problem zeitversetzt by JS
question game the Delay one strain or reicht it if I a 1ms take?
function showcaptcha() {

    document.getElementById('sicherheitscode').style.display="inline";

}

setTimeout("showcaptcha()",100);

3) arithmetical problem in mehrer Images splitten.
Lass I first lane, evtl. later yet

4) Referer
Referer becomes by the Submit unfortunately not staid. simply Verify whether the Referer a Seiter of my Homepage is?

5) Browser
Inwiefern is the Browser one Kriterium for Bots or User?
How can discern?
6) old the Session
How ermittle I the old one Session, simply by Timestamp or does it leichter? Evtl. ne Variation with the Verfallsdatum?

7) onwmkeydown-Flag by JS

iF (30.04.13)
and so one input type hidden on 1 or cake or window. navigator settle


cake? window-navigator? meinste cookies?
Schreib straight simply into Hiddenfeld of 1)
function key_down() {

    document.gaestebuch.website.value = "julian-schmidt.XProfan.com";

}

<textarea onkeydown="key_down()" ...

and
if (isset($_POST['website']) and !is_array($_POST['website'])) {

     $website = $_POST['website'];

    if (($website<>"julian-schmidt.XProfan.com") and !empty($website))  {

         $error_site = "Spamverdacht<br />";

    }

}


8) Captcha over Weiterleitung
Lass I lane. Gefällt me from the shape not.

iF (30.04.13)
and make then one explode(" ",strtolower($pruefText)) and then by foreach one
assoziatives aray $worte=1 befüllen. so have You any words by $worte=1
and can then against simply look whether $worte==1 is.


gives not Problems with several equal Wörter? should Yes mitberücksichtigt go?
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/30/13  
 



To 1) write You Input type Text hidden -

I wrote but "Input type Text in a span style display none" and this is differently.

To 2 would I even 5+ sec take there before eh no human a Gästebucheintrag
words and typed has.

>> Referer becomes by the Submit unfortunately not staid. simply Verify whether the Referer
>> a Seiter of my Homepage is?

what?! Türlich have whom Referer too to Submit - simply time $_SERVER print_r'en.

5) you have a) $_SERVER with Browserinfo (useragent) and by js window.navigator -
both should match what with Bots mostly not the case is.

6) to Session lay out and $_SESSION["sonstwas" time Save

To Explode: but not $words["wort"]=1 simply $words["wort"]++ write -
already have in the foreach in the $value The amount.
 
04/30/13  
 




Julian
Schmidt
To 1) I had already. To 2) now on 2000 staid.
To 4) works now.
to 5) How do I get whom comparison there. is Yes PHP and Javascript in the circumstance. How is the Syntax?
whom remainder look I me then later on....
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/01/13  
 



To 5): with wmkeydown simply of a hiddem edit whom value on window.navigator settle -
so transmit The JS-Info on PHP and can with the Browseragentvariable from
$_Server vergleichen.
 
05/01/13  
 




Julian
Schmidt
well so wären then 1), 2), 4), 5), 6) and 7) abgehakt.
3) and 8) lass I How said stay.

Nochmal To Explode and the assoziatives aray. These method on terms To Verify is for me useless because Begriffen How z.B. href where not always one space follows or single characters How < not berücksichtigt go. stay now with of my Variante with substr_count.
can short explain what __secure_plaintext() power?

Willste time on holes Verify? [...] 
Nochmal quick the code.
<script type="text/javascript">

function showcaptcha(mod) {

    if (mod==true) {

        document.getElementById('sicherheitscode').style.display="inline";

    } else if(mod==false) {

        document.getElementById('sicherheitscode').style.display="none";

    }

}

setTimeout("showcaptcha(false)",0);
setTimeout("showcaptcha(true)",2000);

function key_down() {

    document.gaestebuch.website.value = window.navigator.userAgent;

}

</script>

if (isset($_POST['website']) and !is_array($_POST['website'])) {

     $website = $_POST['website'];

    if (($website<>$_SERVER['HTTP_USER_AGENT']) and !empty($website))  {

         $error_spam = "Spamverdacht<br />";

    }

}


If ($_SERVER['HTTP_REFERER']!="https://".$_SERVER['SERVER_NAME']."/gaestebuch.php") {

     $error_spam = "Spamverdacht";

}


If (isset($_SESSION['rechen_captcha_time'])) {

     $diff_time = time()-$_SESSION['rechen_captcha_time'];

    If ($diff_time<=3) {

         $error_spam = "Spamverdacht";

    }

}

 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/01/13  
 



>>Diese method on terms To Verify is for me useless because Begriffen How
>>z.B. href where not always one space follows or single characters How < not
>>berücksichtigt go.

you have not tested, in link with __secure_plaintext. from

<a href="roffel" would "a href roffel", explode " " ergäbe a;href;roffel -
klüppte means.

>>Kannst short explain what __secure_plaintext() power?

removes everything what not a-zA-Z0-9 and $means and $20 and äöüß is.

your showcaptcha(mod) is so not virtual,
It's all right not therefore what delayed view sonder it at all first delayed
to create (  [...]  ) .
 
05/01/13  
 




Julian
Schmidt
iF (01.05.13)
your showcaptcha(mod) is so not virtual,
It's all right not therefore what delayed view sonder it at all first delayed
to create (  [...]  ) .


and How reputation I The function create() on. can NEN kurzes example make?
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/01/13  
 



well simply <div id="someParent"...

create(_parent,_element,_id)

means

;create("someParent","img","myImg")
;document.getElementById("myImg").src="...
 
05/01/13  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

97.922 Views

Untitledvor 0 min.
Member 872212106/22/19
E.T.02/11/18
ByteAttack10/11/17
GDL11/24/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie