Method: Rex::Script.execute_file

Defined in:
lib/rex/script.rb

.execute_file(file, in_binding = nil) ⇒ Object

Reads the contents of the supplied file and exeutes them.



19
20
21
22
23
# File 'lib/rex/script.rb', line 19

def self.execute_file(file, in_binding = nil)
  str = ''
  buf = ::File.read(file, ::File.size(file))
  execute(buf, in_binding)
end