Sha256: 3676af3f3246727980c304305a4e07ac69b4fc0e0105a4b26d72ef521c4338e0

Contents?: true

Size: 646 Bytes

Versions: 43

Compression:

Stored size: 646 Bytes

Contents

#!/usr/bin/env ruby

module Rex

###
#
# This class provides an easy interface for loading and executing ruby
# scripts.
#
###
module Script

	class Completed < ::RuntimeError
	end

	#
	# Reads the contents of the supplied file and exeutes them.
	#
	def self.execute_file(file, in_binding = nil)
		str = ''
		buf = ::File.read(file, ::File.size(file))
		execute(buf, in_binding)
	end

	#
	# Executes arbitrary ruby from the supplied string.
	#
	def self.execute(str, in_binding = nil)
		begin
			eval(str, in_binding)
		rescue Completed
		end
	end

end

end

require 'rex/script/base'
require 'rex/script/shell'
require 'rex/script/meterpreter'

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/script.rb
librex-0.0.63 lib/rex/script.rb
librex-0.0.54 lib/rex/script.rb
librex-0.0.53 lib/rex/script.rb
librex-0.0.52 lib/rex/script.rb
librex-0.0.51 lib/rex/script.rb
librex-0.0.50 lib/rex/script.rb
librex-0.0.49 lib/rex/script.rb
librex-0.0.48 lib/rex/script.rb
librex-0.0.47 lib/rex/script.rb
librex-0.0.46 lib/rex/script.rb
librex-0.0.44 lib/rex/script.rb
librex-0.0.43 lib/rex/script.rb
librex-0.0.42 lib/rex/script.rb
librex-0.0.41 lib/rex/script.rb
librex-0.0.40 lib/rex/script.rb
librex-0.0.39 lib/rex/script.rb
librex-0.0.38 lib/rex/script.rb
librex-0.0.37 lib/rex/script.rb
librex-0.0.36 lib/rex/script.rb