correct self-eating array nature
we never noticed we were modifying the array in place because we were reculaculating. now with a memoized version we would get decreasing resultsbug/bundler_fix
parent
a92a58417f
commit
95beaa4f7e
|
@ -350,8 +350,7 @@ module Metasploit
|
||||||
# Iterate through combinations to create each possible mutation
|
# Iterate through combinations to create each possible mutation
|
||||||
mutation_keys.each do |iteration|
|
mutation_keys.each do |iteration|
|
||||||
next if iteration.flatten.empty?
|
next if iteration.flatten.empty?
|
||||||
first = iteration.shift
|
intermediate = word.dup
|
||||||
intermediate = word.gsub(/#{MUTATIONS[first]}/i,first )
|
|
||||||
iteration.each do |mutator|
|
iteration.each do |mutator|
|
||||||
next unless mutator.kind_of? String
|
next unless mutator.kind_of? String
|
||||||
intermediate.gsub!(/#{MUTATIONS[mutator]}/i,mutator)
|
intermediate.gsub!(/#{MUTATIONS[mutator]}/i,mutator)
|
||||||
|
|
Loading…
Reference in New Issue