J. Mike Rollins (
Sparky
)
[rollins@wfu.edu]
CISSP
,
GIAC GPEN
Simulator: Timer Relay
New
Mike is on
LinkedIn
FaceBook
Resume
My Stuff
Art
My Truck
People
Electronics
Jacob's Ladder
Scripts
Math
Notes
SQL update
Base64
MySQL FK
smb
MIME
PHP/Perl Reference
My House
My Cars
My Cats
My Jokes
Pi Poetry
pumpkin
Toro Mower
Development
Linux
Speed of a Piston
Not a Pipe
Base64
The following will read from STDIN. The input will be base64 decoded and sent to STDOUT.
> echo "VGhpcyBpcyBhIHRlc3QK" | ./decode.pl
This is a test
#!/usr/bin/perl use strict; use MIME::Base64; my $src; while (my $line =
) { $src .= $line; } my $decoded = decode_base64($src); print $decoded; # To encode and decode: # $encoded = encode_base64('original text'); # $decoded = decode_base64('encoded text');