Category Archives: HOWTO

HOWTO – Encryption with Perl

I’m a huge fan of encryption, and here I’d like to show you how you can utilize the Crypt::Rijldael module to encrypt any blob of data. First, we need to initialize some modules. use Crypt::Rijndael; use MIME::Base64;use Crypt::Rijndael; use MIME::Base64; Let’s create the encryption function.  The function will take two inputs, the plain text, and the pass key to use.  It will output a base64 encoded blob of data. sub… Read Article →

Protect your family from porn – for free

Technology has a way to to infiltrate our lives in ways we can’t even imagine.  Kids have devices with wifi and access to the internet, and without even realizing, our children have access to all sorts of unsavory things on the internet. There are a bunch of software available that you can use to lock down the various devices in your house.  I’ve used some of them.  I found them… Read Article →

A simple guitar tuner – SOX

sox is a command line audio tool.  I use it from time to time to automate some audio related activities.  I play guitar from time to time, and I do like the idea of tuning my guitar by simply listening to the note.  Now there’s a ton of apps out there that can do the trick, but I decided to create an audio file that I can copy onto  my… Read Article →

TOTP in Perl

TOTP (or Time-based One-time Password Algorithm) is an algorithm used to generate a one-time password from a previously shared key.  Now if that confused you, maybe you’re more familiar with Google Authenticator.  If you’re keen to generate an OTP in Perl, or integrate it in your web application, then the code below can be used to either generate the OTP, or to check if the OTP is valid. #!/usr/bin/perl #… Read Article →

Sending emails through Gmail from Perl

Sending email through Perl can be done in many ways.  I like to simply call sendmail, but that approach is not always portable between operating systems.  For that, we use Net::SMTP.  But if you plan to send email via Gmail, normal plain ol’ port 25 SMTP won’t work.  For that, we need to switch to TLS/SSL with Authentication. But first, let’s review what the Gmail settings are. Server :… Read Article →

RSA Algorithm in Perl

The RSA algorithm is very cool. It basically allows the exchange of data between two parties by using a private and public key. I’m not going to try and convince or explain what RSA is. I will however show you how to do RSA in Perl from the ground up. The Crypt::RSA module should probably be used instead. I’m not trying to reinvent this module, but rather give a practical… Read Article →