Skip to content

Commit bbdf06a

Browse files
David MaloneyDavid Maloney
authored andcommitted
coerece nil credentials to empty strings
rubySMB doesn't take nils for credential data, so coerce any nils into empty strings bfore sending it on
1 parent 5a1e2d6 commit bbdf06a

File tree

1 file changed

+3
-1
lines changed
  • lib/metasploit/framework/login_scanner

1 file changed

+3
-1
lines changed

lib/metasploit/framework/login_scanner/smb.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ def attempt_login(credential)
9494

9595
begin
9696

97-
realm = credential.realm || ""
97+
realm = credential.realm || ""
98+
username = credential.public || ""
99+
password = credential.private || ""
98100
client = RubySMB::Client.new(self.dispatcher, username: credential.public, password: credential.private, domain: realm)
99101
status_code = client.login
100102

0 commit comments

Comments
 (0)