diff --git a/modules/encoders/mipsbe/byte_xori.rb b/modules/encoders/mipsbe/byte_xori.rb index 8123cbf7f5..dbe78d536b 100644 --- a/modules/encoders/mipsbe/byte_xori.rb +++ b/modules/encoders/mipsbe/byte_xori.rb @@ -44,7 +44,7 @@ class Metasploit3 < Msf::Encoder::Xor # add 4 number of passes for the space reserved for the key, at the end of the decoder stub # (see commented source) number_of_passes=state.buf.length+4 - raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766 + raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766 # 16-bits not (again, see also commented source) reg_14 = (number_of_passes+1)^0xFFFF diff --git a/modules/encoders/mipsbe/longxor.rb b/modules/encoders/mipsbe/longxor.rb index cfeebcb409..a0fe137c57 100644 --- a/modules/encoders/mipsbe/longxor.rb +++ b/modules/encoders/mipsbe/longxor.rb @@ -35,8 +35,8 @@ class Metasploit3 < Msf::Encoder::Xor # add one xor operation for the key (see comment below) number_of_passes=state.buf.length/4+1 - raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240 - raise InvalidPayloadSizeException.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0 + raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240 + raise EncodingError.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0 # 16-bits not (again, see below) reg_14 = (number_of_passes+1)^0xFFFF diff --git a/modules/encoders/mipsle/byte_xori.rb b/modules/encoders/mipsle/byte_xori.rb index 005ee9c5e4..7492549ead 100644 --- a/modules/encoders/mipsle/byte_xori.rb +++ b/modules/encoders/mipsle/byte_xori.rb @@ -44,7 +44,7 @@ class Metasploit3 < Msf::Encoder::Xor # add 4 number of passes for the space reserved for the key, at the end of the decoder stub # (see commented source) number_of_passes=state.buf.length+4 - raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766 + raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766 # 16-bits not (again, see also commented source) reg_14 = (number_of_passes+1)^0xFFFF diff --git a/modules/encoders/mipsle/longxor.rb b/modules/encoders/mipsle/longxor.rb index e5ccdb90ee..2e1eff8ab9 100644 --- a/modules/encoders/mipsle/longxor.rb +++ b/modules/encoders/mipsle/longxor.rb @@ -35,8 +35,8 @@ class Metasploit3 < Msf::Encoder::Xor # add one xor operation for the key (see comment below) number_of_passes=state.buf.length/4+1 - raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240 - raise InvalidPayloadSizeException.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0 + raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240 + raise EncodingError.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0 # 16-bits not (again, see below) reg_14 = (number_of_passes+1)^0xFFFF