Advertisement
ANIKI12

mailist filter cli

Oct 16th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.60 KB | None | 0 0
  1. <?php
  2. #Aniki
  3. /*Security Cyber Art */
  4. function save($file,$emel) {
  5.         $buka = fopen("result/filter/".$file,"a"); //edit output disini euy
  6.         fwrite($buka,$emel);
  7.         fclose($buka);
  8.         }
  9.        
  10. # code nya ribet :'v
  11. #mungkin anda recode lagi biar rapi
  12. $gm[0] = '';
  13. $hm[0] = '';
  14. $yh[0] = '';
  15. $ao[0] = '';
  16. $ma[0] = '';
  17. $out[0] = '';
  18. $xtr[0] = '';
  19. $oth[0] = '';
  20. $x = 0;
  21. echo "===== Galautoolz - Email Filter ===== \n filter by Hotmail | Yahoo | Aol | Gmail | other \n";
  22. echo "NAME LIST : "; $list = trim(fgets(STDIN));
  23. #Grab file mailist
  24. $mailist = file($list);
  25.  
  26. # START FILTER
  27. echo "\n ===================================== \n";
  28. foreach($mailist as $email){
  29.                                     if(preg_match("/@gmail\./i",$email)){
  30.                                         $gm[$x] = $email;
  31.                                         echo " [ Gmail ] $email ";
  32.                                         save('r_gmail.txt',$email);
  33.                                         }
  34.                                         else if(preg_match("/@hotmail\./i",$email)){
  35.                                             $hm[$x] = $email;
  36.                                             echo "[ Hotmail ] $email";
  37.                                             save('r_hotmail.txt',$email);
  38.                                             }
  39.                                             else if(preg_match("/@yahoo\./i",$email)){
  40.                                                 $yh[$x] = $email;
  41.                                                 echo "[ Yahoo ] $email";
  42.                                                 save('r_yahoo.txt',$email);
  43.                                                 }
  44.                                                 else if(preg_match("/@aol\./i",$email)){
  45.                                                     $ao[$x] = $email;
  46.                                                     echo "[ Aol ] $email";
  47.                                                     save('r_aol.txt',$email);
  48.                                                     }
  49.                                                     else if(preg_match("/@mail\./i",$email)){
  50.                                                         $ma[$x] = $email;
  51.                                                         echo "[ Mail ] $email ";
  52.                                                         save('r_mail.txt',$email);
  53.                                                         }
  54.                                                         else if(preg_match("/@outlook\./i",$email)){
  55.                                                             $out[$x] = $email;
  56.                                                             echo "[ Outlook ] $email ";
  57.                                                             save('r_outlook.txt',$email);
  58.                                                             }
  59.                                                             else if(preg_match("/@xtra\.co\.nz/i",$email)){
  60.                                                                 $xtr[$x] = $email;
  61.                                                                 echo "[ Xtra ] $email";
  62.                                                                 save('r_xtra.txt',$email);
  63.                                                                 }
  64.                                                                 else{
  65.                                                                     $oth[$x] = $email;
  66.                                                                     echo " [ Other ] $email";
  67.                                                                     save('r_other.txt',$email);
  68.                                                                     }
  69.                                                                    
  70.                                                                     $x++;
  71.                                                                 }
  72.                                                             #TAMPILKAN DETAIL
  73.                                                             echo "\n==========================";
  74.                                                             echo "\nDONE  check in result/filter/* ";
  75.                                                             echo "\n Gmail : ".count($gm)."\n Hotmail : ".count($hm)."\n Yahooo : ".count($yh)."\n Aol : ".count($ao)."\n Mail : ".count($ma)."\n Outlook : ".count($out)."\n Xtra : ".count($xtr)."\n Other : ".count($oth)."\n \n";
  76.                                                            
  77.                                                             //copyright dari anda suatu kebanggan bagiku
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement