Refactor check method
parent
ab8df35645
commit
4242de3468
|
@ -109,22 +109,22 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
vprint_warning('System does not appear to be 4.3BSD')
|
||||
end
|
||||
|
||||
if file?(movemail)
|
||||
unless movemail.end_with?('movemail')
|
||||
vprint_warning("#{movemail} has an unexpected name")
|
||||
end
|
||||
unless file?(movemail)
|
||||
vprint_bad("#{movemail} not found")
|
||||
return CheckCode::Safe
|
||||
end
|
||||
|
||||
if setuid_root?(movemail)
|
||||
vprint_good("SUID-root #{movemail} found")
|
||||
return CheckCode::Appears
|
||||
end
|
||||
unless movemail.end_with?('movemail')
|
||||
vprint_warning("#{movemail} has an unexpected name")
|
||||
end
|
||||
|
||||
unless setuid_root?(movemail)
|
||||
vprint_status("Non-SUID-root #{movemail} found")
|
||||
return CheckCode::Detected
|
||||
end
|
||||
|
||||
vprint_bad("#{movemail} not found")
|
||||
CheckCode::Safe
|
||||
vprint_good("SUID-root #{movemail} found")
|
||||
CheckCode::Appears
|
||||
end
|
||||
|
||||
def exploit
|
||||
|
|
Loading…
Reference in New Issue