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 +4 -4
- data/README.md +2 -2
- data/lib/pwn/plugins/detect_os.rb +3 -0
- data/lib/pwn/plugins/ps.rb +13 -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: d297206c67aed46fc11f899ebeb049b99268321cfd43de12ad9bdabdbe800e18
|
4
|
+
data.tar.gz: 227bc9a6a41c960e7b8d8d9b4901d06dcf5d50fb326967113fedea7352c99dd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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
|
data/lib/pwn/plugins/ps.rb
CHANGED
@@ -12,25 +12,23 @@ 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 :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
|
-
|
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