Skip to content

Commit 32fbad7

Browse files
author
RageLtMan
committed
Style changes for cmd_ps cleanup
1 parent 762427b commit 32fbad7

File tree

1 file changed

+2
-6
lines changed
  • lib/rex/post/meterpreter/extensions/stdapi/sys

1 file changed

+2
-6
lines changed

lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,9 @@ def to_table(opts={})
391391
end
392392

393393
cols = [ "PID", "PPID", "Name", "Arch", "Session", "User", "Path" ]
394-
# Arch and Session are specific to native Windows, PHP and Java can't do
395-
# ppid. Cut columns from the list if they aren't there. It is conceivable
396-
# that processes might have different columns, but for now assume that the
397-
# first one is representative.
398394
cols.delete_if do |c|
399-
!(any? {|r| r.has_key?(c.downcase)}) or
400-
all? {|r| r[c.downcase].nil?}
395+
none? {|r| r.has_key?(c.downcase)} ||
396+
all? {|r| r[c.downcase].nil?}
401397
end
402398

403399
opts = {

0 commit comments

Comments
 (0)