lib/ronin/exploits/buffer_overflow.rb in ronin-exploits-0.1.0 vs lib/ronin/exploits/buffer_overflow.rb in ronin-exploits-0.1.1

- old
+ new

@@ -19,10 +19,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #++ # +require 'ronin/exploits/exceptions/payload_size' require 'ronin/exploits/buffer_overflow_target' require 'ronin/exploits/binary_exploit' module Ronin module Exploits @@ -35,12 +36,15 @@ # # Adds a new BufferOverflowTarget with the given _attributes_. If a # _block_ is given, it will be passed the BufferOverflowTarget object. # - def target(options={},&block) - @targets << BufferOverflowTarget.new(options,&block) + def target(attributes={},&block) + self.targets << BufferOverflowTarget.new( + attributes.merge(:exploit => self), + &block + ) end # # Builds the exploit buffer with the given _options_. # @@ -66,10 +70,10 @@ # # Default builder method which simply calls build_buffer. # def builder - @package = build_buffer + @exploit = build_buffer end end end end