“groovy mother...”

Hiding referer spam in AWStats

January 21, 2005

Hiding referer spam in AWStats

Inspired by derefspam.pl, and my own issues with referer spam, I’ve hacked together a patch to AWStats(AWStats – Free log file analyzer for advanced statistics (GNU GPL).) which will cause it to ignore referer URLs which match the MT-Blacklist Comment Spam blacklist.

Grab the patch from SourceForge.

(AWStats users might also be interested in my other two patches, which allow it to report RSS readers: Patch 1, Patch 2)

Comments

About 5 years, 1 month ago, Arve commented:

Which version of AWStats are these patches for? I am currently running 6.3, and would hate to see stuff break if I run these.

(As for your RSS reader patch: It misses Opera 7.5 and up in news aggregator mode, since Opera's User Agent string says nothing about it being an aggregator.)

About 5 years, 1 month ago, Rod commented:

They were made from AWStats 6.2, but they're universal diffs, so they should apply cleanly to 6.3. If not, just patch -R them to revert.

The RSS patch doesn't recognise Opera's RSS reading specifically, but neither does it recognise Firefox's "Live Bookmarks". I think this is fair, since they're the same User Agent.

About 5 years, 1 month ago, Michael Paul commented:

Nice Rod. I'm so tired of sifting thru Referer's for legit site visits. Downloaded the patch but have yet to set it up. The instructions on Sourceforge are petty minimal. Maybe its that simple. I did have a few questions.

Where does the patch go? Is it a script that I need to run a cronjob for, or does the config run it when you add the extra line in it?

1) Get the latest blacklist.txt from
http://www.jayallen.org/comment_spam/ (You might want
to make this a cronjob)

My blacklist seems to update itself. At least I see it updating either daily or weekly. Of course there are my own additions that I've built over time. Can I just keep the current list?

2) Edit your awstats.?.conf file to include the line
RefererBlacklist="/path/to/blacklist.txt"

Soon as I know what to do with it I'll try it out.

About 5 years, 1 month ago, David commented:

Looks like just what we need, but I can't figure out how to install the patch.
Apologies for my ignorance -- I did look all through the AWStats site and forums, and Googled until my eyes were sore.

About 5 years, 1 month ago, ktpupp commented:

I'm stuck at this point:

2) Edit your awstats.?.conf file to include the line
RefererBlacklist="/path/to/blacklist.txt"

Where do I find this .conf file, and how do I enter this line? I found an awstats.model.conf file, is this the one? I opened it in notepad and it was a lot of code that I didn't dare add to for fear of breaking it!

I'm being slammed with awful referer spam and would love to get them out of my stats!

-=kt=-

About 5 years, 1 month ago, Markus commented:

Michael Paul, I've got the same problem as you. I can't find any instructions on how to use this patch.

About 5 years, 1 month ago, Rod commented:

You apply the patch using the standard GNU patch tool. If this is outside your realm of experience, then this patch might not be for you.

About 5 years, 1 month ago, ktpupp commented:

I saw on another site that I could just copy the text of the patch into the awstats.pl file since I can't install the patch from a command prompt in Windows. Is this true? If so, what needs to be copied and where should it be placed?

I really need this to work because my stats are worthless to me if I have to wade through thousands of junk referals and porn searches that are filling my logs/stats.

I'd really appreciate some help as I was not able to get any from the forum at the SourceForge page... Thanks!

-=kt=-

Post a comment

Due to spam, posting comments to old entries is disabled.

saute-swinish