This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use lib( '/home/fbl/lib' ); # Or wherever you store your custom perl libs | |
use Email::ARF::Hotmail; | |
my $message = do { local $/; <>; }; | |
# Extract the single part mime | |
my $report = Email::ARF::Hotmail->create_report($message); | |
print $report->as_string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use Fcntl qw(:DEFAULT :flock); | |
use constant LOCKFILE => '/tmp/default.lck'; | |
use constant TIMEOUT => 10; | |
my $cmd = shift || die ("You must give a sub command to run\n"); | |
my $timeout = shift || TIMEOUT; | |
my $filename = shift || LOCKFILE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function die | |
{ | |
echo "$1" | |
exit 1 | |
} | |
touch /tmp/default.lck || die "Could not touch /tmp/default.lck" | |
perl /usr/local/bin/lock-and-process.pl '/usr/local/bin/some_script.sh' || die 'Could not get lock for /usr/local/bin/some_script.sh' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# A little script to take in some kinds of formats, and output | |
# the converted IPs based on the type of rbl zone being used. | |
# | |
# This is specifically used for including exclusion lists into | |
# a rbldnsd zone file. This will take a generic list of IPs, | |
# and output them for the appropriate rbldnsd zone type. | |
# | |
# Author: pblair (at) tucows (dot) com | |
# Date: Fri Jan 7 13:44:20 EST 2011 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# This script takes a series of ARF messages, and stores certain attributes | |
# about these messages, so that other applications can easily look into | |
# only the messages that they care about without having to go into lots | |
# and lots of files. | |
use strict; | |
use Time::ParseDate; # libtime-modules-perl | |
use lib( '/abuse/AUP/lib' ); | |
use Email::ARF::Report; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# This script takes a series of ARF messages, and stores certain attributes | |
# about these messages, so that other applications can easily look into | |
# only the messages that they care about without having to go into lots | |
# and lots of files. | |
use strict; | |
use lib( qw( /abuse/AUP/lib /abuse/AUP/plugins ) ); | |
use Email::ARF::Report; | |
use MLDBM; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function strip_filename | |
{ | |
perl -lane 'print $1 if /filename:\[(\S+?)\]/' - | |
} | |
function epoch | |
{ | |
perl -lane '$d=gmtime($1) if /epoch:\[(\d+)\]/; s/epoch:\[\d+\]/epoch:\[$d\]/ and print' - | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use JSON; | |
use Data::Dumper; | |
use Getopt::Long; | |
use constant MAX => 140; | |
use constant MAXGOBACK => 999999; | |
use constant MAXLOOKUP => 99; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use POE::Component::DirWatch::Object; | |
our %seen; | |
sub extractContents { | |
my $filename = shift; | |
print "Opening: $filename\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pblair@abuse1:/etc/postfix$ cat -n main.cf | grep crappy_ptr -B4 -A5 | |
50 smtpd_client_restrictions = | |
51 #reject_unknown_client, | |
52 permit_mynetworks, | |
53 reject_unknown_reverse_client_hostname, | |
54 check_client_access regexp:/etc/postfix/crappy_ptr | |
55 hash:/etc/postfix/client_access, | |
56 sleep 5, | |
57 reject_unauth_pipelining |