require 'ronin/exploits/local' require 'ronin/exploits/helpers/format_string' require 'spec_helper' describe Exploits::Helpers::FormatString do before(:all) do @exploit = Exploits::Local.new do helper :format_string self.name = 'example_fmtstring' targeting do |target| target.arch = Arch.i686 target.pop_length = 256 target.overwrite = 0xffffaaaa target.address = 0xffffbbbb end end end it "should use Targets::FormatString for targets" do @exploit.targets.all? { |target| target.class == Exploits::Targets::FormatString }.should == true end it "should build a format string" do @exploit.target = @exploit.targets[0] @exploit.build! end end