Missing iterations when encoder not setted

bug/bundler_fix
agix 2014-10-07 09:59:26 +02:00
parent 2eace2b78a
commit 24bd814376
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,6 @@ class EncodedPayload
# Generate the raw version of the payload first # Generate the raw version of the payload first
generate_raw() if self.raw.nil? generate_raw() if self.raw.nil?
# If encoder is set, it could be an encoders list # If encoder is set, it could be an encoders list
# The form is "<encoder>:<iteration>, <encoder2>:<iteration>"... # The form is "<encoder>:<iteration>, <encoder2>:<iteration>"...
if reqs['Encoder'] if reqs['Encoder']
@ -82,6 +81,8 @@ class EncodedPayload
self.raw = self.encoded self.raw = self.encoded
end end
else else
self.iterations = reqs['Iterations'].to_i
self.iterations = 1 if self.iterations < 1
# No specified encoder, let BadChars or ForceEncode do their job # No specified encoder, let BadChars or ForceEncode do their job
encode() encode()
end end