Advertisement
AZZATSSINS_CYBERSERK

Email extractor (mysql)

Mar 24th, 2017
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.32 KB | None | 0 0
  1. <style>
  2.     #sbz {text-align: center;color: #000;font-size: 30px;font-weight: bold;line-height: 0.8em;letter-spacing: 0.2em;margin:0;text-shadow: 0 1px 20px #00FF00, 0 0 5px #00FF00, 0 0px 30px #00FF00, 1px 0 3px #00FF00;}
  3.     span.tab{padding: 0 10px; }
  4.     .box{
  5.         -moz-box-shadow: 1px 1px 8px #666;
  6.         -webkit-box-shadow: 1px 1px 8px #666;
  7.         box-shadow: 1px 1px 8px #40D5D2;
  8.         border: solid 1px black;
  9.         -webkit-border-radius: 8px 8px 0px 0px;
  10.         -moz-border-radius: 8px 8px 0px 0px;
  11.         border-radius: 8px 8px 0px 0px;
  12.         margin: 15px 0px;
  13.         background-color: #F5F5F5;
  14.          opacity: 0.8;
  15.          width:840px;
  16.     }
  17.     #footer {
  18.     position : absolute;
  19.     bottom : 0;
  20.     height : 40px;
  21.     margin-top : 40px;
  22.     }
  23.     body{
  24.         background-color: black;
  25.        background: url('http://images7.alphacoders.com/332/332232.jpg') no-repeat center center fixed;
  26.     }
  27. </style>
  28. <?php
  29.     @set_time_limit(0);error_reporting(0);
  30.     echo '<html><head><title>Email extractor</title></head><body><center><pre id="sbz">Email extractor by T3N38R15</pre><div class="box" align="left"><center>';
  31.     if(!empty($_GET["rm"])){unlink('emails.txt');echo '<script> alert("email file deleted");window.location="'  . $_SERVER["PHP_SELF"] . '";</script>';}
  32.     if(!empty($_POST["server"])){
  33.         $vr=false;if(!empty($_POST["filesf"])){if($_POST["filesf"]=="on"){$vr=true;}}
  34.         if($vr==true){ignore_user_abort(true);$fh = fopen("emails.txt", 'w') or die("can't open file " . getcwd() . '/emails.txt');}
  35.         mysql_connect($_POST["server"], $_POST["user"], $_POST["pw"]) OR die("not connected");
  36.         $res1 = mysql_query("SHOW DATABASES");
  37.         echo '<textarea style="width:98%;" rows="25">';
  38.         while ($row1 = mysql_fetch_assoc($res1)) {
  39.             $res2 = mysql_query("SHOW TABLES FROM " . $row1['Database']);
  40.             while ($row2 = mysql_fetch_assoc($res2)) {
  41.                 $res3 = mysql_query("SHOW COLUMNS FROM " . $row1['Database'] . "." . $row2['Tables_in_' . $row1['Database']]);
  42.                 while ($row3 = mysql_fetch_assoc($res3)) {
  43.                     if(strstr($row3['Field'], "email")) {
  44.                         $res4 = mysql_query("select " . $row3['Field'] ." FROM " . $row1['Database'] . "." . $row2['Tables_in_' . $row1['Database']]);
  45.                         while ($row4 = mysql_fetch_assoc($res4)) {if(!empty($row4[$row3['Field']])){if(strstr($row4[$row3['Field']], "@")){echo $row4[$row3['Field']] . "\n";if($vr==true){fwrite($fh, $row4[$row3['Field']] . "\n");}}}}
  46.                     }
  47.                 }
  48.            
  49.             }    
  50.         }
  51.         echo '</textarea>';
  52.         if($vr==true){fclose($fh);echo '</br><a href="emails.txt">Here are your Emails</a><span style="padding: 0 20px;"></span><a href="' . $_SERVER["PHP_SELF"] . '?rm=1">Remove email File</a>';}
  53.     }else{
  54.         echo '<form method="POST"><table><tr><td>Server : <input type="text" name="server" value="localhost"\></td></tr><tr><td>User : <input type="text" name="user" value="root"\></td></tr><tr><td>Password : <input type="text" name="pw" value=""\></td></tr><tr><td>Save-to-file : <input type="checkbox" name="filesf"\></td></tr><tr><td><input type="submit" value="send"\></td></tr></table></form>';    
  55.     }
  56.     echo '</center></div></center></body></html>';
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement