#!/usr/bin/perl 

# Vrfy.pl - By B-r00t. 23/03/2001.
#
# An SMTP Protocol Hacker.
# Vrfy.pl uses the vrfy command to verify users/mail accounts on a network
# by using a list of common system names like root, admin etc ...
#
# USAGE vrfy.pl -h HOST -l Names_list.
#
# ENJOY!


use IO::Socket;
use Getopt::Std;
getopt ("h: l:");
use vars qw( $opt_h $opt_l );


if ((! $opt_h) || (! $opt_l ))  {
print "\n\nUSEAGE : vrfy.pl -h [Host OR IP] -l Names_List\n\n ";
exit 1;	
	};

$host = $opt_h;
$list = $opt_l;
open (LIST, "$list") or die "\n Unable to open $list ....\n\n $!";

&connect;
exit 0;


sub connect {
print "\n\nConnecting To $host SMTP Port 25 ....";
 $connection = IO::Socket::INET->new (
                                Proto => "tcp",
                                PeerAddr => "$host",
                                PeerPort => "25",
                                ) or die "\nSorry UNABLE TO CONNECT To $host On Port 25.\n";
$connection -> autoflush(1);
print "  connected !!!\n\n";


# do HELO first ...
print $connection "HELO localhost\r\n";
$helo = <$connection>;

foreach $name (<LIST>) {
print $connection "vrfy $name\r\n";
$results = <$connection>;
			if ( $results =~/25./g ) {
			print "$results\n\n";
			};
};
close $connection;
close LIST;
};

# Another fine B-r00t production ...
# B-r00t aka B#. 2001.
# "If You Can't B-r00t Then Just B#."
# Br00tzC0ntactz@Hotmail.Com
# ICQ 24645508.
# THE END - AMEN.

