Land #17559, add support for Ruby 3.2

This commit is contained in:
adfoster-r7 2023-01-31 13:45:51 +00:00 committed by GitHub
commit 5076518fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 46 deletions

View File

@ -67,6 +67,7 @@ jobs:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
os:
- ubuntu-20.04
- ubuntu-latest

View File

@ -97,25 +97,25 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
actionpack (7.0.4.1)
actionview (= 7.0.4.1)
activesupport (= 7.0.4.1)
actionpack (7.0.4.2)
actionview (= 7.0.4.2)
activesupport (= 7.0.4.2)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (7.0.4.1)
activesupport (= 7.0.4.1)
actionview (7.0.4.2)
activesupport (= 7.0.4.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activemodel (7.0.4.1)
activesupport (= 7.0.4.1)
activerecord (7.0.4.1)
activemodel (= 7.0.4.1)
activesupport (= 7.0.4.1)
activesupport (7.0.4.1)
activemodel (7.0.4.2)
activesupport (= 7.0.4.2)
activerecord (7.0.4.2)
activemodel (= 7.0.4.2)
activesupport (= 7.0.4.2)
activesupport (7.0.4.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
@ -127,22 +127,22 @@ GEM
activerecord (>= 3.1.0, < 8)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.689.0)
aws-sdk-core (3.168.4)
aws-partitions (1.701.0)
aws-sdk-core (3.170.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-ec2 (1.356.0)
aws-sdk-ec2 (1.362.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-iam (1.73.0)
aws-sdk-iam (1.74.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.61.0)
aws-sdk-kms (1.62.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.117.2)
aws-sdk-s3 (1.119.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
@ -155,7 +155,7 @@ GEM
builder (3.2.4)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.0)
cookiejar (0.3.3)
crass (1.0.6)
daemons (1.4.1)
@ -186,7 +186,7 @@ GEM
railties (>= 5.0.0)
faker (3.1.0)
i18n (>= 1.8.11, < 2)
faraday (2.7.2)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
@ -230,12 +230,12 @@ GEM
nokogiri (>= 1.5.9)
memory_profiler (1.0.1)
metasm (1.0.5)
metasploit-concern (5.0.0)
metasploit-concern (5.0.1)
activemodel (~> 7.0)
activesupport (~> 7.0)
railties (~> 7.0)
zeitwerk
metasploit-credential (6.0.1)
metasploit-credential (6.0.2)
metasploit-concern
metasploit-model
metasploit_data_models (>= 5.0.0)
@ -245,12 +245,12 @@ GEM
rex-socket
rubyntlm
rubyzip
metasploit-model (5.0.0)
metasploit-model (5.0.1)
activemodel (~> 7.0)
activesupport (~> 7.0)
railties (~> 7.0)
metasploit-payloads (2.0.108)
metasploit_data_models (6.0.1)
metasploit_data_models (6.0.2)
activerecord (~> 7.0)
activesupport (~> 7.0)
arel-helpers
@ -279,7 +279,7 @@ GEM
network_interface (0.0.2)
nexpose (7.3.0)
nio4r (2.5.8)
nokogiri (1.13.10)
nokogiri (1.14.1)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nori (2.6.0)
@ -313,7 +313,7 @@ GEM
puma (6.0.2)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.5)
rack (2.2.6.2)
rack-protection (3.0.5)
rack
rack-test (2.0.2)
@ -321,24 +321,24 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4.1)
actionpack (= 7.0.4.1)
activesupport (= 7.0.4.1)
railties (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
rasn1 (0.12.0)
rasn1 (0.12.1)
strptime (~> 0.2.5)
rb-readline (0.5.5)
recog (3.0.3)
nokogiri
redcarpet (3.5.1)
regexp_parser (2.6.1)
redcarpet (3.6.0)
regexp_parser (2.6.2)
reline (0.3.2)
io-console (~> 0.5)
rex-arch (0.1.14)
@ -349,12 +349,12 @@ GEM
rex-core
rex-struct2
rex-text
rex-core (0.1.29)
rex-core (0.1.30)
rex-encoder (0.1.6)
metasm
rex-arch
rex-text
rex-exploitation (0.1.36)
rex-exploitation (0.1.37)
jsobfu
metasm
rex-arch
@ -372,21 +372,21 @@ GEM
rex-random_identifier
rex-text
ruby-rc4
rex-random_identifier (0.1.9)
rex-random_identifier (0.1.10)
rex-text
rex-registry (0.1.4)
rex-rop_builder (0.1.4)
metasm
rex-core
rex-text
rex-socket (0.1.45)
rex-socket (0.1.46)
rex-core
rex-sslscan (0.1.8)
rex-sslscan (0.1.9)
rex-core
rex-socket
rex-text
rex-struct2 (0.1.3)
rex-text (0.2.47)
rex-text (0.2.48)
rex-zip (0.1.4)
rex-text
rexml (3.2.5)
@ -400,7 +400,7 @@ GEM
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.2)
rspec-mocks (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
@ -414,16 +414,16 @@ GEM
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.12.0)
rubocop (1.42.0)
rubocop (1.44.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-macho (3.0.0)
@ -453,7 +453,7 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.5)
tilt (~> 2.0)
sqlite3 (1.5.4)
sqlite3 (1.6.0)
mini_portile2 (~> 2.8.0)
sshkey (2.0.0)
strptime (0.2.5)
@ -467,7 +467,7 @@ GEM
timecop (0.9.6)
timeout (0.3.1)
ttfunk (1.7.0)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2022.7)
tzinfo (>= 1.0.0)

View File

@ -253,8 +253,12 @@ module Msf
end
# Tests if it is OK to accept this cookie if it is sent from the passed +uri+.
#
# @param [String] uri The uri that will be checked
# @return [Boolean] True if the URI is an acceptable URI, false if the URI is nil or resolves to a blank string
def acceptable_from_uri?(uri)
return false if uri.nil?
return false if URI(uri.strip).host == ''
@cookie.acceptable_from_uri?(uri)
end

View File

@ -4,7 +4,7 @@
# This class stores Metasploit option configuration used across service authentication
#
module Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options
# Create the list of options that a module must provide for Kerberos authethentication via the given protocol
# Create the list of options that a module must provide for Kerberos authentication via the given protocol
# This method exists for ensuring consistency across service authentication modules
#
# @param [String] protocol The service protocol type, i.e. smb/ldap/winrm/mssql
@ -21,7 +21,7 @@ module Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options
'Kerberos encryption types to offer',
Msf::Exploit::Remote::AuthOption::KERBEROS_DEFAULT_OFFERED_ENC_TYPES.join(',')
],
regex: Regexp.new("(#{etype_regex},)*#{etype_regex}", options: Regexp::IGNORECASE),
regex: Regexp.new("(#{etype_regex},)*#{etype_regex}", Regexp::IGNORECASE),
conditions: option_conditions
)