rex-socket 0.1.44 → 0.1.46
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/.github/workflows/verify.yml +6 -5
- data/lib/rex/socket/comm/local.rb +6 -3
- data/lib/rex/socket/version.rb +1 -1
- data/lib/rex/socket.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: d0b0474613c0bf2b204e3ebfc5f50b29b72ea6af1f98a4bd3e125d86a97aa295
|
4
|
+
data.tar.gz: c01ea0331c2640f4283cbfa08baec9e44e216045e175a0a2ff5737a5483766ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b71fa7bbec1a4e63d95518939742d3f1f8ee8114ee772efcce477953bfa6fce3405c0f9ed6c8818aeaca296072c4034e69e236f5eb5b10f39124e8ab21482b2
|
7
|
+
data.tar.gz: b0b74b486a3416aca4c9cfdd974b670f62dfa51ca7d55a28fae7c56265129f0f9bf71a75a57f800aca4e83550b5b076e2e565c791e52a256fc2745246f6d1e85
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -33,15 +33,16 @@ jobs:
|
|
33
33
|
fail-fast: true
|
34
34
|
matrix:
|
35
35
|
ruby:
|
36
|
-
- 2.7
|
37
|
-
- 3.0
|
38
|
-
- 3.1
|
36
|
+
- '2.7'
|
37
|
+
- '3.0'
|
38
|
+
- '3.1'
|
39
|
+
- '3.2'
|
39
40
|
os:
|
40
41
|
- ubuntu-20.04
|
41
42
|
- ubuntu-latest
|
42
43
|
exclude:
|
43
|
-
- { os: ubuntu-latest, ruby: 2.7 }
|
44
|
-
- { os: ubuntu-latest, ruby: 3.0 }
|
44
|
+
- { os: ubuntu-latest, ruby: '2.7' }
|
45
|
+
- { os: ubuntu-latest, ruby: '3.0' }
|
45
46
|
test_cmd:
|
46
47
|
- bundle exec rspec
|
47
48
|
|
@@ -433,7 +433,8 @@ class Rex::Socket::Comm::Local
|
|
433
433
|
raise Rex::ConnectionProxyError.new(host, port, type, "The proxy returned a non-OK response"), caller
|
434
434
|
end
|
435
435
|
when 'socks4'
|
436
|
-
|
436
|
+
supports_ipv6 = false
|
437
|
+
setup = [4,1,port.to_i].pack('CCn') + Socket.resolv_nbo(host, supports_ipv6) + Rex::Text.rand_text_alpha(rand(8)+1) + "\x00"
|
437
438
|
size = sock.put(setup)
|
438
439
|
if size != setup.length
|
439
440
|
raise Rex::ConnectionProxyError.new(host, port, type, "Failed to send the entire request to the proxy"), caller
|
@@ -463,11 +464,13 @@ class Rex::Socket::Comm::Local
|
|
463
464
|
end
|
464
465
|
|
465
466
|
if Rex::Socket.is_ipv4?(host)
|
466
|
-
|
467
|
+
accepts_ipv6 = false
|
468
|
+
addr = Rex::Socket.resolv_nbo(host)
|
467
469
|
setup = [5,1,0,1].pack('C4') + addr + [port.to_i].pack('n')
|
468
470
|
elsif Rex::Socket.support_ipv6? && Rex::Socket.is_ipv6?(host)
|
469
471
|
# IPv6 stuff all untested
|
470
|
-
|
472
|
+
accepts_ipv6 = true
|
473
|
+
addr = Rex::Socket.resolv_nbo(host, accepts_ipv6)
|
471
474
|
setup = [5,1,0,4].pack('C4') + addr + [port.to_i].pack('n')
|
472
475
|
else
|
473
476
|
# Then it must be a domain name.
|
data/lib/rex/socket/version.rb
CHANGED
data/lib/rex/socket.rb
CHANGED
@@ -211,7 +211,7 @@ module Socket
|
|
211
211
|
#
|
212
212
|
# @deprecated Please use {#getaddress}, {#resolv_nbo}, or similar instead.
|
213
213
|
def self.gethostbyname(host)
|
214
|
-
warn "NOTE: #{self}.#{__method__} is deprecated, use getaddress,
|
214
|
+
warn "NOTE: #{self}.#{__method__} is deprecated, use getaddress, resolv_nbo, or similar instead. It will be removed in the next Major version"
|
215
215
|
if is_ipv4?(host)
|
216
216
|
return [ host, [], 2, host.split('.').map{ |c| c.to_i }.pack("C4") ]
|
217
217
|
end
|
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.46
|
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-01-
|
96
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
Binary file
|