News for hackers. Stuff that matters.
Re:Distributed grep client in Go by cmccabe on Wednesday October 09, 2013 @04:57AM (#6520132)
exec.Command doesn't run a shell; it just executes the command. So yes, it's perfectly safe to have spaces and other shell metacharacters in there. Whether or not it's efficient here is another question, of course.
Re:Distributed grep client in Go by danieldk on Wednesday October 09, 2013 @11:26AM (#6521801)
So yes, it's perfectly safe to have spaces and other shell metacharacters in there.

You could (for instance) probe content of system files by passing

  -f/some/file
And matching that to the log. If you have some control over the log, you could use this to read content from system files. Of course, it's all indirect, since the file is interpreted as containing regular expressions. But it's certainly not 'perfectly safe'.
Re:Distributed grep client in Go by cmccabe on Saturday October 12, 2013 @04:06AM (#6537798)
I could also read content from system files by using the advanced hacker tool "cat".

I don't see what this has to do with exec.Command.