Advertisement
Guest User

Untitled

a guest
May 3rd, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. <?php
  2.  
  3.    
  4.     $str = file_get_contents("/.mozilla-thunderbird/nc756405.default/Mail/pop.gmail.com/Inbox");
  5.    
  6.     /*
  7.      * Extract the list of user/passes in this email
  8.      */
  9.     $list_top = "registered to this e-mail address are:";
  10.     $list_bottom = "If you continue to have trouble signing in";
  11.    
  12.     // I'm not to sure on \n in regex.. so replace them out for now
  13.     $str = str_replace("\n", "~~n~~", $str);
  14.     $arr = array();
  15.     preg_match("/($list_top)(.*?)($list_bottom)/", $str, $arr);
  16.    
  17.     // Replace the \n back and trim it down for an array
  18.     $list = str_replace("~~n~~", "\n", $arr[2]);
  19.     $list = trim($list);
  20.    
  21.     // Wahey, the user/pass array :)
  22.     $account_list_tmp = split("\n", $list);
  23.     $account_list = array();
  24.     foreach($account_list_tmp as $row){
  25.         $user = split("   ", $row);
  26.         $account_list[] = array($user[0], $user[1]);
  27.     }
  28.    
  29.    
  30.  
  31.     foreach($account_list as $user){
  32.         $user_name = $user[0];
  33.         $user_pass = $user[1];
  34.        
  35.         // SAVE IT HERE
  36.     }
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement