Closed danielbachhuber closed 6 years ago
Limiting grep to PHP files, which mitigates the scenario where a bunch of minified JavaScript clogs the screen. The original match pattern seems specific to PHP.
I'm actually okay with this, since 99% of the time, JS has nothing to do with it, and the 1% that does was going to need a super hands on dig anyway.
🚢
One request from Ellen earlier this week is that the
grep
output be formatted in a more digestible manner.Specifically:
This morning, I looked into a couple of options:
$pattern
to match up to 10 characters before and after the match ('.{0,10}(PHPSESSID|session_start|start_session|$cookie|setCookie).{0,10}')
). However, doing so makes grep execution seemingly 5x slower, which I don't think is a reasonable compromise.ack
when available instead ofgrep
. However,ack
doesn't seem to be any faster with the before and after character matching.Additional options we could explore include:
grep
to PHP files, which mitigates the scenario where a bunch of minified JavaScript clogs the screen. The original match pattern seems specific to PHP.proc_open
to launch the process, and modifying output with PHP.