actual scripts

This commit is contained in:
2015-06-15 01:58:20 +02:00
parent 7c4bc93b3c
commit 5b9d32f886
7 changed files with 406 additions and 0 deletions

20
decode_mime.pl Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/perl
use Email::MIME;
use warnings;
use strict;
unless ($ARGV[0] and -f $ARGV[0]) {
die "pass in the filename of the email as an argument.";
}
open FILE, "<$ARGV[0]";
undef $/;
my $email = <FILE>;
my $parsed = Email::MIME->new($email);
my @parts = $parsed->parts;
foreach my $el (@parts) {
print $el->body;
last;
}