Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a great idea.

Since I'm using these as lecture notes for my class, I'll try to add it in before I teach today.



Some fun ideas

If on a *nix platform try df for your cli app. This was "state of the art remote monitoring" where I worked in the mid 90s. Also http://whatever/cgi-bin/uptime displayed about what you'd expect. And the dmesg script, another handy one that is about what it sounded like.

Next step is there's a lot more HTML codes than <pre>. So put stuff in <h1> etc. Before <blink> was censored I used that occasionally.

A fun next step is commands with mysterious and unclear outputs. Like grep. Maybe grep a log file. Will you get no lines or a thousand lines? How do you intend to inform the user that either the CGI crashed or there is in fact no lines to output.

After that a bunch of if/then based on the output of grep -c

If its not fun to output text based on some if/then I'd try img tags. So now something broken is a red down arrow. And a giant frameset of multiple machines multiple tests is kind of an alert board, sort of. At least in 1997 or so.

You can make an interesting display of security problems by stashing temp files and temp scripts and temp things in /tmp... what could possibly go wrong with trusting the contents of something in /tmp, LOL?

Although I forget exactly how (its been awhile since BASH was a cutting edge web framework) there's a way to access http parameters so you can do simple forms that ask for something to search, then run grep on that passed parameter, then format the grep output to an attractive level. And of course you can pass "funny" parameters to the script which probably does no input checking and introduce them to Bobby Tables meme and all that.

I didn't do this, but in the years before phpmyadmin I worked at a place that basically had a script that ran whatever you passed it as a command for mysql. As root. With no authentication. And of course a hard coded password in the command line for anyone running "ps" to see. Yeah. It was one of those things that the developers thought was awesome for dev work on the test server but somehow snuck off the test server. That was a funny one, nothing bad happened, but could have been bad.

This kind of stuff is a bit safer on a private lan than being tested out on the internet, but everyone reading this probably knows that...




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: