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 => “your.mail.server.com”,
Timeout => 20,
Debug   => 0,
) || die “SMTP failed”;

$smtp->mail(‘my.email@null.com’);     # use the sender’s address here
$smtp->recipient(‘someones.email@null.com’, ‘somebody.else@null.com’, { Notify => [‘FAILURE’,’DELAY’], SkipBad => 1 });   # Good
#        $smtp->to(‘someones.email@null.com’);        # recipient’s address
#        $smtp->to(‘somebody.else@null.com’);        # recipient’s address
$smtp->data();                      # Start the mail

# Send the header.
$smtp->datasend(“Priority: Urgent\n”);
$smtp->datasend(“To: someones.email\@null.com, somebody.else\@null.com\n”);
$smtp->datasend(“From: my.email\@null.com\n”);
$smtp->datasend(“Subject: Windows Perl Test Mail.\n”);
$smtp->datasend(“\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 helloworld.pl, like this:

    C:\> pl2bat helloworld.pl

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:

http://search.cpan.org/~jenda/Mail-Sender-0.8.10/Sender.pm

unix mail with perl

http://www.revsys.com/writings/perl/sending-email-with-perl.html

MIME::Lite::TT::

Free Anti Virus Software

April 8th, 2010

Avast –  Very good for rootkits.  Flexible antivirus tool.

rkhunter – tools used to find root kits.

AVG

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

FreeConference.com – Conference call service

IMDb – Movie Review Database

OpenOffice.org – 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:

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Performance Monitor:
http://support.microsoft.com/default.aspx?scid=kb;en-us;325558

Definitions:

http://blogs.technet.com/askperf/archive/2008/01/25/an-overview-of-troubleshooting-memory-issues.aspx