fix: rescue rex runtime errors in x86/nonalpha
This commit is contained in:
parent
2616472025
commit
a282d2a8b1
|
@ -42,7 +42,11 @@ class MetasploitModule < Msf::Encoder::NonAlpha
|
|||
# payload.
|
||||
#
|
||||
def encode_block(state, block)
|
||||
newchar, state.key, state.decoder_key_size = Rex::Encoder::NonAlpha::encode_byte(block.unpack('C')[0], state.key, state.decoder_key_size)
|
||||
begin
|
||||
newchar, state.key, state.decoder_key_size = Rex::Encoder::NonAlpha::encode_byte(block.unpack('C')[0], state.key, state.decoder_key_size)
|
||||
rescue RuntimeError => e
|
||||
raise BadcharError if e.message == "BadChar"
|
||||
end
|
||||
return newchar
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue