Skip to content

Commit 7989a29

Browse files
author
HD Moore
committed
Switch to the stock EncodingError exception
1 parent 5c31586 commit 7989a29

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

modules/encoders/x86/avoid_utf8_tolower.rb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,6 @@
9090
#
9191
class Metasploit3 < Msf::Encoder
9292

93-
#
94-
# In some cases, payloads can be an invalid size that is incompatible with
95-
# this encoder
96-
#
97-
class InvalidPayloadSizeException < ::Exception
98-
def initialize(msg)
99-
@msg = msg
100-
end
101-
102-
def to_s
103-
@msg
104-
end
105-
end
106-
10793
# This encoder has a manual ranking because it should only be used in cases
10894
# where information has been explicitly supplied, like the BufferOffset.
10995
Rank = ManualRanking
@@ -136,7 +122,7 @@ def decoder_stub(state)
136122

137123
# Check to make sure that the length is a valid size
138124
if is_badchar(state, len)
139-
raise InvalidPayloadSizeException.new("The payload being encoded is of an incompatible size (#{len} bytes)")
125+
raise EncodingError.new("The payload being encoded is of an incompatible size (#{len} bytes)")
140126
end
141127

142128
decoder =

0 commit comments

Comments
 (0)