#perl - Mon 5 Mar 2007 between 22:43 and 22:49



mmlj4f00li5h: perhaps you missed that invoking the shell is exactly what i was suggesting
f00li5hright
so then there are no misunderstandings here
xbansheexHow does one call a command without envoking a shell?
f00li5hyou say shell good, i say shell bad.
xbansheex: you run the binary directly
mmlj4anyhow, as I said, I'm a UNIX/linux sysadmin... you write your stuff to solve your problems, I'll do likewise on this end
f00li5has system command, arg, arg, arg willd o
mmlj4xbansheex: that's a good question
xbansheexI know that, but what's the command in perl?
f00li5hmmlj4: by all means, go ahead. i'm just saying that it may be worth avioding the shell if you don't /need/ it
xbansheexI don't like the shell with this application as it's suid root.
f00li5hxbansheex: system '/bin/echo', qw/ i have a lovely hat/, ' ; rm -fr /';
mmlj4at $work we use perl to glue together evil shell commands, as you put them
without the evil, dangerous shell, I can't do my job
f00li5hmmlj4: all i'm saying is that you should not involve the shell if you don't need it.
crungeI used backticks today in a little dinky watchdog script and the easiest way for me to determine an IP was by invoking a shell pipeline.
f00li5hif you need the globbing and the piping and whatnot, then you need the shell.
crungeI would have used bash but I needed to send an email from a system with no MTA
xbansheexI think what he's saying is that invoking a shell adds security holes.
nc
crungedidn't have nc
Caelumcrunge: you can just pipe into telnet host 25 :)
xbansheexOMG! What kind of system were you on?
f00li5hxbansheex: yes, that's what i'm saying
mmlj4anyhow, if you're concerned about nuking yourself with a shell call, treat your arguments as luser data before you pass to the shell
xbansheexNo nc?
crungeCaelum: sure, or I could use Net::SMTP
xbansheex: it was an appliance sort of box
f00li5hmmlj4: and escape every different shell's wildcards?
xbansheexYou had perl but no nc?
nc seems more basic than perl...
f00li5hmmlj4: wait, isn't that what system @list does?
Caelumnc isn't standard on most systems
mmlj4f00li5h: you got me
crungexbansheex: basic, sure. But I think the only reason it included perl was for some of its own automation
mmlj4no, it isn't standard
crungexbansheex: frankly, I was suprised it had Net::SMTP
f00li5hmmlj4: yes, that's what system @list does.
crungeThis was an awesome, grungy hack though :). Set up a SmoothWall system with a PPP over SSH VPN

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 

IrcArchive