Skip to content

Commit dfba42e

Browse files
OJBrent Cook
authored andcommitted
Fix exception when datastore value is nil in meterp session
1 parent 4ec8798 commit dfba42e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/base/sessions/meterpreter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def bootstrap(datastore={})
174174
end
175175

176176
['InitialAutoRunScript', 'AutoRunScript'].each do |key|
177-
unless datastore[key].empty?
177+
unless datastore[key].nil? || datastore[key].empty?
178178
args = Shellwords.shellwords(datastore[key])
179179
print_status("Session ID #{session.sid} (#{session.tunnel_to_s}) processing #{key} '#{datastore[key]}'")
180180
session.execute_script(args.shift, *args)

0 commit comments

Comments
 (0)