lib/pwn/plugins/ps.rb in pwn-0.4.712 vs lib/pwn/plugins/ps.rb in pwn-0.4.713
- old
+ new
@@ -15,20 +15,15 @@
which_os = PWN::Plugins::DetectOS.type
case which_os
when :cygwin
cmd = 'ps'
- params = "waux -p #{pid}"
+ params = "w -p #{pid}"
params = 'waux' if pid.nil?
- when :linux
+ when :freebsd, :linux, :netbsd, :openbsd, :osx
cmd = 'ps'
format = 'user,pcpu,pid,ppid,uid,group,gid,cpu,pmem,command'
params = "w -p #{pid} -o #{format}"
- params = "wax -o #{format}" if pid.nil?
- when :freebsd, :netbsd, :openbsd, :osx
- cmd = 'ps'
- format = 'user,pcpu,pid,ppid,uid,group,gid,cpu,pmem,command'
- params = "wax -p #{pid} -o #{format}"
params = "wax -o #{format}" if pid.nil?
else
raise "Unsupported OS: #{which_os}"
end
full_cmd = "#{cmd} #{params}"