require 'ronin/exploits/exploit' require 'ronin/payloads/payload' require 'spec_helper' EXPLOITS_DIR = File.expand_path(File.join(File.dirname(__FILE__),'..','objects','exploits')) PAYLOADS_DIR = File.expand_path(File.join(File.dirname(__FILE__),'..','objects','payloads')) PAYLOAD_ENCODERS_DIR = File.join(PAYLOADS_DIR,'encoders') def load_exploit(name,base=Exploits::Exploit) base.load_from(File.join(EXPLOITS_DIR,"#{name}.rb")) end def load_payload(name,base=Payloads::Payload) base.load_from(File.join(PAYLOADS_DIR,"#{name}.rb")) end def load_payload_encoder(name,base=Payloads::Encoder) base.load_from(File.join(PAYLOAD_ENCODERS_DIR,"#{name}.rb")) end