Skip to content

Commit 98d531e

Browse files
committed
Check if session responds to response_timeout
1 parent b33efd8 commit 98d531e

File tree

1 file changed

+3
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+3
-1
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,9 @@ def cmd_sessions(*args)
17781778
end
17791779
ensure
17801780
# Restore timeout for each session
1781-
session.response_timeout = last_known_timeout if last_known_timeout
1781+
if session.respond_to?(:response_timeout)
1782+
session.response_timeout = last_known_timeout if last_known_timeout
1783+
end
17821784
end
17831785
# If the session isn't a meterpreter or shell type, it
17841786
# could be a VNC session (which can't run commands) or

0 commit comments

Comments
 (0)