Skip to content

Commit 5675c59

Browse files
committed
Fix blank values for LDAP NTLM auth
1 parent f3b426c commit 5675c59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/metasploit/framework/ldap/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def ldap_auth_opts_kerberos(opts)
8282
def ldap_auth_opts_ntlm(opts)
8383
auth_opts = {}
8484
ntlm_client = RubySMB::NTLM::Client.new(
85-
opts[:username],
86-
opts[:password],
85+
(opts[:username].nil? ? '' : opts[:username]),
86+
(opts[:password].nil? ? '' : opts[:password]),
8787
workstation: 'WORKSTATION',
8888
domain: opts[:domain].blank? ? '.' : opts[:domain],
8989
flags:

0 commit comments

Comments
 (0)