Reply
Run perl script from memory
Old 02-27-2008, 01:41 PM Run perl script from memory
Novice Talker

Posts: 7
Name: Chris Brown
Location: Essex, UK
This may be getting into the realms of hacking / unsecure coding, but it may be possible.

I know you can use "require" and "use" etc to run a perl script from another perl script - but both require the script to be physically on the server.

Question is, can an entire script be posted to a physical script, and be run without being printed out.

The obvious way is:

$test=param('test');
open (TEST, "test.pl");
print TEST $test;
close (TEST);
execute test.pl;
## See below
unlink test.pl;

If someone puts an "exit" in the red section, they can read the downloaded/executed script. Not good.

So I thought: Run the file in memory without printing it. I think it might involve piping <STDIN> to ????? (perl parser)

test=param('test');
open (TEST, "|?????");
close (TEST);

Is this possible? (Oh, the temporarily run script is printing a library filter in a certain part of the server / cookie that the end user shouldn't be able to locate)
web20sitemakerp is offline
Reply With Quote
View Public Profile Visit web20sitemakerp's homepage!
 
When You Register, These Ads Go Away!
     
Reply     « Reply to Run perl script from memory
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11127 seconds with 13 queries