pwn 0.5.156 → 0.5.157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/ip_info.rb +15 -12
- 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: 6fa5c25714856b9ee7de2118ac2da2e6f27380bcbae0e82d448774e6ad260329
|
4
|
+
data.tar.gz: 841310123fcb027c750b7d94b67851c9b9420ea7f79b3ccfc240347280fb4a04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bfcbdcdd0b987a3f8ac1bb90b4f6a687584d1c1269931aca7027cfe542349088416452069f9882c6c2d3287f12ea88f3bbd34d3f2c3c1623ed74a7619adb0f7
|
7
|
+
data.tar.gz: 017f565735be76fb7a1f9e28bcef3be061b2700da2333df5f92162d268db9f224468672814135302f52bcdf2618efcb8a11054b4d3da7f421da8314b1fc4e4cd
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.157]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.1@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.157]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.1@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.157]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/lib/pwn/plugins/ip_info.rb
CHANGED
@@ -79,9 +79,9 @@ module PWN
|
|
79
79
|
skip_api = opts[:skip_api] ||= false
|
80
80
|
|
81
81
|
ip_info_resp = []
|
82
|
-
ip_resp_hash = {}
|
83
82
|
is_ip = IPAddress.valid?(target)
|
84
83
|
hostname = '' if is_ip
|
84
|
+
target_arr = [target] if is_ip
|
85
85
|
|
86
86
|
unless is_ip
|
87
87
|
begin
|
@@ -89,24 +89,27 @@ module PWN
|
|
89
89
|
dns_server = opts[:dns_server]
|
90
90
|
dns_resolver = Resolv::DNS.new(nameserver: [dns_server]) if dns_server
|
91
91
|
dns_resolver ||= Resolv::DNS.new
|
92
|
-
|
92
|
+
target_arr = dns_resolver.getaddresses(target).map(&:to_s).uniq
|
93
93
|
rescue Resolv::ResolvError
|
94
|
-
|
94
|
+
target_arr = nil
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
98
|
+
target_arr.each do |this_target|
|
99
|
+
ip_resp_hash = ip_info_rest_call(ip: this_target, proxy: proxy) unless skip_api
|
100
|
+
ip_resp_hash ||= {}
|
101
|
+
is_rfc1918 = check_rfc1918(ip: this_target)
|
102
|
+
ip_resp_hash[:ip] = this_target
|
103
|
+
ip_resp_hash[:is_rfc1918] = is_rfc1918
|
104
|
+
ip_resp_hash[:hostname] = hostname
|
103
105
|
|
104
|
-
|
106
|
+
ip_info_resp.push(ip_resp_hash) unless target_arr.nil?
|
107
|
+
|
108
|
+
next unless proxy.nil?
|
105
109
|
|
106
|
-
if proxy.nil?
|
107
110
|
ip_info_resp.each do |ip_resp|
|
108
111
|
tls_port_avail = PWN::Plugins::Sock.check_port_in_use(
|
109
|
-
server_ip:
|
112
|
+
server_ip: this_target,
|
110
113
|
port: tls_port
|
111
114
|
)
|
112
115
|
|
@@ -126,7 +129,7 @@ module PWN
|
|
126
129
|
next unless tls_port_avail
|
127
130
|
|
128
131
|
cert_obj = PWN::Plugins::Sock.get_tls_cert(
|
129
|
-
target:
|
132
|
+
target: this_target,
|
130
133
|
port: tls_port
|
131
134
|
)
|
132
135
|
|
data/lib/pwn/version.rb
CHANGED