Just a placeholder to remind me that I LOVE the
fortune program and I SHOULD develop a fortune cookie plugin that:
--
AndreaSterbini - 22 Nov 2001
I felt the same. The result was a mini-plugin (my first plugine experiment ever) which can be used to execute arbitrary CGI scripts from within a TWiki page, using a syntax such as:
%SSIEXEC{cmd="fortune.cgi someargs"}%
As you can see from the syntax, the plugin was inspired by the SSI exec mechanism implemented in many web server.
The plugin is lacking any kind of security checks and is highly dangerous, so I'd rather not post it here. If works fine for us, however, because we're operating it under controlled circumstances. We use the plugin to randomly display famous one-liners from folks in the development team, or sections from the Hacker's Dictionary. If you're interested, let me know.
--
ClausBrod - 03 Mar 2003
Maybe this kind of dangerous behavior could be parametrized not on plugin's page, but by some string variable in plugin source code itself. Ie &EXECKNOWN{"fortune"}%, where "fortune" is a hash key of something which is set in source code. So Admin can easily hack it up, know what is there, and crackers cannot crack in. It will be fun to have Murphy's laws in the header.
--
PeterMasiar - 04 Mar 2003
A while back I cobbled together a simple plugin that calls the fortune program and inserts the results in PRE tags. I never bothered to clean it up and share the code but since it seems people are interested I've attached it to this topic. To call it use %FORTUNE%
--
DanBoitnott - 05 Mar 2003