rex-socket 0.1.31 → 0.1.32
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/socket/parameters.rb +16 -2
- data/lib/rex/socket/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4459a7bb29271ef6914325cf3d6b0b11f94056a55286cc91d1060f0c7f7afbb
|
4
|
+
data.tar.gz: 04a369427c1462a168ceb6f252e7f6a2987f35ef9ec47a582a35976ef7c0340c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d848f4b6df65942a810b7f24488f45d859bc6bdd11189afd131235f0c9cab0824c1e66fc95f0edf06ac91cae1f0f9d50d9820177fabcace2bb6824bc9dc108c2
|
7
|
+
data.tar.gz: 8baa414c06a8b13282c74d0d55c5edd7e7dff43c7304d1604f476f78195b0d2514ac72b22679b01387a25f16c4bc382c97b3181d3b9b5fe1aecd1bafb566f3d7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -192,7 +192,15 @@ class Rex::Socket::Parameters
|
|
192
192
|
end
|
193
193
|
|
194
194
|
# Whether to force IPv6 addressing
|
195
|
-
|
195
|
+
if hash['IPv6'].nil?
|
196
|
+
# if IPv6 isn't specified and at least one host is an IPv6 address and the
|
197
|
+
# other is either nil, a hostname or an IPv6 address, then use IPv6
|
198
|
+
self.v6 = (Rex::Socket.is_ipv6?(self.localhost) || Rex::Socket.is_ipv6?(self.peerhost)) && \
|
199
|
+
(self.localhost.nil? || !Rex::Socket.is_ipv4?(self.localhost)) && \
|
200
|
+
(self.peerhost.nil? || !Rex::Socket.is_ipv4?(self.peerhost))
|
201
|
+
else
|
202
|
+
self.v6 = hash['IPv6']
|
203
|
+
end
|
196
204
|
end
|
197
205
|
|
198
206
|
def merge(other)
|
@@ -294,7 +302,13 @@ class Rex::Socket::Parameters
|
|
294
302
|
# @return [String]
|
295
303
|
attr_writer :localhost
|
296
304
|
def localhost
|
297
|
-
@localhost
|
305
|
+
return @localhost if @localhost
|
306
|
+
|
307
|
+
if @v6 || (@peerhost && Rex::Socket.is_ipv6?(@peerhost))
|
308
|
+
'::'
|
309
|
+
else
|
310
|
+
'0.0.0.0'
|
311
|
+
end
|
298
312
|
end
|
299
313
|
|
300
314
|
# The local port. Equivalent to the LocalPort parameter hash key.
|
data/lib/rex/socket/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|