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 results
bug/bundler_fix
David Maloney 2014-06-16 17:37:18 -05:00
parent a92a58417f
commit 95beaa4f7e
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 1 additions and 2 deletions

View File

@ -350,8 +350,7 @@ module Metasploit
# Iterate through combinations to create each possible mutation
mutation_keys.each do |iteration|
next if iteration.flatten.empty?
first = iteration.shift
intermediate = word.gsub(/#{MUTATIONS[first]}/i,first )
intermediate = word.dup
iteration.each do |mutator|
next unless mutator.kind_of? String
intermediate.gsub!(/#{MUTATIONS[mutator]}/i,mutator)