1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-09 04:26:11 +02:00

add arch check

This commit is contained in:
h00die 2018-04-22 08:32:52 -04:00
parent 2914ebf631
commit e53de896e7

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"