• Stars
    star
    2,100
  • Rank 21,976 (Top 0.5 %)
  • Language
    PHP
  • License
    Do What The F*ck ...
  • Created about 8 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Single-file PHP shell

p0wny@shell:~# -- Single-file PHP Shell

Discord

p0wny@shell:~# is a very basic, single-file, PHP shell. It can be used to quickly execute commands on a server when pentesting a PHP application. Use it with caution: this script represents a security risk for the server.

Features:

  • Command history (using arrow keys )
  • Auto-completion of command and file names (using Tab key)
  • Navigate on the remote file-system (using cd command)
  • Upload a file to the server (using upload <destination_file_name> command)
  • Download a file from the server (using download <file_name> command)

WARNING: THIS SCRIPT IS A SECURITY HOLE. DO NOT UPLOAD IT ON A SERVER UNTIL YOU KNOW WHAT YOU ARE DOING!

Screenshot

Demo with Docker:

    docker build -t p0wny .
    docker run -it -p 8080:80 -d p0wny
    # open with your browser http://127.0.0.1:8080/shell.php

Contributing

Questions

If you have any question, you can:

Bugs

Please open an issue on GitHub with as much information as possible if you found a bug:

  • Your operating system / Linux distribution (and its version)
  • The PHP version you are using (example: PHP-FPM 8.1, Apache mod_php 7.4,...)
  • The Web server you are using and its version (example: Nginx 1.23, Apache 2.4.55,...)
  • All the logs and message outputted by the software
  • etc.

Pull requests

Please consider filing a bug before starting to work on a new feature; it will allow us to discuss the best way to do it. It is obviously unnecessary if you just want to fix a typo or small errors in the code.

Support this project

Want to support this project?

Changelog

  • v2023.08.10:
    • Make p0wny@shell compatible with PHP 5.3 (@FrancoisCapon, #38)
  • v2023.05.28:
    • Encode all data fields as base64 to avoid encoding errors, especially on Windows (@cli-ish, #8, #35)
  • v2023.05.22:
    • Display the username and the hostname in the prompt (@cli-ish, #33, #7)
  • v2023.05.10:
    • Try different execution functions (exec, shell_exec, system, passthru, popen, proc_open) to run commands to bypass disabled functions (@cli-ish, #31, #32)
  • v2023.02.27:
    • Make terminal window resizable (@FrancoisCapon, #27)
  • v2023.02.13:
    • Larger terminal size on large screens (@psyray, #26)
    • No more horozontal scrolling on small screens (@flozz)
  • v2022.09.19:
    • Expand path in cd command (cd ~, cd ~username,...)
    • Go home when running cd withoud argument.
    • → Thanks @FrancoisCapon for the suggestion (#25)
  • v2021.01.24:
    • Style improvements:
      • Better-looking scrollbar on webkit (@nakamuraos)
      • Display a smaller logo on mobile (@nakamuraos)
    • Ergonomic improvements:
      • Focus the command field when clicking the page (@nakamuraos)
      • Put the cursor at the end of the command field while navigating the history (@nakamuraos)
  • v2019.06.07:
    • Adds the clear command to clear the terminal (@izharaazmi #12)
  • v2018.12.15:
    • File upload and download feature (@Oshawk #5)
  • v2018.06.01:
    • Auto-completion of command and file names (@lo001 #2)
    • Adaptation to mobile devices (responsive) (@lo001 #2)
    • Improved handling of stderr (@lo001 #2)
  • v2018.05.30:
    • ES5 compatibility (@lo00l #1)
    • Dependency to JQuery removed (@lo00l #1)
    • Command history using arrow keys (@lo00l #1)
    • Keep the command field focused when pressing the tab key
  • v2017.10.30:
    • CSS: invalid color fixed
  • v2016.11.10:
    • Initial release

More Repositories

1

StackBlur

Fast and almost Gaussian blur
JavaScript
1,268
star
2

rivalcfg

CLI tool and Python library to configure SteelSeries gaming mice
Python
783
star
3

nautilus-terminal

A terminal embedded in Nautilus, the GNOME's file browser
Python
320
star
4

yoga-image-optimizer

A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)
Python
138
star
5

gameboy-examples

Example programs that run on the Nintendo GameBoy
C
80
star
6

cover-thumbnailer

Generates folder thumbnails for various file browser on Linux to display music album covers, preview of pictures which are in a folder and more.
Python
79
star
7

threadify

Simply transforms a javascript function into a web worker
JavaScript
62
star
8

pypapi

Python binding for the PAPI (Performance Application Programming Interface) library
Python
40
star
9

evoland.gb

A fan-made demake of Evoland on GameBoy
C
39
star
10

img2gb

Converts images to GameBoy tiles
Python
32
star
11

stone.js

gettext-like client-side Javascript Internationalization Library
JavaScript
23
star
12

calcleaner

A simple graphical tool to purge old events from CalDAV calendars
Python
17
star
13

asus-keyboard-backlight

Configure the keyboard backlight on ASUS laptops.
Python
16
star
14

stonejs-tools

Tools for extracting/compiling translatable strings from javascript source
JavaScript
13
star
15

pavage

Lightweight library to arrange HTML elements in a Waterfall / Pinterest-like column layout
JavaScript
12
star
16

twitch-api-examples

Examples that use Twitch APIs to display notifications in OBS
JavaScript
7
star
17

shmined

The minesweeper game, in Bash!
Shell
5
star
18

tern-abitbol

Tern.js plugin to autocomplete Abitbol classes
JavaScript
4
star
19

maptosym

Generates no$gmb symbole files (.sym) from GBDK and SDCC / ASxxxx map files (.map)
Python
4
star
20

suorafxctl

Configure Roccat Suora FX keyboards on Linux
Python
4
star
21

rst2gemtext

Converts reStructuredText to Gemtext (Gemini markup format)
Python
4
star
22

pipe.js

Simply queue asynchrone jobs in javascript.
JavaScript
3
star
23

simple-screencast

Simple screen recording application for GNOME Shell
Python
3
star
24

webassembly-examples

Example WebAssembly programs
HTML
3
star
25

KeyboardJS

This is a fork of an old KeyboardJS version that is required by some old projects... DO NOT USE ON NEW PROJECTS...
JavaScript
3
star
26

grunt-stonejs-tools

Stone.js Grunt plugin to extract / compile translatable strings
JavaScript
3
star
27

vim-color-picker

A GTK 2 color picker for VIM
Vim Script
2
star
28

tdct-live-irc-bot

An IRC bot to follow the TdCT on ##tdct-live (irc.freenode.net)
JavaScript
2
star
29

damn-monkey

A Donkey Kong-like game
C
2
star
30

hangman8086

An implementation of the Hang Man game in assembly (Emu8086)
Assembly
2
star
31

tetrize

A Tetris-like game in Java
Java
2
star
32

daily-mix

Generates thematic playlists like Spotify's Daily Mix from a Subsonic API (Nextcloud Music)
Python
2
star
33

yoga-image-benchmark

Python
1
star
34

.vim

My VIM config
Vim Script
1
star