The InvalidPayloadSizeException wasn't actually defined anywhere
parent
b0a8c77127
commit
093ca31c7d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue