pwn 0.4.705 → 0.4.706

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3649788ab9739969e27230bbd48fc1a73e10cf1d725d26a840a56554e5ade27d
4
- data.tar.gz: 446c43688c957a5f77c7efb50f1214ce8508f2ec8389151cd05eb9961f8db893
3
+ metadata.gz: d297206c67aed46fc11f899ebeb049b99268321cfd43de12ad9bdabdbe800e18
4
+ data.tar.gz: 227bc9a6a41c960e7b8d8d9b4901d06dcf5d50fb326967113fedea7352c99dd9
5
5
  SHA512:
6
- metadata.gz: 4b6c2e422c24c0636009984ecbe54b4ee5cc1847bb3f3a259147cb8478f16bd7b8175b7ecd1dffe2f42fc7189bee229725be9c05b6fad22a1aed54714effff21
7
- data.tar.gz: '0079c85c8d6dfe8c5cdea947a666bc2afe1d462b5d671f87c4a329106fbbc3bd104931a42c63b47e9b8157cf974dc1e1c1cfba95a735bf77e572a3bf29e4dfc6'
6
+ metadata.gz: 79cff249d43ec99c285f53ccf476a1a962420547f09d99733517b1c59849404b74c5abc17ee5ce3b1f17cb80489a4db38f29a6657a190b7d5361a97448ba402c
7
+ data.tar.gz: d06d828ddb31e7d6915a5615338ea52a121341fa8db5801976cec9428e94a4f6fa850a6824802327ec6e84729b02c07d496d27556c34cab445d1445ef6993a17
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.705]:001 >>> PWN.help
40
+ pwn[v0.4.706]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.705]:001 >>> PWN.help
55
+ pwn[v0.4.706]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -11,7 +11,10 @@ module PWN
11
11
 
12
12
  public_class_method def self.type
13
13
  return :cygwin if OS.cygwin?
14
+ return :freebsd if OS.freebsd?
14
15
  return :linux if OS.linux?
16
+ return :netbsd if OS.host_os.include?('netbsd')
17
+ return :openbsd if OS.host_os.include?('openbsd')
15
18
  return :osx if OS.osx?
16
19
  return :windows if OS.windows?
17
20
  rescue StandardError => e
@@ -12,25 +12,23 @@ module PWN
12
12
  public_class_method def self.list(opts = {})
13
13
  pid = opts[:pid]
14
14
 
15
- format = 'user,pcpu,pid,ppid,uid,gid,euid,egid,uname,group,args:1000,pmem'
15
+ which_os = PWN::Plugins::DetectOS.type
16
16
 
17
- if pid.nil?
18
- stdout, _stderr, _status = Open3.capture3(
19
- 'ps',
20
- 'ax',
21
- '-o',
22
- format
23
- )
17
+ case which_os
18
+ when :linux
19
+ format = 'user,pcpu,pid,ppid,uid,group,gid,cpu,command:1000,pmem'
20
+ cmd = ['ps', '-p', pid.to_s, '-o', format]
21
+ cmd = ['ps', 'ax', '-o', format] if pid.nil?
22
+ when :freebsd, :netbsd, :openbsd, :osx
23
+ format = 'user,pcpu,pid,ppid,uid,group,gid,cpu,command,pmem'
24
+ cmd = ['ps', '-p', pid.to_s, '-o', format]
25
+ cmd = ['ps', 'ax', '-o', format] if pid.nil?
24
26
  else
25
- stdout, _stderr, _status = Open3.capture3(
26
- 'ps',
27
- '-p',
28
- pid.to_s,
29
- '-o',
30
- format
31
- )
27
+ raise "Unsupported OS: #{which_os}"
32
28
  end
33
29
 
30
+ stdout, _stderr, _status = Open3.capture3(cmd)
31
+
34
32
  proc_list_arr = []
35
33
  stdout_arr = stdout.split("\n")
36
34
  stdout_arr.each do |line|
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.705'
4
+ VERSION = '0.4.706'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.705
4
+ version: 0.4.706
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.