File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -305,11 +305,8 @@ def desc
305
305
# Runs the Meterpreter script or resource file
306
306
#
307
307
def execute_file ( full_path , args )
308
- # Infer a Meterpreter script by it either having the .rb extension, or it
309
- # containing a reference to the client object. This is for backward
310
- # compatibility, since the API is not explicit to the user whether this
311
- # should be a resource file or a Meterpreter script.
312
- if File . extname ( full_path ) == ".rb" || File . read ( full_path ) . match? ( /\s *client\. / )
308
+ # Infer a Meterpreter script by it having an .rb extension
309
+ if File . extname ( full_path ) == ".rb"
313
310
Rex ::Script ::Meterpreter . new ( self , full_path ) . run ( args )
314
311
else
315
312
console . load_resource ( full_path )
You can’t perform that action at this time.
0 commit comments