Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^6: Bug in perl command line processing?

by Anonymous Monk
on May 22, 2012 at 22:58 UTC ( #971906=note: print w/replies, xml ) Need Help??

in reply to Re^5: Bug in perl command line processing?
in thread Bug in perl command line processing?

From what I can tell, -i has to actually appear on the command-line


$ cat uhoh #!/usr/bin/perl -i.bak e die(666) 1; $ perl uhoh Can't emulate -e on #! line at uhoh line 1.

which hopefully self-limits its significance as a tool for exploit.

Hmm, the only exploit situation i an envision is someone naively automating perl, for example from perl

system $^X, "-i$bak", ...

which doesn't seem unreasonable. I suppose given that -e commandline documents

$ perl -e warn(1); -e die(2); 1 at -e line 1. 2 at -e line 2.

folks might be scared away from automating perl this way, but then again whitespace in paths is not unheard of

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971906]
LanX interesting POTUS reminds his people of brutal colonial past in the Philipines ...
[LanX]: ... what's next? Donald as John Wayne in "Rio Pig Blood - Bad Hombres must Die" ?

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2017-08-18 12:48 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (301 votes). Check out past polls.