For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > October 2005 > sending a scan result with perl by mail









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author sending a scan result with perl by mail
juanbabi@gmail.com

2005-10-31, 9:55 pm

HI,

I am trying to write a script which will scan one of my machines for
open ports and send me the result by mail using qmail.

this is the script I wrote ( im really new in perl..), It doesnt work:

#!/usr/bin/perl
#use strict;
use warnings;
my $nmap_result = `/usr/bin/nmap -p 1-1024 192.168.1.1`;
echo "$nmap_result" | /var/qmail/bin/qmail-inject juanbabi@yahoo.com


for sending mails with qmail I do usually ( in the command line):


echo "here I insert my messege" | /var/qmail/bin/qmail-inject
juanbabi@gmail.com

how I make it work ?

please help!

Juan

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com