Refactor check method

GSoC/Meterpreter_Web_Console
William Vu 2018-12-03 12:22:40 -06:00
parent ab8df35645
commit 4242de3468
1 changed files with 10 additions and 10 deletions

View File

@ -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