It was never my intent to implement a terminal. The site does not execute any system commands at all on the server side. Pretty much, all commands are 'custom' or invented, to show stuff about me and stuff I've worked on (a long, long time ago). Nothing else.
We (DreamHost) don't have mod_pagespeed support out quite yet, but the feature should be available to our customers by the end of the day today, as soon as I flip the switch to turn it on. :)
You might be better off getting the canonical path and then checking against a whitelist. E.g. `strpos(realpath($command_path), '/var/www/html/') === 0`.
I wrote the site on an afternoon a couple of years ago and haven't had time or energy to update it.
If anyone is interested, please grab the code :) There is nothing server side other than the 'ls' command, which is nothing else than a directory listing in php (no system command at all is run on the server). All other commands are just basic Javascript.
Note that it won't work on mobile devices, and probably has some accessibility issues too. Fancy, shiny new things are neat, but show off that you know standards and accessibility at the same time.
Very cool, but no backspace/delete/arrow key support? Can't seem to correct a typo other than just hitting enter, getting the 'command not found' message and retrying.
Old data, but it runs on a (young, but) flexible sh emulation, and by messing with the virtual filesystem you can get it to do whatever you want (try readlink, for example). Grab code from github.com/adlaiff6/jsh and github.com/adlaiff6/readline.js.
Doesn't work on firefox for me right now, don't remember why, I haven't touched the code in a long time.
Security fail.