From ae61d0a9d62dd30f3bf798fc408a8357bcebbb1a Mon Sep 17 00:00:00 2001 From: Ashley Donaldson Date: Fri, 22 Nov 2024 13:35:43 +1100 Subject: [PATCH] MSFTidy changes --- modules/auxiliary/admin/ldap/change_password.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 modules/auxiliary/admin/ldap/change_password.rb diff --git a/modules/auxiliary/admin/ldap/change_password.rb b/modules/auxiliary/admin/ldap/change_password.rb old mode 100755 new mode 100644 index f5b18aa55b8a..372e4e838eff --- a/modules/auxiliary/admin/ldap/change_password.rb +++ b/modules/auxiliary/admin/ldap/change_password.rb @@ -17,7 +17,7 @@ def initialize(info = {}) info, 'Name' => 'Change Password', 'Description' => %q{ - This module allows Active Directory users to change their own passwords, or reset passwords for + This module allows Active Directory users to change their own passwords, or reset passwords for accounts they have privileges over. }, 'Author' => [ @@ -90,7 +90,7 @@ def run fail_with(Failure::BadConfig, 'Must set PASSWORD when changing password') if datastore['PASSWORD'].blank? end if session.blank? && datastore['USERNAME'].blank? - print_warning("Connecting with an anonymous bind") + print_warning('Connecting with an anonymous bind') end ldap_connect do |ldap| validate_bind_success!(ldap) @@ -151,7 +151,7 @@ def action_change new_pass = "\"#{datastore['NEW_PASSWORD']}\"".encode('utf-16le').bytes.pack('c*') old_pass = "\"#{datastore['PASSWORD']}\"".encode('utf-16le').bytes.pack('c*') - unless @ldap.modify(:dn => obj['dn'], :operations => [[:delete, ATTRIBUTE, old_pass], [:add, ATTRIBUTE, new_pass]]) + unless @ldap.modify(dn: obj['dn'], operations: [[:delete, ATTRIBUTE, old_pass], [:add, ATTRIBUTE, new_pass]]) fail_with_ldap_error("Failed to reset the password for #{datastore['USERNAME']}.") end print_good("Successfully changed password for #{datastore['USERNAME']}.")