25/02/06

More anti-spam regex updating

Permalink 10:21:39 am, Categories: Web Design, Programming, 234 words  

Recently there seems to have been a minor swarm of a new style of spam - insurance spam. An extra little bit to the regex and all should be good: insurance for your car, travel, motor, life or medical should all now be blocked.

Also, I've noticed before that spammers were encoding the comment title on a trackback, using the "&#" number code for the vowels. Recently, they've started doing it on the 'blog name' as well, so an update has been made:

$blog_name = preg_replace("~&(#?)(48|49|5[0-7]|6[4-9]|[78][0-9]|9[07-9]|1[01][0-9]|12[0-2]);~e",
    "chr('\\2')", $blog_name);

Now all blog names that encode any standard english letter will be swapped back to their real letter.

As a final note, it's rather strange, but I've actually received hits for searches on "anti-spam regex". As much as I like the idea of being some important spam-fighter, the complete regex is staying private so that it doesn't become common and the spammers don't learn it.

Edit: Typical - my anti-spam filter blocked my trackback to the last anti-spam post. Oh well, at least I know it's working!

Edit 2: ten hours later and four comments got through. Turns out that "\b" for word boundary counts a hyphen as a word boundary, but not an underscore! That minor oversight is now fixed and insurance-scam spam should now be fairly well blocked (until they decide to advertise some other form of insurance, on they try Pratchett's Inn-Sewer-Ants!)

13/02/06

Anti-spam RegEx updated

Permalink 10:14:07 pm, Categories: Programming, 181 words  

It seems like it's the most effective measure out there - create a custom RegEx within the Comment code, Trackback code and hit logging and alter it as I get things that pass through. It might be less effective on busier sites, where it'll get more false positives, but for this size and popularity of blog it's fine.

I've been keeping my "Trackback blocked" emails since the 24th January (I also used to send Comment blocked emails, but stopped them when comment spam came in a flood and I started getting too many emails). I've just updated my RegEx with the latest bout of words - about 20 in total - and checked the success ratio.

Having not updated the RegEx for a couple of weeks, and not blocking anything, I had 28 comments or trackbacks that had managed to sneak through in the three weeks, and 191 trackbacks stopped. Yes, that's just trackbacks, not including comments (which don't email me any more) or hit logs (which never emailed me). Not a bad ratio :)

Now to see how long this update lasts before someone gets through it!

06/02/06

New Dawn of War WTP Texture Tool

Permalink 10:53:58 am, Categories: Dawn of War, 215 words  

Following on from the announcements of the Command Line SGA Extractor, I have now managed to understand another file format and create an extractor and compiler for it!

It was a bit of a fight, especially since University has so far taught me nothing that is useful at this level, but the Dawn of War Texture Tool v1.1 can now successfully extract and compile any WTP file.

Although Beroc's tool was previously available for this, it didn't correctly handle non-square WTP textures (like the Space Marine Scouts) or textures with banners on. The Texture Tool can both compile and extract textures of any size (well, 512x512 and 512x256 and 128x128, other sizes haven't been specifically checked, but should work), textures with badges on, textures with banners on, or textures with both a badge and a banner on. There aren't many of the latter around, but the engine does handle it, so the tool does too!

So, if you're making skins for Dawn of War and want to recompile banner textures or Scout skins, the Dawn of War Texture Tool v1.1 should be able to handle it all.

Later releases will include RSH and RTX compilation and extraction, plus other features previously found, or not found but desired, in Beroc's WTP Tool and Spooky's RSH Viewer.

03/02/06

Stupidity and ignorance

Permalink 12:37:56 pm, Categories: Dawn of War, Programming, 377 words  

Firstly, this is a coding update, but preceeded by a commentary on the stupidity of some people.

Dawn of War skins aren't packaged as self-installing EXEs. If it is only a single skin, it doesn't make sense (zipped they are only about 600KB). If it is a full pack, then mine don't come with self-installers because I also make the Pattern Switcher, which wouldn't work with directly installed patterns. Besides, how difficult can it be to open a zip, enter a location and hit "extract"?

Apparently, for some people, too difficult. Now that isn't much of a problem on its own, I understand that not everyone will be as computer savvy, which is why I'm willing to help people who have problems.

What is bad is when people then go to the download and rate it as 1 with a comment 'Doesn't work!!' instead of contacting me. If it doesn't work, then how did everyone else install it? How did I get the in-game screenshots? and why didn't you read the bit on the comment form that says Please note: this form is for rating the download only. If you have any questions about it or are experiencing and problems, then please read the FAQs, contact the Administrator or ask at the Hive World Terra Forums?

Even worse is the arrogant and obnoxious American AOL user who instead of ignorance and lack of knowledge, showed stupidity by being abusive in his comment and rating it as 1 just because the creator got the name of one of the Chaos Legions wrong! Lets just say that the comment has been censored and nulled, and the less seen of people like that the better.

On to the actual news - the Download rating system has now been updated. As well as fixing a bug where it showed my name as the author on the View Ratings page, it now also allows for comments without ratings, as well as a method for me to null ratings. Hopefully it won't have to be used too much. It will now also send me an email when a comment is added, so I can catch people like this Virginian AOL user (as in the state in America) before the comment has been sat there too long.

Navigation