flozz / p0wny-shell

Single-file PHP shell
https://blog.flozz.fr/2020/01/21/p0wny-shell-un-shell-php-simple-mais-trop-efficace/
Do What The F*ck You Want To Public License
2.18k stars 638 forks source link

Replace prompt "separator" on windows #9

Closed matjazpotocnik closed 3 years ago

matjazpotocnik commented 5 years ago

Would be nice to have ">" instead of "#" on windows.

Add this around line 100:

var cmdPrompt = <?php echo defined('PHP_WINDOWS_VERSION_BUILD') ? "'>';\n" : "'#';\n";?>

then replace line 334 with this:

return "<span title=\"" + cwd + "\">" + shortCwd + "</span>" + cmdPrompt;