Methods to systematically fight spam

Got an idea, or did we do something that you really find disturbing? Come here and tell us about it and we'll respond.

Methods to systematically fight spam

Postby Billobob » Fri Nov 30, 2018 10:14 am

Spam has become a pretty decent sized problem for this message board. And while thanks to the efforts of our excellent moderators it hasn't become an unmanageable problem a lot of spam still gets through the cracks. The only way to guard against that problem entirely is to set up safe guards. I know this thread is probably redundant but I thought the only responsible thing to do was to compile some ideas on how spam detection can be modified and automated. I also provided some of examples of the code that could be used to do this. So if this is helpful and if the ideas are realistic then please implement them. If they are not then just delete this thread and I'll keep my nose out of the affair.

Method 1: 1."Add Fields That Only Spam Bots Can See and Fill In". With this kind of program you use java and CSS to obscure certain fields from users but which the bots will still be able to see. This method basically relies on the fact that while legitimate browsers view the site through the lens of well the browser bots only read the html. So then once the bot gills in the hidden fields the program will identify and delete the bot. However this kind of program really only works on lower grade spam bots because newer versions can read CSS and java. Then again from what I've seen the bots plagueing us don't appear to be very sophisticated (they don't even translate their ads). So maybe this method could be effective.

Example of method 1:
1."<html>
<head>
<meta charset=utf-8>
<title>Simple Form</title>
<link href=styles.css rel=stylesheet>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<form>
<label id=email1>Email address: <input id=email></label>
<label id=email2>Email: <input id=email_add></label>
<input type=submit value=submit>
</form>
<script src=script.js></script>
</body>
</html>



styles.css



#email2 { display: none; }

JavaScript in

script.js


$(document).ready(
function() {
$('#email2').hide()
}
); "

Method 2: Use a reCaptcha code: This code is a common feature on the internet nowadays. It essentially asks a user to either match similar images or to decipher two words. This system can be both easy to implement and is secure against all but the most sophisticated spam bots which I doubt will be employed against this site). However this security feature does have the major downside of making it more difficult for legitimate users to use the site.

reCaptcha code integration : I was going to try to explain how to integrate the code into the site but I realized that google could explain it far better. Here is the google page on how to install reCapthca:https://developers.google.com/recaptcha/docs/v3

Method 3:Tracking spamming IP addresses. This method allows you to pinpoint which addresses are filling the site with Spam. Then you can block them (here is a site that explains how to actually block the offending IP addresses https://wpsites.net/wordpress-tips/how-to-block-an-i-p-address-from-accessing-your-website-using-ip-deny-manager/).

Here is the code you can use to find the addresses:

$ip = getenv("REMOTE_ADDR") ;


ip = '<%= Request.UserHostAddress>';

Okay that's it. I hope this post is helpful and if my explanations were subpar then feel free to just directly visit the below sources for more information. Also once again if this post isn't helpful then please delete it.

Sources:
1.https://www.lifewire.com/solutions-to-protect-web-forms-from-spam-3467469
2.https://developers.google.com/recaptcha/docs/v3
3https://wpsites.net/wordpress-tips/how-to-block-an-i-p-address-from-accessing-your-website-using-ip-deny-manager/
User avatar
Billobob
Ranger of the North
 
Posts: 1066
Joined: Thu Mar 26, 2015 8:50 am
Location: Greenwood the Great.
Top

Return to The One Ring

Who is online

Users browsing this forum: No registered users and 1 guest