rapid7/metasploit-framework — pull request #800 by sempervictus (2012-09-18 02:36:13+00:00)
Title: Add -S filters to ls and ps meterpreter commands

This commit adds the -S flags to ls and ps stdapi commands which
convert their argument to a regular expression. Output is filtered
to match the regexp, allowing for filtering processes and dir
content by any attribute as they are all converted to strings for
matching.

Testing:
Apply patch, get meterpreter session. Run 'ps -S "ram files|
system"' to see all processes running as system or from
program files. Run 'ls -S "fil.*sys" C:\\' to see all files in
C:\ containing "sys" in the filename.