2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-06-05 06:07:18 +00:00
|
|
|
|
2005-06-09 06:18:27 +00:00
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..'))
|
2005-06-05 06:07:18 +00:00
|
|
|
|
|
|
|
require 'test/unit'
|
2005-07-09 21:18:49 +00:00
|
|
|
require 'msf/core'
|
2005-06-05 06:07:18 +00:00
|
|
|
|
|
|
|
module Msf
|
|
|
|
|
|
|
|
class Exploit::Remote::DCERPC::UnitTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
class Stub < Msf::Exploit::Remote
|
|
|
|
include Msf::Exploit::Remote::DCERPC
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_tcp
|
|
|
|
e = Stub.new
|
|
|
|
|
|
|
|
assert_equal(true, e.options.get('RHOST').required?, "invalid RHOST requirement")
|
|
|
|
assert_equal(true, e.options.get('RPORT').required?, "invalid RPORT requirement")
|
|
|
|
assert_equal(135, e.options.get('RPORT').default, "invalid RPORT default")
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|