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::Tcp::UnitTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
class Stub < Msf::Exploit::Remote
|
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
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")
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|