Replace `cat` with Ruby's `read_file`
Thanks to wvu-r7 for the commentbug/bundler_fix
parent
dbb2abeda1
commit
b46073b34a
|
@ -67,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
# x_tables 36864 2 iptable_filter,ip_tables, Live 0x0000000000000000
|
||||
vprint_status('Checking if ip_tables is loaded in kernel')
|
||||
if target.name == "Ubuntu"
|
||||
iptables = cmd_exec('cat /proc/modules')
|
||||
iptables = read_file('/proc/modules')
|
||||
if iptables.include?('ip_tables')
|
||||
vprint_good('ip_tables.ko is loaded')
|
||||
else
|
||||
|
@ -75,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
end
|
||||
return iptables.include?('ip_tables')
|
||||
elsif target.name == "Fedora"
|
||||
iptables = cmd_exec('cat /proc/modules')
|
||||
iptables = read_file('/proc/modules')
|
||||
if iptables.include?('iptable_raw')
|
||||
vprint_good('iptable_raw is loaded')
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue