!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/queuepro/node_modules/browser-sync-ui/lib/   drwxrwxr-x
Free 13.22 GB of 57.97 GB (22.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     client-elements.js (2.01 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var fs = require("fs");

const CLIENT_FILES_OPT = "clientFiles";

/**
 * Enable a element on clients
 * @param clients
 * @param ui
 * @param bs
 * @returns {Function}
 */

var types = {
    "css": "text/css",
    "js":  "application/javascript"
};

function enableElement (clients, ui, bs) {

    return function (file) {

        var uiItem   = ui.getOptionIn([CLIENT_FILES_OPT, file.name]);
        var item     = uiItem.toJS();
        var enableFn = uiItem.getIn(["callbacks", "enable"]);

        if (item.active) {
            return;
        }

        ui.setOptionIn([CLIENT_FILES_OPT, item.name, "active"], true, {silent: true});

        if (enableFn) {
            enableFn.call(ui, item);
        }

        if (item.file && !item.served) {

            ui.setOptionIn([CLIENT_FILES_OPT, item.name, "served"], true, {silent: true});

            bs.serveFile(item.src, {
                type:    types[item.type],
                content: fs.readFileSync(item.file)
            });
        }

        addElement(clients, ui.getOptionIn([CLIENT_FILES_OPT, item.name]).toJS());
    };
}

/**
 * @param clients
 * @param ui
 * @returns {Function}
 */
function disableElement (clients, ui) {

    return function (file) {
        var uiItem    = ui.getOptionIn([CLIENT_FILES_OPT, file.name]);
        var item      = uiItem.toJS();
        var disableFn = uiItem.getIn(["callbacks", "disable"]);

        if (disableFn) {
            disableFn.call(ui, item);
        }

        ui.setOptionIn([CLIENT_FILES_OPT, item.name, "active"], false, {silent: true});

        removeElement(clients, item.id);
    };
}

/**
 * @param clients
 * @param item
 */
function addElement (clients, item) {

    clients.emit("ui:element:add", item);
}

/**
 * @param clients
 * @param id
 */
function removeElement(clients, id) {

    clients.emit("ui:element:remove", {id: id});
}

module.exports.addElement    = addElement;
module.exports.removeElement = removeElement;
module.exports.enable        = enableElement;
module.exports.disable       = disableElement;


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0105 ]--