The InvalidPayloadSizeException wasn't actually defined anywhere

unstable
HD Moore 2015-05-18 15:36:15 -05:00
parent b0a8c77127
commit 093ca31c7d
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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