2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-11-01 00:30:20 +00:00
|
|
|
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib'))
|
2005-11-01 00:48:40 +00:00
|
|
|
$:.unshift(File.dirname(__FILE__))
|
2005-11-01 00:30:20 +00:00
|
|
|
|
|
|
|
require 'test/unit'
|
|
|
|
require 'rex/ui'
|
|
|
|
require 'msf/core'
|
|
|
|
require 'none'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Test::Unit::TestCase
|
2005-11-01 00:30:20 +00:00
|
|
|
|
|
|
|
Klass = Msf::Encoders::Generic::None
|
|
|
|
|
|
|
|
def test_encoder
|
|
|
|
|
|
|
|
k = Klass.new
|
|
|
|
|
|
|
|
[
|
|
|
|
"\x41\x42\x43\x44",
|
|
|
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
|
|
].each { |raw|
|
|
|
|
assert_equal(
|
|
|
|
raw, k.encode(raw, '')
|
|
|
|
)
|
|
|
|
}
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-11-01 00:30:20 +00:00
|
|
|
end
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
end
|