Skip to content

Commit b46073b

Browse files
committed
Replace cat with Ruby's read_file
Thanks to wvu-r7 for the comment
1 parent dbb2abe commit b46073b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exploits/linux/local/netfilter_priv_esc.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def iptables_loaded?()
6767
# x_tables 36864 2 iptable_filter,ip_tables, Live 0x0000000000000000
6868
vprint_status('Checking if ip_tables is loaded in kernel')
6969
if target.name == "Ubuntu"
70-
iptables = cmd_exec('cat /proc/modules')
70+
iptables = read_file('/proc/modules')
7171
if iptables.include?('ip_tables')
7272
vprint_good('ip_tables.ko is loaded')
7373
else
7474
print_error('ip_tables.ko is not loaded. root needs to run iptables -L or similar command')
7575
end
7676
return iptables.include?('ip_tables')
7777
elsif target.name == "Fedora"
78-
iptables = cmd_exec('cat /proc/modules')
78+
iptables = read_file('/proc/modules')
7979
if iptables.include?('iptable_raw')
8080
vprint_good('iptable_raw is loaded')
8181
else

0 commit comments

Comments
 (0)