lib/ronin/exploits/format_string.rb in ronin-exploits-0.1.0 vs lib/ronin/exploits/format_string.rb in ronin-exploits-0.1.1
- old
+ new
@@ -32,15 +32,19 @@
# Targets of the format string
has n, :targets, :class_name => 'FormatStringTarget'
#
- # Adds a new FormatStringTarget with the given _options_. If a _block_
- # is given, it will be passed the new FormatStringTarget object.
+ # Adds a new FormatStringTarget with the given _attributes_. If a
+ # _block_ is given, it will be passed the new FormatStringTarget
+ # object.
#
- def target(options={},&block)
- self.targets << FormatStringTarget.new(options,&block)
+ def target(attributes={},&block)
+ self.targets << FormatStringTarget.new(
+ attributes.merge(:exploit => self),
+ &block
+ )
end
#
# Builds the format string with the given _options_.
#
@@ -74,10 +78,10 @@
#
# The default builder method, simply calls build_format_string.
#
def builder
- @package = build_format_string
+ @exploit = build_format_string
end
end
end
end