Skip to content

Commit

Permalink
Land #18623, Add File.expand_path to generate -o
Browse files Browse the repository at this point in the history
Add File.expand_path to fix no such file error
  • Loading branch information
smcintyre-r7 committed Dec 18, 2023
2 parents be84dba + 64108de commit a4d6026
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/msf/ui/console/command_dispatcher/payload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def cmd_generate(*args)
puts(buf)
else
print_status("Writing #{buf.length} bytes to #{ofile}...")
fd = File.open(ofile, 'wb')
f = File.expand_path(ofile)
fd = File.open(f, 'wb')
fd.write(buf)
fd.close
end
Expand Down

0 comments on commit a4d6026

Please sign in to comment.