Skip to content

Commit aa7c612

Browse files
committed
Last minute linting
1 parent 32d63e4 commit aa7c612

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

modules/auxiliary/admin/ldap/bad_successor.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,14 @@ def windows_version_vulnerable?
8080
def validate
8181
errors = {}
8282

83-
unless %w[ auto ntlm plaintext]
84-
# if AUTO changes in the future to not require a password, we'll need to reevaluate this
85-
errors['LDAP::Auth'] = 'Only password-based LDAP authentication methods are supported with this exploit.'
86-
end
87-
8883
case action.name
8984
when 'GET_TICKET'
90-
if %w[ auto ntlm ].include?(datastore['LDAP::Auth']) && Net::NTLM.is_ntlm_hash?(datastore['LDAPPassword'].encode(::Encoding::UTF_16LE))
85+
if %w[auto ntlm].include?(datastore['LDAP::Auth']) && Net::NTLM.is_ntlm_hash?(datastore['LDAPPassword'].encode(::Encoding::UTF_16LE))
9186
errors['LDAPPassword'] = 'The GET_TICKET action is incompatible with LDAP passwords that are NTLM hashes.'
9287
end
9388
end
9489

95-
raise Msf::OptionValidateError.new(errors) unless errors.empty?
90+
raise Msf::OptionValidateError, errors unless errors.empty?
9691
end
9792

9893
def check
@@ -234,7 +229,6 @@ def set_dmsa_attributes(dn, delegated_state, preceded_by_link)
234229
end
235230

236231
def query_account(account_name)
237-
account_name = datastore['DMSA_ACCOUNT_NAME']
238232
account_name += '$' unless account_name.ends_with?('$')
239233
entry = adds_get_object_by_samaccountname(@ldap, account_name)
240234

0 commit comments

Comments
 (0)