metasploit-framework/lib/msf/core/exploit/tcp.rb.ut.rb

26 lines
495 B
Ruby
Raw Normal View History

#!/usr/bin/env ruby
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..'))
require 'test/unit'
require 'msf/core'
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
end