lib/ruby_smb/ntlm/client.rb in ruby_smb-3.2.0 vs lib/ruby_smb/ntlm/client.rb in ruby_smb-3.2.1
- old
+ new
@@ -49,9 +49,13 @@
def use_oem_strings?
# @see https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/99d90ff4-957f-4c8a-80e4-5bfe5a9a9832
!challenge_message.has_flag?(:UNICODE) && challenge_message.has_flag?(:OEM)
end
+ def ntlmv2_hash
+ @ntlmv2_hash ||= RubySMB::NTLM.ntlmv2_hash(username, password, domain, {:client_challenge => client_challenge, :unicode => !use_oem_strings?})
+ end
+
def calculate_user_session_key!
if is_anonymous?
# see MS-NLMP section 3.4
@user_session_key = "\x00".b * 16
else