!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/ezyang/htmlpurifier/maintenance/   drwxrwxr-x
Free 15.6 GB of 61.93 GB (25.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     rename-config.php (2.12 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/php
<?php

chdir
(dirname(__FILE__));
require_once 
'common.php';
require_once 
'../library/HTMLPurifier.auto.php';
assertCli();

/**
 * @file
 * Renames a configuration directive.  This involves renaming the file,
 * adding an alias, and then regenerating the cache.  You still have to
 * manually go through and fix any calls to the directive.
 * @warning This script doesn't handle multi-stringhash files.
 */

$argv $_SERVER['argv'];
if (
count($argv) < 3) {
    echo 
"Usage: {$argv[0]} OldName NewName\n";
    exit(
1);
}

chdir('../library/HTMLPurifier/ConfigSchema/schema');

$old $argv[1];
$new $argv[2];

if (!
file_exists("$old.txt")) {
    echo 
"Cannot move undefined configuration directive $old\n";
    exit(
1);
}

if (
$old === $new) {
    echo 
"Attempting to move to self, aborting\n";
    exit(
1);
}

if (
file_exists("$new.txt")) {
    echo 
"Cannot move to already defined directive $new\n";
    exit(
1);
}

$file "$old.txt";
$builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder();
$interchange = new HTMLPurifier_ConfigSchema_Interchange();
$builder->buildFile($interchange$file);
$contents file_get_contents($file);

if (
strpos($contents"\r\n") !== false) {
    
$nl "\r\n";
} elseif (
strpos($contents"\r") !== false) {
    
$nl "\r";
} else {
    
$nl "\n";
}

// replace name with new name
$contents str_replace($old$new$contents);

if (
$interchange->directives[$old]->aliases) {
    
$pos_alias strpos($contents'ALIASES:');
    
$pos_ins strpos($contents$nl$pos_alias);
    if (
$pos_ins === false$pos_ins strlen($contents);
    
$contents =
        
substr($contents0$pos_ins) . ", $oldsubstr($contents$pos_ins);
    
file_put_contents($file$contents);
} else {
    
$lines explode($nl$contents);
    
$insert false;
    foreach (
$lines as $n => $line) {
        if (
strncmp($line'--'2) === 0) {
            
$insert $n;
            break;
        }
    }
    if (!
$insert) {
        
$lines[] = "ALIASES: $old";
    } else {
        
array_splice($lines$insert0"ALIASES: $old");
    }
    
file_put_contents($fileimplode($nl$lines));
}

rename("$old.txt""$new.txt") || exit(1);

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.3192 ]--