2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-09-25 19:35:21 +00:00
|
|
|
|
|
|
|
$:.unshift(File.join(File.dirname(__FILE__), '..', '..'))
|
|
|
|
|
|
|
|
require 'test/unit'
|
|
|
|
require 'rex/exploitation/egghunter'
|
|
|
|
|
|
|
|
class Rex::Exploitation::Egghunter::UnitTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
Klass = Rex::Exploitation::Egghunter
|
|
|
|
|
|
|
|
def test_egghunter
|
|
|
|
r = Klass.new('bogus')
|
|
|
|
assert_nil(r.generate)
|
|
|
|
|
|
|
|
r = Klass.new('win')
|
|
|
|
assert_nil(r.generate)
|
|
|
|
|
2006-01-30 15:13:25 +00:00
|
|
|
r = Klass.new('win', ARCH_X86)
|
2005-09-25 19:35:21 +00:00
|
|
|
assert_not_nil(r.generate)
|
2005-09-25 19:36:58 +00:00
|
|
|
assert_not_nil(r.generate[0])
|
|
|
|
assert_not_nil(r.generate[1])
|
2005-09-25 19:35:21 +00:00
|
|
|
end
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|