Skip to content

Commit c7968d8

Browse files
author
HD Moore
committed
Merge branch 'master' of github.com:rapid7/metasploit-framework
2 parents 4d58e49 + cea8605 commit c7968d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/encoders/x86/shikata_ga_nai.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,9 @@ def generate_shikata_block(state, length, cutoff)
281281
begin
282282
# Generate a permutation saving the ECX, ESP, and user defined registers
283283
loop_inst.generate(block_generator_register_blacklist, nil, state.badchars)
284-
rescue EncodingError => e
285-
raise EncodingError
284+
rescue RuntimeError, EncodingError => e
285+
# The Rex::Poly block generator can raise RuntimeError variants
286+
raise EncodingError, e.to_s
286287
end
287288
end
288289

0 commit comments

Comments
 (0)