rename method to_file
change method name from write to to_file as it makes more sense for what it is is doing and what it returnsbug/bundler_fix
parent
95beaa4f7e
commit
a81b0ed17b
|
@ -367,6 +367,19 @@ module Metasploit
|
||||||
@mutation_keys ||= generate_mutation_keys
|
@mutation_keys ||= generate_mutation_keys
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# This method takes all the options provided and streams the generated wordlist out
|
||||||
|
# to a {Rex::Quickfile} and returns the {Rex::Quickfile}.
|
||||||
|
#
|
||||||
|
# @return [Rex::Quickfile] The {Rex::Quickfile} object that the wordlist has been written to
|
||||||
|
def to_file
|
||||||
|
valid!
|
||||||
|
wordlist_file = Rex::Quickfile.new("jtrtmp")
|
||||||
|
each_word do |word|
|
||||||
|
wordlist_file.puts word
|
||||||
|
end
|
||||||
|
wordlist_file
|
||||||
|
end
|
||||||
|
|
||||||
# Raise an exception if the attributes are not valid.
|
# Raise an exception if the attributes are not valid.
|
||||||
#
|
#
|
||||||
# @raise [Invalid] if the attributes are not valid on this scanner
|
# @raise [Invalid] if the attributes are not valid on this scanner
|
||||||
|
@ -378,18 +391,7 @@ module Metasploit
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# This method takes all the options provided and streams the generated wordlist out
|
|
||||||
# to a {Rex::Quickfile} and returns the {Rex::Quickfile}.
|
|
||||||
#
|
|
||||||
# @return [Rex::Quickfile] The {Rex::Quickfile} object that the wordlist has been written to
|
|
||||||
def write
|
|
||||||
valid!
|
|
||||||
wordlist_file = Rex::Quickfile.new("jtrtmp")
|
|
||||||
each_word do |word|
|
|
||||||
wordlist_file.puts word
|
|
||||||
end
|
|
||||||
wordlist_file
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue