Handle file patching on framework side
parent
aa58634b24
commit
c84eb9fee9
|
@ -39,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
print_status('Reading /etc/rc.local')
|
||||
|
||||
# read /etc/rc.local, but remove `exit 0`
|
||||
rc_local = cmd_exec('cat /etc/rc.local | grep -v "exit 0"')
|
||||
rc_local = read_file('/etc/rc.local').gsub(/^exit.*$/, '')
|
||||
|
||||
# add payload and put back `exit 0`
|
||||
rc_local += [
|
||||
|
|
Loading…
Reference in New Issue