1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

THe ultimate anti-blog spam!

Discussion in 'General Chat' started by Dollar, Mar 30, 2008.

  1. #1
    I had a problem with blogspam in wordpress.
    What I did was open up comments template in theme editor
    and find the html markup for the comment field and javascript obsuficated it. like this

    
    <script language="javascript">
    document.write( unescape( '%3C%70%3E%3C%74%65%78%74%61%72%65%61%20%6E%61%6D%65%3D%22%63%6F%6D%6D%65%6E%74%22%20%69%64%3D%22%63%6F%6D%6D%65%6E%74%22%20%63%6F%6C%73%3D%22%36%30%22%20%72%6F%77%73%3D%22%31%30%22%20%74%61%62%69%6E%64%65%78%3D%22%34%22%3E%3C%2F%74%65%78%74%61%72%65%61%3E%3C%2F%70%3E'));
    </script>
    
    <script language="javascript">
    document.write( unescape( '%3C%70%3E%3C%69%6E%70%75%74%20%63%6C%61%73%73%3D%22%73%75%62%6D%69%74%63%6F%6D%6D%65%6E%74%22%20%6E%61%6D%65%3D%22%73%75%62%6D%69%74%22%20%74%79%70%65%3D%22%73%75%62%6D%69%74%22%20%69%64%3D%22%73%75%62%6D%69%74%22%20%74%61%62%69%6E%64%65%78%3D%22%35%22%20%76%61%6C%75%65%3D%22%53%75%62%6D%69%74%22%20%2F%3E%0A%3C%69%6E%70%75%74%20%63%6C%61%73%73%3D%22%72%65%73%65%74%63%6F%6D%6D%65%6E%74%22%20%6E%61%6D%65%3D%22%72%65%73%65%74%22%20%74%79%70%65%3D%22%72%65%73%65%74%22%20%69%64%3D%22%72%65%73%65%74%22%20%74%61%62%69%6E%64%65%78%3D%22%35%22%20%76%61%6C%75%65%3D%22%52%65%73%65%74%22%20%2F%3E%0A%3C%69%6E%70%75%74%20%74%79%70%65%3D%22%68%69%64%64%65%6E%22%20%6E%61%6D%65%3D%22%63%6F%6D%6D%65%6E%74%5F%70%6F%73%74%5F%49%44%22%20%76%61%6C%75%65%3D%22'));
    </script><?php echo $id; ?>" />
    </p>
    Code (markup):
    No more blogspam for weeks now, [​IMG]

    Online javascript obsuficator


    Note: make sure only to obsufiscate HTML only. You cant obsuficate PHP tags.
    What is does it when you visit the site your browser unescapes that string and it renders the obsuficated code. But too a spammer bot, it will not see the form. Meaning no spam.

    If this gets rid of your spam , feel free to drop me a green
     
    Dollar, Mar 30, 2008 IP