rex-socket 0.1.51 → 0.1.52
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rex/socket/version.rb +1 -1
- data/lib/rex/socket.rb +27 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a97cac39e77ee44665aa30e9b9d5d30fa490c1cbb0909cfeda49bce7ca1414
|
4
|
+
data.tar.gz: 3e76c09d2320265208f8a91c8bd93730d4d4698d1940b8a654d7ec553c008b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475846de509a2f145142566a729b7fa4bf1d67d0d993c2cff20edb2bf7418c64930136d5e34f8a05a717da610c3dc734d4b631cb66611d3725a173f53a6d3001
|
7
|
+
data.tar.gz: 355abe15808629534099238aad2fee65e4588573108aa4307aa6bc45b1addca4bc6422d48bb77b288945d8b33956be4503a842f74f8e14c0ecc283fcaa45ca9b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rex/socket/version.rb
CHANGED
data/lib/rex/socket.rb
CHANGED
@@ -157,7 +157,33 @@ module Socket
|
|
157
157
|
(support_ipv6? && addr =~ MATCH_IPV6) || (addr =~ MATCH_IPV4)
|
158
158
|
end
|
159
159
|
|
160
|
-
#
|
160
|
+
# Checks to see if an address is an IPv6 address and if so, converts it into its
|
161
|
+
# square bracket format for addressing as noted in RFC 6874 which states that an IPv6
|
162
|
+
# address literal in a URL is always embedded between [ and ]. Please also refer to
|
163
|
+
# RFC5952, RFC3986, and RFC6874 for more info.
|
164
|
+
#
|
165
|
+
# RFC3986 section 3.2.2 specifically notes "A host identified by an Internet Protocol literal address, version 6
|
166
|
+
# [RFC3513] or later, is distinguished by enclosing the IP literal
|
167
|
+
# within square brackets ("[" and "]"). This is the only place where
|
168
|
+
# square bracket characters are allowed in the URI syntax."
|
169
|
+
#
|
170
|
+
# RFC6874 reinforces this in section 2 where it notes "In a URI, a literal IPv6 address
|
171
|
+
# is always embedded between '[' and ']'".
|
172
|
+
#
|
173
|
+
# @param host [String] IP address or hostname to convert to a URI authority.
|
174
|
+
# @param port [Integer] Port number to include within the URI authority.
|
175
|
+
# @return [String] Returns the URI authority string.
|
176
|
+
# @raise [ArgumentError] This function will raise an ArgumentError if the host parameter is not a String.
|
177
|
+
def self.to_authority(host, port=nil)
|
178
|
+
unless host.kind_of?(String)
|
179
|
+
raise ArgumentError.new("Expected a string for the host parameter!")
|
180
|
+
end
|
181
|
+
host = "[#{host}]" if is_ipv6?(host)
|
182
|
+
host += ":#{port}" if port
|
183
|
+
host
|
184
|
+
end
|
185
|
+
|
186
|
+
|
161
187
|
# Return true if +addr+ is within the ranges specified in RFC1918, or
|
162
188
|
# RFC5735/RFC3927
|
163
189
|
#
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-socket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.52
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -93,7 +93,7 @@ cert_chain:
|
|
93
93
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
94
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
95
|
-----END CERTIFICATE-----
|
96
|
-
date: 2023-
|
96
|
+
date: 2023-06-09 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�vK�W.Ci��e0���*��{�3u�^T��ruI[�A=4K1�\~
|
2
|
+
戔>����������8������9֏çayayf�Q�ap��j���c�w�!��^��%݅2͠,5<Ԝ��>��7�ɫ>�3�#���̣=��YG��i��L>��t����,�k��O��{�ڇ9�|�(��V������q6��{8�U�>�*y�@@#?�.��;H:)02j�5�<�iUж���0ʲ>����l����g[x��
|