Skip to content

Commit a444bdb

Browse files
committed
handle no datastore
1 parent 198aeda commit a444bdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/msf/base/sessions/command_shell.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def initialize(conn, opts = {})
5151
self.platform ||= ""
5252
self.arch ||= ""
5353
self.max_threads = 1
54-
if !opts[:datastore]["CommandShellCleanupCommand"].blank?
54+
datastore = opts[:datastore]
55+
if datastore && !datastore["CommandShellCleanupCommand"].blank?
5556
@cleanup_command = opts[:datastore]["CommandShellCleanupCommand"]
5657
end
5758
super

0 commit comments

Comments
 (0)