!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/live/   drwxr-xr-x
Free 13.05 GB of 57.97 GB (22.52%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     script_main.js (7.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
// document.onkeydown = function(e) {
//     if (e.keyCode === 123 || // F12
//         (e.ctrlKey && e.shiftKey && ['I', 'J', 'C', 'E'].includes(String.fromCharCode(e.keyCode))) || 
//         (e.ctrlKey && e.keyCode === 'U'.charCodeAt(0)) || // Ctrl+U
//         (e.ctrlKey && e.keyCode === 'S'.charCodeAt(0))    // Ctrl+S
//     ) {
//         e.preventDefault();
//         return false;
//     }
// };

// Disable right-click menu
// document.addEventListener('contextmenu', function(e) {
//     e.preventDefault();
// });

function invalidKey() {
    $("body").empty();
    $("body").append('<p style="display: block;\
    margin-block-start: 1em;\
    margin-block-end: 1em;\
    margin-inline-start: 0px;\
    margin-inline-end: 0px;\
    unicode-bidi: isolate;\">The requested URL was not found on this server.</p>\
    <h1 style="display: block;\
    font-size: 2em;\
    margin-block-start: 0.67em;\
    margin-block-end: 0.67em;\
    margin-inline-start: 0px;\
    margin-inline-end: 0px;\
    font-weight: bold;\
    unicode-bidi: isolate">Not Found</h1>');
}
// function checkPassword(pass) {
//     console.log(pass);
    
//     const password = document.getElementById('password').value;
//     const error = document.getElementById('password-error');
//     if (password === pass) {
//         passwordModal.style.display = 'none';
//         return 1;
//     } else {
//         error.textContent = 'Incorrect password. Please try again.';
//         return 0;
//     }
// }
var pass;
var live_data;
var item_data;

$(document).ready(function(){
    // var auth={
    //     "authorization": "Basic " + btoa("Mongo_API"+":"+"jiFFMongo@2023!@!@!@")
    // };
    const urlParams = new URLSearchParams(window.location.search);
    const key = urlParams.get('key'); 
    // if (!key || key.length< 8) {
    //     invalidKey();
    // }else{
        $.ajax({
            url: "https://live.afridijamir.workers.dev/"+key,
            method:"GET",
            // headers:auth,
            success: function( result ) {
                live_data=result.live;
                pass=live_data.code;
                item_data=result.items;
                // appendData();

                // var pass=checkPassword(live_data.code);
                // console.log(pass);
            },
            error : function (err, status) {
                console.log("error");
                
                invalidKey();
            }
        });
    // }
});
function appending(element,live_class ="",live_now="",apply="",lived="") {
    var image_url='https://jiffp.sgp1.digitaloceanspaces.com/'+element.folder+"/"+element.image;
    $(".container").append(
        '<div class="item '+live_class+'">\
            '+live_now+'\
            <img src="'+image_url+'" alt="'+element.title+'" class="item-image">\
            <div class="item-content">\
                <div class="item-title">'+element.title+'</div>\
                <div class="item-details">#'+element.product_code.split("_")[1]+' </div>\
                '+lived+'\
            </div>\
            '+apply+'\
        </div>'
    )
}
function secondsToTimeString(seconds) {
    const hours = Math.floor(seconds / 3600);
    const minutes = Math.floor((seconds % 3600) / 60);
    const remainingSeconds = seconds % 60;
    
    const parts = [];
    if (hours > 0) parts.push(`${hours}h`);
    if (minutes > 0) parts.push(`${minutes}m`);
    if (remainingSeconds > 0) parts.push(`${remainingSeconds}s`);
    
    return parts.join(' ');
}

function appendData() {
    // $(".video-wrapper").append('<iframe src="'+live_data.live_url+'" frameborder="0" allowfullscreen></iframe>');
    // $(".video-wrapper").append('<iframe allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" allowfullscreen="true" frameborder="0" height="0" scrolling="no" src="'+live_data.live_url+'" style="border:none;overflow:hidden" width="0"></iframe>');
    var index=item_data.findIndex(obj => obj.product_code === live_data.live_now);
    appending(item_data[index],'live-item','<div class="live-sticker">Live Now</div>');
    if (index !== -1) {
        item_data.splice(index, 1); // Remove the object at the found index
    }
    var lived_product=live_data.lived_product;
    var lived_product_key=Object.keys(lived_product);    
    var not_lived = item_data.filter(obj => !lived_product_key.includes(obj.product_code));
    not_lived.forEach(element => {
        var apply=`<button class="apply-button" onclick="startCountdown(this,'${element.product_code}')">Apply</button>`;
        appending(element,'','',apply);
        index=item_data.findIndex(obj => obj.product_code === element.product_code);
        if (index !== -1) {
            item_data.splice(index, 1);
        }
    });
    item_data.forEach(element => {
        var duration=secondsToTimeString(lived_product[element.product_code]);  
        var apply=`<button class="apply-button" onclick="startCountdown(this,'${element.product_code}')">Apply</button>`;        
        var lived='<div class="item-details">Lived : '+duration+' </div>';
        appending(element,'lived-item','',apply,lived);
    });
}
document.addEventListener("DOMContentLoaded", function () {
    const passwordModal = document.getElementById('password-modal');
    if (passwordModal) {
        passwordModal.style.display = 'flex';
    } else {
        console.error("Password modal not found.");
    }
    window.checkPassword = function () {        
        const password = document.getElementById('password').value;
        const error = document.getElementById('password-error');
        if (password == pass) {
            passwordModal.style.display = 'none';
            appendData();
        } else {
            error.textContent = 'Incorrect password. Please try again.';
        }
    };
});

function toggleAccordion() {
    const content = document.getElementById("accordion-content");
    const toggleText = document.getElementById("accordion-toggle");
    if (content.style.display === "none" || !content.style.display) {
        content.style.display = "block";
        toggleText.textContent = "⬆ Hide Video";
    } else {
        content.style.display = "none";
        toggleText.textContent = "⬇ Show Video";
    }
}

function startCountdown(button,product_code) {    
    var data={
        "vendor_id":live_data.vendor_id,
        "product_code":product_code,
        "live_id":live_data.live_id
    };
    $.ajax({
        url: "https://liveitem.afridijamir.workers.dev",
        method:"POST",
        contentType: "application/json", // Set content type to JSON
        data: JSON.stringify(data), // Convert JavaScript object to JSON string
        success: function( result ) {
            let countdown = 10;
            const originalText = button.innerHTML;
            button.disabled = true;    
            const interval = setInterval(() => {
                if (countdown > 0) {
                    button.innerHTML = `<span class='countdown'>${countdown--} seconds...</span>`;
                } else {
                    clearInterval(interval);
                    button.innerHTML = '<span class="success">Applied</span>';
                    button.style.backgroundColor = "#28a745";
                    button.style.color = "#fff";
                    location.reload(true);
                }
            }, 1000);
        },
        error : function (err, status) {
            console.log(err);
            
            alert("Something is wrong. Please try again.");            
        }
    });
}

:: 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.0043 ]--