From ba1339d6771e575c82f90900ba4eae7300186247 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 9 Mar 2017 21:35:37 +0100 Subject: [PATCH] add netdump_rsync.sh script --- netdump_rsync.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 netdump_rsync.sh diff --git a/netdump_rsync.sh b/netdump_rsync.sh new file mode 100755 index 0000000..462f7b9 --- /dev/null +++ b/netdump_rsync.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +while true; do + # copy netdumps from vuln-box and remove everything except last dump + rsync -vaP vuln:/root/network/ /media/sf_vmshare/_netdumps/raw/ && ssh vuln 'cd /root/network; ls -1tr | head -n-1 | xargs --no-run-if-empty rm' + sleep 60 + echo "cycling.." +done -- 2.43.0