Archive for the 'Windows' Category

Sending mail using Perl on Windows NET::SMTP

May 11th, 2010

NET:SMTP is a bit limited compared to Mail::Sender  or MIME::Lite.  For simple emails is is nice and simple.  It can also be handy when working on system where it is very difficult to make changes.  In my case I had 15 system with different version of Perl and make changes was difficult at best.

#!/perl/bin -w

use Net::SMTP;

$smtp = Net::SMTP->new( Host => “”,
Timeout => 20,
Debug   => 0,
) || die “SMTP failed”;

$smtp->mail(‘’);     # use the sender’s address here
$smtp->recipient(‘’, ‘’, { Notify => [‘FAILURE’,’DELAY’], SkipBad => 1 });   # Good
#        $smtp->to(‘’);        # recipient’s address
#        $smtp->to(‘’);        # recipient’s address
$smtp->data();                      # Start the mail

# Send the header.
$smtp->datasend(“Priority: Urgent\n”);
$smtp->datasend(“To:\, somebody.else\\n”);
$smtp->datasend(“Subject: Windows Perl Test Mail.\n”);

# Send the body.
$smtp->datasend(“Please reply if you recieved this email.  My name is Mud.\n”);
$smtp->dataend();                   # Finish sending the mail
$smtp->quit;                        # Close the SMTP connection

If you call the pl2bat utility on your Perl script, like this:

    C:\> pl2bat

it will produce a batch file, helloworld.bat. You can then invoke the script just like this:

    C:\> helloworld
     Hello, World!

You can invoke it on the command line like this:

cat myfile.txtYou can use it with I/O redirection (Windows 2000 SP3 and later) like this:

cat myfile.txt > newfile.txt cat myfile.txt | more

The best approach to use when writing Perl scripts that need to send email and also need to work on both UNIX and Windows systems is to use the Mail::Sender modules

You can install Mail::Sender by running:

  ppm install mail-sender

…at a command prompt. Documentation for using Mail::Sender is available here:

unix mail with perl


Free Anti Virus Software

April 8th, 2010

Avast -  Very good for rootkits.  Flexible antivirus tool.

rkhunter – tools used to find root kits.


iAntiVirus – Anti Virus for Mac.

Comodo – firewall fairly easy

Gdata – uses 2 A/V engines

Vipre – is a very slim software excellent for netbooks, and power users who prefer perforance.

BitDefender – possibly the best graphical interface for Linux.  Works with both Linux and Windows.  Can attach a windows disk to a Linux box then scan it.

Avira/Antivir – good CLI.  Can attach a windows disk to a Linux box then scan it.  Finds stuff that other tools do not.

MSE (Microsoft Security Essentials) – Anti Virus from Microsoft.  This should be the absolute minimum that is used on a Windows machine.  Simple, free effective.

ClamAV – Used for Mail Servers.

Dr.Web CureIt! – virus checker that you can put on a USB. This program is a small binary that you is manually launched.

ESET Smart Security Anti Virus and learning Firewall.

ZoneAlarm – Antivirus, Boot Authentication, encryption.  This program has come a long way but is no longer the light weight tool it once was.  Requires active participation.

Free Tools / Downloads

March 2nd, 2010

Ad-Aware Free – Find and remove SpyWare

Audacity – Record and edit Sound

BitTorrent – file Sharing

Dropbox – 2gb of online data – Conference call service

IMDb – Movie Review Database – Office Sweet

Gimp – Image Editor

Putty – xterm for Windows

Keypass – Password Safe

Password Safe -  the name says it all

superantispyware – find and remove spyware

 ccleaner – cleans unused files, web traffic etc

Fences – Organize Windows Desktop Icons

defraggler – Defrag Windows

UltraDefrag - Defrag Window

MSE – Remove Spy Ware

BGInfo – System information on Windows Desktop

Windows – Memory/Performance Troubleshooting

August 19th, 2009

Process Explorer:

Performance Monitor:;en-us;325558