pwn 0.4.705 → 0.4.707
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/pwn/plugins/detect_os.rb +3 -0
- data/lib/pwn/plugins/ps.rb +15 -15
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37cfc2e423ee677fac02ad04aa54d6c49bf88ba3be1fc7f88b728e11d7e1590a
|
4
|
+
data.tar.gz: 7a341899d51adf15fcfda3ec0dc929a6c91da77076a654cdd10bb3c29d5be8cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8046638ca7becec2cb0cdb1e465eb21304d8c3af1afaeaf61fdcc2d193db9a24a8a05e09b3051cb1b4ac166ddec25d34cd8fe736d9e6311ab0f6427b306a3df
|
7
|
+
data.tar.gz: bffdca2fe82e1edf821e0b039c52883394d9ea4d0fe42780bb230ad999bfeb55e11ceff1970f7097dc0eb6ef7eb0ca8f573a92131f79b6ee8eee504135a3f170
|
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.
|
40
|
+
pwn[v0.4.707]: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.
|
55
|
+
pwn[v0.4.707]: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
|
data/lib/pwn/plugins/ps.rb
CHANGED
@@ -12,25 +12,25 @@ module PWN
|
|
12
12
|
public_class_method def self.list(opts = {})
|
13
13
|
pid = opts[:pid]
|
14
14
|
|
15
|
-
|
15
|
+
which_os = PWN::Plugins::DetectOS.type
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
case which_os
|
18
|
+
when :cygwin, :linux
|
19
|
+
cmd = 'ps'
|
20
|
+
format = 'user,pcpu,pid,ppid,uid,group,gid,cpu,command:1000,pmem'
|
21
|
+
params = "-p #{pid} -o #{format}"
|
22
|
+
params = "ax -o #{format}" if pid.nil?
|
23
|
+
when :freebsd, :netbsd, :openbsd, :osx
|
24
|
+
cmd = 'ps'
|
25
|
+
format = 'user,pcpu,pid,ppid,uid,group,gid,cpu,command,pmem'
|
26
|
+
params = "-p #{pid} -o #{format}"
|
27
|
+
params = "ax -o #{format}" if pid.nil?
|
24
28
|
else
|
25
|
-
|
26
|
-
'ps',
|
27
|
-
'-p',
|
28
|
-
pid.to_s,
|
29
|
-
'-o',
|
30
|
-
format
|
31
|
-
)
|
29
|
+
raise "Unsupported OS: #{which_os}"
|
32
30
|
end
|
33
31
|
|
32
|
+
stdout, _stderr, _status = Open3.capture3(cmd, params)
|
33
|
+
|
34
34
|
proc_list_arr = []
|
35
35
|
stdout_arr = stdout.split("\n")
|
36
36
|
stdout_arr.each do |line|
|
data/lib/pwn/version.rb
CHANGED