high, normal, and low conditional methods
git-svn-id: file:///home/svn/incoming/trunk@2880 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b0a5af80c6
commit
23197c644b
|
@ -50,6 +50,18 @@ class Evasion
|
|||
@level
|
||||
end
|
||||
|
||||
def self.high?
|
||||
(get_level == EVASION_HIGH)
|
||||
end
|
||||
|
||||
def self.normal?
|
||||
(get_level == EVASION_NORMAL)
|
||||
end
|
||||
|
||||
def self.low?
|
||||
(get_level == EVASION_LOW)
|
||||
end
|
||||
|
||||
#
|
||||
# Sets the evasion level for a given subsystem
|
||||
#
|
||||
|
|
|
@ -17,6 +17,10 @@ class Rex::Evasion::UnitTest < Test::Unit::TestCase
|
|||
|
||||
Klass.set_level(EVASION_LOW)
|
||||
assert_equal(EVASION_LOW, Klass.get_level)
|
||||
|
||||
assert_equal(false, Klass.high?)
|
||||
assert_equal(false, Klass.normal?)
|
||||
assert_equal(true, Klass.low?)
|
||||
end
|
||||
|
||||
def test_subsys
|
||||
|
|
Loading…
Reference in New Issue