added to_native for unicode
git-svn-id: file:///home/svn/incoming/trunk@3319 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
caa535bd95
commit
b5b9e2ac1f
|
@ -23,7 +23,7 @@ $framework.encoders.each_module { |name, mod|
|
|||
|
||||
1000.times {
|
||||
|
||||
if (MachineTest.testraw(buf = e.encode("\xcc")))
|
||||
if (MachineTest.testraw(buf = e.to_native(e.encode("\xcc"))))
|
||||
failed += 1
|
||||
$stderr.puts("#{name.ljust(25)}: failure: #{Rex::Text.to_hex(buf)}")
|
||||
else
|
||||
|
|
|
@ -51,6 +51,14 @@ class UnicodeMixed < Msf::Encoder::Alphanum
|
|||
def encode_end(state)
|
||||
state.encoded += Rex::Encoder::Alpha2::UnicodeMixed::add_terminator()
|
||||
end
|
||||
|
||||
#
|
||||
# Returns the unicode version of the supplied buffer.
|
||||
#
|
||||
def to_native(buffer)
|
||||
Rex::Text.to_unicode(buffer)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end end end
|
||||
|
|
|
@ -51,6 +51,14 @@ class UnicodeUpper < Msf::Encoder::Alphanum
|
|||
def encode_end(state)
|
||||
state.encoded += Rex::Encoder::Alpha2::UnicodeUpper::add_terminator()
|
||||
end
|
||||
|
||||
#
|
||||
# Returns the unicode version of the supplied buffer.
|
||||
#
|
||||
def to_native(buffer)
|
||||
Rex::Text.to_unicode(buffer)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end end end
|
||||
|
|
Loading…
Reference in New Issue