Hello There, Guest! Login Register
Logo
Dismiss this notice
MaDLeeTs is not responsible for any attacks that are carried out on networks, websites or servers.
MaDLeeTs staff members cannot be held responsible.
All information on this forum is for educational purposes only.


Email extractor (mysql)

  • 0 Vote(s) - 0 Average


07-31-2014, 04:34 AM #1
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
Hello Madleets,
today i want to share witch you one of my new tools to extract emails from a mysql db Smiley1
you just need the login data and then you just need to hit send Tonguesmiley
[Image: pic1.jpg]
[Image: pic2.jpg]
Code Version 2.0 :
PHP Code:
<style>
    
#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;}
    
span.tab{padding0 10px; }
    .
box{
        -
moz-box-shadow1px 1px 8px #666;
        
-webkit-box-shadow1px 1px 8px #666;
        
box-shadow1px 1px 8px #40D5D2;
        
bordersolid 1px black;
        -
webkit-border-radius8px 8px 0px 0px;
        -
moz-border-radius8px 8px 0px 0px;
        
border-radius8px 8px 0px 0px;
        
margin15px 0px;
        
background-color#F5F5F5;
         
opacity0.8;
         
width:840px;
    }
    
#footer {
    
position absolute;
    
bottom 0;
    
height 40px;
    
margin-top 40px;
    }
    
body{
        
background-colorblack;
       
backgroundurl('http://images7.alphacoders.com/332/332232.jpg'no-repeat center center fixed;
    }
</
style>
<?
php
    
@set_time_limit(0);error_reporting(0);
    echo 
'<html><head><title>Email extractor</title></head><body><center><pre id="sbz">Email extractor by T3N38R15</pre><div class="box" align="left"><center>';
    if(!empty(
$_GET["rm"])){unlink('emails.txt');echo '<script> alert("email file deleted");window.location="'  $_SERVER["PHP_SELF"] . '";</script>';}
    if(!empty(
$_POST["server"])){
        
$vr=false;if(!empty($_POST["filesf"])){if($_POST["filesf"]=="on"){$vr=true;}}
        if(
$vr==true){ignore_user_abort(true);$fh fopen("emails.txt"'w') or die("can't open file " getcwd() . '/emails.txt');}
        
mysql_connect($_POST["server"], $_POST["user"], $_POST["pw"]) OR die("not connected");
        
$res1 mysql_query("SHOW DATABASES");
        echo 
'<textarea style="width:98%;" rows="25">';
        while (
$row1 mysql_fetch_assoc($res1)) {
            
$res2 mysql_query("SHOW TABLES FROM " $row1['Database']);
            while (
$row2 mysql_fetch_assoc($res2)) {
                
$res3 mysql_query("SHOW COLUMNS FROM " $row1['Database'] . "." $row2['Tables_in_' $row1['Database']]);
                while (
$row3 mysql_fetch_assoc($res3)) {
                    if(
strstr($row3['Field'], "email")) {
                        
$res4 mysql_query("select " $row3['Field'] ." FROM " $row1['Database'] . "." $row2['Tables_in_' $row1['Database']]);
                        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");}}}}
                    }
                }
            
            }    
        }
        echo 
'</textarea>';
        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>';}
    }else{
        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>';    
    }
    echo 
'</center></div></center></body></html>';
?>
if you like it add a rep+ Smiley1
have fun and get emails Biggrinsmiley

[Image: xodhvlpa.jpg]
[Image: test.php]

07-31-2014, 07:57 AM #2
Sahrawi Offline Super Moderator ******
Super Moderators
Posts:544 Threads:60 Joined:Jan 2013 Reputation: 8
Mood: None
nice tool man
you look for mail field in database an exectarct it
$row3['Field'], "email"

07-31-2014, 08:25 AM #3
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
thx Smiley1 jep my tool search for email columns and read the items Biggrinsmiley

[Image: xodhvlpa.jpg]
[Image: test.php]

07-31-2014, 06:09 PM #4
Dr-SiLENt Offline Respected *****
Respected
Posts:24 Threads:8 Joined:Jan 2013 Reputation: 0
Mood: None
good share brother user and pass database user and pass

07-31-2014, 08:40 PM #5
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
thx Bro,
maybe i add a option to searching bigger mysql-dbs,
then you can check a checkbox and then will the result saved as email.txt ...
maybe what are you thinking ?
Update [File-safe] is now possible Smiley1 update is on the top of the thread Smiley1

[Image: xodhvlpa.jpg]
[Image: test.php]

09-10-2014, 11:23 AM #6
Killeros Offline Junior Member **
Registered
Posts:12 Threads:1 Joined:Sep 2014 Reputation: 0
Mood: None
i have tried this on a mysql db with many website dbs .. that contains aprox 150k email addresses .. but it only finds 6k email address .. i tried to play with the code but no luck . maybe you can do something so the script will search in all the db's from a myslq server .

09-11-2014, 03:08 AM #7
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
Smiley1 i can do it but this is can took a long time to search in all dbs and tables Smiley1

[Image: xodhvlpa.jpg]
[Image: test.php]

09-11-2014, 04:42 AM #8
Killeros Offline Junior Member **
Registered
Posts:12 Threads:1 Joined:Sep 2014 Reputation: 0
Mood: None
i do not think that will be a problem if it`s a working method of extracting Biggrinsmiley

09-11-2014, 11:08 PM #9
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
ok wink i will try it, but the output can took a long time ...
maybe i put the result in a file on the server Smiley1

[Image: xodhvlpa.jpg]
[Image: test.php]

09-26-2014, 07:40 PM #10
Killeros Offline Junior Member **
Registered
Posts:12 Threads:1 Joined:Sep 2014 Reputation: 0
Mood: None
any news on this awesome script ?






Forum Jump:


Users browsing this thread:1 Guest(s)