i wonder if there is a way we can do this wrapping with the 'require'
opcode top. i.e., i want to allow the 'require' opcode but trap every
'require' statements through my checking subroutine, which will only
allow certain perl modules to be imported by the untrusted code.
--
dave
David Garamond wrote:
> david wrote:
>
>> sub main::open{
>> #-- testing purpose
>> if($_[0] =~ m#^/#){
>> die("Access under / not allowed\n");
>> }else{
>> open(FILE,$_[0]) || die $!;
>> return FILE;
>> }
>> }
>>
>> my $fh = &open('whatever');
>
>
> oh, i didn't know you could do that :-) cool. that's what i'm looking for.
>
> the point is, i have an unknown perl code, possibly dangerous, and i
> want to execute it in a controlled environment. i couldn't manually
> change the code, so creating a wrapper like the above is just what i
> need. thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]