nashdj has asked for the wisdom of the Perl Monks concerning the following question:
What I need is some kind of perl sandbox. I have an irc bot (ta NET::IRC) that I run in a channel with friends. Certain commands that fetch data over the internet or let me view information from my server can only be executed by me. Which is fine, but a while ago I implemented an eval command. Which allows for a *lot* of fun from an irc terminal.
Basically eval $eval = "blah"; Will have the bot send back "blah". Now this command is fine, as-long-as I'm the only one who can execute it. There is certainly more than one way to do bad stuff to a system :)
So there is no problem if I prevent everyone else from using this command, which is simple. But given that most of my friends are now interested in learning perl, and would just love to try out their own one-liners while on irc, I would really like a safe way to allow its use.eval {redo} eval use LWP::Simple; get "http://some/really/big/file" eval $eval = `cat /etc/passwd` eval `rm *`;
The conclusions I have reached:
Given that only perl can parse perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A perl sandbox?
by BMaximus (Chaplain) on Apr 25, 2001 at 05:53 UTC | |
by tilly (Archbishop) on Apr 25, 2001 at 17:42 UTC | |
|
Re: A perl sandbox?
by alfie (Pilgrim) on Apr 25, 2001 at 14:10 UTC | |
by jepri (Parson) on Apr 26, 2001 at 05:19 UTC | |
|
Re (tilly) 1: A perl sandbox?
by tilly (Archbishop) on Apr 25, 2001 at 17:41 UTC |