We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You must opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Plugins Web>FortuneCookiePlugin (05 Mar 2003, DanBoitnott)
Tags:
create new tag
, view all tags

FortuneCookiePlugin

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. wink

-- 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

Topic attachments
I Attachment Action Size Date Who Comment
plpm FortunePlugin.pm manage 3.1 K 05 Mar 2003 - 03:22 DanBoitnott Quick and Dirty Fortune Plugin
txttxt FortunePlugin.txt manage 2.0 K 05 Mar 2003 - 03:22 DanBoitnott Quick and Dirty Fortune Plugin Topic
Topic revision: r4 - 05 Mar 2003 - 03:26:00 - DanBoitnott
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback