1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Bug fix, thanks MC

git-svn-id: file:///home/svn/framework3/trunk@3865 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2006-09-10 16:18:35 +00:00
parent 667897ee25
commit ef6bbb649c
2 changed files with 8 additions and 4 deletions

View File

@ -32,9 +32,11 @@ class UnicodeMixed < Msf::Encoder::Alphanum
# being encoded.
#
def decoder_stub(state)
reg = datastore['BufferRegister'] || raise RuntimeError, "Need BufferRegister"
reg = datastore['BufferRegister']
offset = datastore['BufferOffset'].to_i || 0
if (not reg)
raise RuntimeError, "Need BufferRegister"
end
Rex::Encoder::Alpha2::UnicodeMixed::gen_decoder(reg, offset)
end

View File

@ -32,9 +32,11 @@ class UnicodeUpper < Msf::Encoder::Alphanum
# being encoded.
#
def decoder_stub(state)
reg = datastore['BufferRegister'] || raise RuntimeError, "Need BufferRegister"
reg = datastore['BufferRegister']
offset = datastore['BufferOffset'].to_i || 0
if (not reg)
raise RuntimeError, "Need BufferRegister"
end
Rex::Encoder::Alpha2::UnicodeUpper::gen_decoder(reg, offset)
end