Skip to content

Commit 9349e1e

Browse files
committed
Fix find_script_path to check only files
1 parent 73c9807 commit 9349e1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/base/sessions/scriptable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def find_script_path(script)
2727

2828
# Scan all of the path combinations
2929
check_paths.each { |path|
30-
if ::File.exist?(path)
30+
if ::File.file?(path)
3131
full_path = path
3232
break
3333
end
@@ -150,7 +150,7 @@ def execute_script(script_name, *args)
150150
# session
151151
local_exploit_opts = local_exploit_opts.merge(opts)
152152

153-
new_session = mod.exploit_simple(
153+
mod.exploit_simple(
154154
'Payload' => local_exploit_opts.delete('payload'),
155155
'Target' => local_exploit_opts.delete('target'),
156156
'LocalInput' => self.user_input,

0 commit comments

Comments
 (0)