Skip to content

Commit 9af1f69

Browse files
Land rapid7#18920, Fix smb session autorun
2 parents 76e27ed + 2399c2a commit 9af1f69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/base/sessions/smb.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def process_autoruns(datastore)
4545
next if datastore[key].nil? || datastore[key].empty?
4646

4747
args = Shellwords.shellwords(datastore[key])
48-
print_status("Session ID #{session.sid} (#{session.tunnel_to_s}) processing #{key} '#{datastore[key]}'")
49-
session.execute_script(args.shift, *args)
48+
print_status("Session ID #{sid} (#{tunnel_to_s}) processing #{key} '#{datastore[key]}'")
49+
execute_script(args.shift, *args)
5050
end
5151
end
5252

0 commit comments

Comments
 (0)