Deleting trackback spam
Our coreblogs at Eibar.org also hit by the great trackback spam assault of yesterday, Feb. 1, 2005. After the exchange of messages at Coreblog-en, the mailing list, we produced our own python script to be run in Zope (updated with a variable factor), create a script and on the parameter list put spammer=xxx
,then the code as follows::
for i in range(1, 300): try: ent = context.get_entry(i) for com in ent.trackback_list(): if com.title.startswith (spammer): ent.deleteTrackback(int(com.id)) print "deleted %s's comment" % com.title except: pass print "Done." return printed
Being this site a community of coreblogs we placed that at the root like www.eibar.org/scriptPLACEDhere and our main blog's evil trackbacks were deleted (as far as you have less than 300 entries...), but it also worked with any blog placed below like www.eibar.org/blogak/teknosexua/scriptPLACEDhere?spammer=texas or www.eibar.org/blogak/sarasua/scriptPLACEDhere?spammer=cybersex or any other name variable that we may introduce depending on the spammer of the day.
scriptPLACEDhere is just a dummy name. We used another ID for the script.