add arch check

GSoC/Meterpreter_Web_Console
h00die 2018-04-22 08:32:52 -04:00
parent 2914ebf631
commit e53de896e7
1 changed files with 7 additions and 0 deletions

View File

@ -137,6 +137,13 @@ class MetasploitModule < Msf::Exploit::Local
end
vprint_good 'smap not present'
arch = kernel_hardware
unless arch.include? 'x86_64'
vprint_error "System architecture #{arch} is not supported"
return CheckCode::Safe
end
vprint_good "System architecture #{arch} is supported"
distro = cmd_exec('grep DISTRIB_CODENAME /etc/lsb-release').split('=')[1].to_s.downcase
unless kernels.include? "\"#{distro}\", \"#{kernel_release}\""
vprint_error "Kernel #{kernel_release} on #{distro} not supported"