2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-09-16 09:27:41 +00:00
|
|
|
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..'))
|
|
|
|
|
2005-12-13 06:08:40 +00:00
|
|
|
require 'rex/test'
|
2005-09-16 09:27:41 +00:00
|
|
|
require 'rex/proto/smb/utils'
|
|
|
|
|
|
|
|
class Rex::Proto::SMB::Utils::UnitTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
Klass = Rex::Proto::SMB::Utils
|
|
|
|
|
|
|
|
def test_nbname
|
|
|
|
|
|
|
|
nbdecoded = 'METASPLOITROCKS!'
|
|
|
|
nbencoded = 'ENEFFEEBFDFAEMEPEJFEFCEPEDELFDCB'
|
|
|
|
|
|
|
|
assert_equal(Klass.nbname_encode(nbdecoded), nbencoded )
|
|
|
|
assert_equal(Klass.nbname_decode(nbencoded), nbdecoded )
|
|
|
|
end
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|