about summary refs log tree commit diff
path: root/examples/distributed_fuzzing/sync_script.sh
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-31 12:36:30 +0200
committervan Hauser <vh@thc.org>2020-08-31 12:36:30 +0200
commite7db4d4fe0c334404c531821ae52a5f20f9185a1 (patch)
treecd4228f0b4a94f278709c984bfa598e986927d30 /examples/distributed_fuzzing/sync_script.sh
parent567042d14698a588f83c16e50c4e83143971fe46 (diff)
downloadafl++-e7db4d4fe0c334404c531821ae52a5f20f9185a1.tar.gz
fix sync script, update remote sync documentation
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..fade48c7 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 nameing 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