My various bits of code.
Recently, I've been coding up little useful bits of perl.
- train_spam — This script I toss in my crontab(5). It reads a pair of IMAP folders, and throws their contents at sa-learn(1), then moves the original messages to a different folder. Great way to train spamassassin(1)'s filters without needing to log into the box.
- ascii3check — I started noticing a pattern in the headers of my spam email -- I saw this extremely common string, and then started filtering on it with procmail(1). Lo and behold, about a year later, it finally clicked with me -- my email addresses were getting rotated by 3 or 13 characters. It wasn't normal rot13 that just stuck to a-z, it also did something to the @ sign, which became an }.
- waldogps — WaldoGPS is a perl script daemon that will take care of deleting Snort unified log files, after all the barnyard processes have finished reading them. It's great if you've got a snort sensor logging to multiple databases, with multiple copies of barnyard.
- check_disksuite — This is a plugin for Nagios. It's designed to check the consistancy of Sun Solaris Disk Suite volumes. When a volume goes bad, the script will report back to nagios what command needs to be run to fix it. Eg, metareplace d10 c1t1d0s1 c2t2d0s1.
- mason_session — This is the HTML::Mason::Request object that is handling this site, which adds sessions to Mason nicely — just $m->session->{'your_key'} = 'your val';
- check_msgid.m4 — This is a modified hunk of sendmail m4 code to quarantine messages that do not have a proper Message-Id header. It has the additional benefit of being able to whitelist sending servers via domain name.
- waldogps — WaldoGPS is a perl script daemon that will take care of deleting Snort unified log files, after all the barnyard processes have finished reading them. It's great if you've got a snort sensor logging to multiple databases, with multiple copies of barnyard.