Skip to content

Commit 0692734

Browse files
committed
If message becomes nil, we should force a to_s for the regex
next_message can be nil sometimes if packet is nil (see net/ssh's poll_message source)
1 parent 530332b commit 0692734

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/unix/ssh/tectia_passwd_changereq.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def is_passwd_method?(user, transport)
146146
message = transport.next_message
147147

148148
# Type 51 means the server is trying to tell us what auth methods are allowed.
149-
if message.type == 51 and message !~ /password/
149+
if message.type == 51 and message.to_s !~ /password/
150150
print_error("#{rhost}:#{rport} - This host does not use password method authentication")
151151
return false
152152
end

0 commit comments

Comments
 (0)