Use of uninitialized value in pattern match (m//) at ./usercheck.pl line 35. Use of uninitialized value in pattern match (m//) at ./usercheck.pl line 35. #### #!/usr/bin/perl -w # by n00dles use IO::Socket; use strict; my $target = 'localhost'; my $userlist = 'uselist.txt'; my $timeout = 40; print "Content-type: text/html\n\n"; print ""; print "
\n";
print "

Active Apache user accounts

\n\n"; print "Loading from file $userlist\n"; open(USERS, "< $userlist") or die "cannot open file: $!\n"; my @users =; close(USERS); print "User list $userlist loaded!\n"; print "Starting Scan please wait...\n"; for (my $i = 0; $i < scalar(@users); $i++) { my $socket = new IO::Socket::INET ( peerAddr => $target, peerPort => '80', Proto => 'tcp', Timeout => $timeout,); die "Socket failed at $target\n" unless $socket; print $socket "GET http://$target/~$users[$i] HTTP/1.0\r\n\r\n"; my @source = <$socket>; foreach my $line ($source[2]) { if ($line =~/302 Found/ || $line =~ /200 OK/ || $line =~ /403 Forbidden/ || $line =~ /301 Moved Permanetly/) { print "Found: $users[$i]"; } } close($socket); } print "";