pwn 0.4.908 → 0.4.909
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/bin/pwn_www_checkip +11 -8
- data/lib/pwn/plugins/ip_info.rb +16 -16
- data/lib/pwn/plugins/sock.rb +2 -1
- 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: 39bbf680a6045bb2e60bceab8462fb445e59455e32e36c82eda6fd8533b34474
|
4
|
+
data.tar.gz: 87aa92579f26b3fc91e7b8a9a5e0b96ba6760bf61442bf57cd0c2848d73af505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bab3d7df059662720204c2e6c110de09ea9975bdfd013335fd1f14d5cabdccce9a83d89e0c7010e3ae7287882ec333be5ca49782a7dad7200aed060895b6c1f2
|
7
|
+
data.tar.gz: 94a7f8b7282e4e3ea2d3353c3f2889168570ee0f76aa368f121ba4c7337b73802f5bc74740b00d9aee60c12456f2c1688f3561cb3fe5b820d866a52b531024af
|
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.909]: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.909]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn_www_checkip
CHANGED
@@ -14,6 +14,10 @@ OptionParser.new do |options|
|
|
14
14
|
opts[:target] = t
|
15
15
|
end
|
16
16
|
|
17
|
+
options.on('-PPORT', '--tls-port=PORT', '<Optional - TLS Port to Check (Default - 443). Will not execute if --proxy parameter is set.>') do |p|
|
18
|
+
opts[:tls_port] = p
|
19
|
+
end
|
20
|
+
|
17
21
|
options.on('-i', '--[no-]ipinfo', '<Optional - Return Details about Public IP Returned from CheckIP>') do |i|
|
18
22
|
opts[:ipinfo] = i
|
19
23
|
end
|
@@ -24,27 +28,25 @@ OptionParser.new do |options|
|
|
24
28
|
end.parse!
|
25
29
|
|
26
30
|
target = opts[:target]
|
31
|
+
tls_port = opts[:tls_port]
|
27
32
|
ipinfo = opts[:ipinfo]
|
28
33
|
proxy = opts[:proxy].to_s.scrub.strip.chomp unless opts[:proxy].nil?
|
29
34
|
|
30
35
|
begin
|
31
|
-
if proxy
|
36
|
+
if proxy && opts[:target].nil?
|
32
37
|
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
33
38
|
browser_type: :rest,
|
34
39
|
proxy: proxy
|
35
40
|
)
|
36
|
-
|
37
|
-
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
38
|
-
end
|
39
|
-
browser = browser_obj[:browser]::Request
|
40
|
-
|
41
|
-
if proxy && opts[:target].nil?
|
41
|
+
browser = browser_obj[:browser]::Request
|
42
42
|
target = browser.execute(
|
43
43
|
method: :get,
|
44
44
|
url: 'https://checkip.amazonaws.com',
|
45
45
|
verify_ssl: false
|
46
46
|
).to_s.chomp
|
47
47
|
elsif opts[:target].nil?
|
48
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
49
|
+
browser = browser_obj[:browser]::Request
|
48
50
|
target = browser.execute(
|
49
51
|
method: :get,
|
50
52
|
url: 'https://checkip.amazonaws.com'
|
@@ -57,7 +59,8 @@ begin
|
|
57
59
|
if ipinfo
|
58
60
|
ip_info_obj = PWN::Plugins::IPInfo.get(
|
59
61
|
target: target,
|
60
|
-
proxy: proxy
|
62
|
+
proxy: proxy,
|
63
|
+
tls_port: tls_port
|
61
64
|
)
|
62
65
|
puts JSON.pretty_generate(ip_info_obj)
|
63
66
|
end
|
data/lib/pwn/plugins/ip_info.rb
CHANGED
@@ -81,18 +81,18 @@ module PWN
|
|
81
81
|
)
|
82
82
|
|
83
83
|
ip_resp[:tls_avail] = tls_port_avail
|
84
|
-
ip_resp[:ca_issuer_uris] =
|
85
|
-
ip_resp[:cert_subject] =
|
86
|
-
ip_resp[:cert_issuer] =
|
87
|
-
ip_resp[:cert_serial] =
|
88
|
-
ip_resp[:crl_uris] =
|
89
|
-
ip_resp[:extensions] =
|
90
|
-
ip_resp[:not_before] =
|
91
|
-
ip_resp[:not_after] =
|
92
|
-
ip_resp[:oscsp_uris] =
|
93
|
-
ip_resp[:pem] =
|
94
|
-
ip_resp[:signature_algorithm] =
|
95
|
-
ip_resp[:version] =
|
84
|
+
ip_resp[:ca_issuer_uris] = nil
|
85
|
+
ip_resp[:cert_subject] = nil
|
86
|
+
ip_resp[:cert_issuer] = nil
|
87
|
+
ip_resp[:cert_serial] = nil
|
88
|
+
ip_resp[:crl_uris] = nil
|
89
|
+
ip_resp[:extensions] = nil
|
90
|
+
ip_resp[:not_before] = nil
|
91
|
+
ip_resp[:not_after] = nil
|
92
|
+
ip_resp[:oscsp_uris] = nil
|
93
|
+
ip_resp[:pem] = nil
|
94
|
+
ip_resp[:signature_algorithm] = nil
|
95
|
+
ip_resp[:version] = nil
|
96
96
|
next unless tls_port_avail
|
97
97
|
|
98
98
|
cert_obj = PWN::Plugins::Sock.get_tls_cert(
|
@@ -102,15 +102,15 @@ module PWN
|
|
102
102
|
|
103
103
|
next unless cert_obj.is_a?(OpenSSL::X509::Certificate)
|
104
104
|
|
105
|
-
ip_resp[:ca_issuer_uris] = cert_obj.ca_issuer_uris.to_s
|
105
|
+
ip_resp[:ca_issuer_uris] = cert_obj.ca_issuer_uris.map(&:to_s) unless cert_obj.ca_issuer_uris.nil?
|
106
106
|
ip_resp[:cert_subject] = cert_obj.subject.to_s
|
107
107
|
ip_resp[:cert_issuer] = cert_obj.issuer.to_s
|
108
108
|
ip_resp[:cert_serial] = cert_obj.serial.to_s
|
109
|
-
ip_resp[:crl_uris] = cert_obj.crl_uris.to_s
|
110
|
-
ip_resp[:extensions] = cert_obj.extensions.map
|
109
|
+
ip_resp[:crl_uris] = cert_obj.crl_uris.map(&:to_s) unless cert_obj.crl_uris.nil?
|
110
|
+
ip_resp[:extensions] = cert_obj.extensions.map(&:to_s) unless cert_obj.extensions.nil?
|
111
111
|
ip_resp[:not_before] = cert_obj.not_before.to_s
|
112
112
|
ip_resp[:not_after] = cert_obj.not_after.to_s
|
113
|
-
ip_resp[:oscsp_uris] = cert_obj.ocsp_uris.to_s
|
113
|
+
ip_resp[:oscsp_uris] = cert_obj.ocsp_uris.map(&:to_s) unless cert_obj.ocsp_uris.nil?
|
114
114
|
ip_resp[:pem] = cert_obj.to_pem.to_s
|
115
115
|
ip_resp[:signature_algorithm] = cert_obj.signature_algorithm.to_s
|
116
116
|
ip_resp[:version] = cert_obj.version.to_s
|
data/lib/pwn/plugins/sock.rb
CHANGED
@@ -151,7 +151,8 @@ module PWN
|
|
151
151
|
server_ip = opts[:server_ip].to_s.scrub
|
152
152
|
port = opts[:port].to_i
|
153
153
|
opts[:protocol].nil? ? protocol = :tcp : protocol = opts[:protocol].to_s.downcase.to_sym
|
154
|
-
|
154
|
+
tls = true if opts[:tls]
|
155
|
+
tls ||= false
|
155
156
|
|
156
157
|
case protocol
|
157
158
|
when :tcp
|
data/lib/pwn/version.rb
CHANGED