Skip to content

Commit fa4dd1d

Browse files
committed
Add error handling on unknown shell type
1 parent e024c11 commit fa4dd1d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/msf/base/sessions/ssh_command_shell_bind.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ def bootstrap(datastore = {}, handler = nil)
242242
extend(Msf::Sessions::WindowsEscaping)
243243
elsif Metasploit::Framework::Ssh::Platform.is_posix(@platform)
244244
extend(Msf::Sessions::UnixEscaping)
245+
else
246+
raise ::Net::SSH::Exception.new("Unknown platform: #{platform}")
245247
end
246248

247249
# if the platform is known, it was recovered by communicating with the device, so skip verification, also not all

0 commit comments

Comments
 (0)