Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // uncompress file
- // sudo apt-get install p7zip-full
- // 7z x LinkedIn_Kk82Nh.7z
- // no IP
- // sample entry
- // 16143536 : 0932d7750ad638546788dbde939bb930e1934516 -> mindisgrishkus@yahoo.com
- // 1249646 : 54b1864b5d26d512783e7d0ec2243e66bca9575b -> wuli91@gmail.com
- // 1056010 : xxx -> dennis_wong2000@yahoo.com
- // /Applications/MAMP/bin/php/php7.0.27/bin/php mysql.php
- $basePath = dirname(getcwd());
- require_once $basePath . '/config.php';
- // MySQL
- $mysqlCon = mysqli_connect($mysqlHost, $mysqlUsername, $mysqlPassword, $mysqlDBName);
- if (mysqli_connect_errno()){
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $leakSiteId = 24;
- $file = getcwd() . "/29.txt";
- $content = file_get_contents($file);
- $rows = explode("\n", $content);
- // print_r($rows);
- foreach ($rows as $row) {
- $row = str_replace(array("\n", "\r"), '', $row);
- $row = explode(" -> ", $row);
- // print_r($row);
- $email = isset($row[1]) ? trim(strtolower($row[1])) : null;
- if(!is_null($email) && filter_var($email, FILTER_VALIDATE_EMAIL)){
- // print_r($row);
- echo "linkedin.com | $email\n";
- $sql = "SELECT id FROM email WHERE email = '" . mysqli_real_escape_string($mysqlCon, $email) . "'";
- $result = mysqli_query($mysqlCon, $sql);
- if(mysqli_num_rows($result) > 0){
- while($row = mysqli_fetch_assoc($result)) {
- $emailId = $row["id"];
- }
- }else{
- $sql = "INSERT INTO email(email) VALUES ('" . mysqli_real_escape_string($mysqlCon, $email) . "')";
- mysqli_query($mysqlCon, $sql);
- $emailId = mysqli_insert_id($mysqlCon);
- }
- $sql = 'INSERT INTO email_leak_site(email_id, leak_site_id)
- VALUES (?, ?)';
- if($stmt = mysqli_prepare($mysqlCon, $sql)){
- mysqli_stmt_bind_param($stmt, "ii", $emailId, $leakSiteId);
- mysqli_stmt_execute($stmt);
- }
- } // is email
- } // rows in textfiles
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement