about summary refs log tree commit diff
path: root/examples/distributed_fuzzing/sync_script.sh
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-09-01 19:54:18 +0200
committerhexcoder- <heiko@hexco.de>2020-09-01 19:54:18 +0200
commit6340674a23e9b8d2e8b3a8705be1129363a60d46 (patch)
treea65cc9c9069933317c2a0560e0d5525de5c8785f /examples/distributed_fuzzing/sync_script.sh
parent4538f689ede6743d097c85ded2fdcb4f9663020b (diff)
parente4a86b40a5504c608d6ba7f44133ab39b24ac6f8 (diff)
downloadafl++-6340674a23e9b8d2e8b3a8705be1129363a60d46.tar.gz
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'examples/distributed_fuzzing/sync_script.sh')
-rwxr-xr-xexamples/distributed_fuzzing/sync_script.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/distributed_fuzzing/sync_script.sh b/examples/distributed_fuzzing/sync_script.sh
index c45ae69b..b28ff6cd 100755
--- a/examples/distributed_fuzzing/sync_script.sh
+++ b/examples/distributed_fuzzing/sync_script.sh
@@ -39,8 +39,11 @@ FUZZ_USER=bob
 # Directory to synchronize
 SYNC_DIR='/home/bob/sync_dir'
 
-# Interval (seconds) between sync attempts
-SYNC_INTERVAL=$((30 * 60))
+# We only capture -M main nodes, set the name to your chosen naming scheme
+MAIN_NAME='main'
+
+# Interval (seconds) between sync attempts (eg one hour)
+SYNC_INTERVAL=$((60 * 60))
 
 if [ "$AFL_ALLOW_TMP" = "" ]; then
 
@@ -63,7 +66,7 @@ while :; do
     echo "[*] Retrieving data from ${host}.${FUZZ_DOMAIN}..."
 
     ssh -o 'passwordauthentication no' ${FUZZ_USER}@${host}.$FUZZ_DOMAIN \
-      "cd '$SYNC_DIR' && tar -czf - ${host}_*/[qf]*" >".sync_tmp/${host}.tgz"
+      "cd '$SYNC_DIR' && tar -czf - ${host}_${MAIN_NAME}*/" > ".sync_tmp/${host}.tgz"
 
   done
 
@@ -80,7 +83,7 @@ while :; do
       echo "    Sending fuzzer data from ${src_host}.${FUZZ_DOMAIN}..."
 
       ssh -o 'passwordauthentication no' ${FUZZ_USER}@$dst_host \
-        "cd '$SYNC_DIR' && tar -xkzf -" <".sync_tmp/${src_host}.tgz"
+        "cd '$SYNC_DIR' && tar -xkzf - " < ".sync_tmp/${src_host}.tgz"
 
     done