From e7db4d4fe0c334404c531821ae52a5f20f9185a1 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 31 Aug 2020 12:36:30 +0200 Subject: fix sync script, update remote sync documentation --- examples/distributed_fuzzing/sync_script.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'examples') 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 -- cgit 1.4.1 From 45d866d548d55fced58e7788d14097b9fefa8657 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Mon, 31 Aug 2020 15:40:20 +0200 Subject: typo --- examples/distributed_fuzzing/sync_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/distributed_fuzzing/sync_script.sh b/examples/distributed_fuzzing/sync_script.sh index fade48c7..b28ff6cd 100755 --- a/examples/distributed_fuzzing/sync_script.sh +++ b/examples/distributed_fuzzing/sync_script.sh @@ -39,7 +39,7 @@ FUZZ_USER=bob # Directory to synchronize SYNC_DIR='/home/bob/sync_dir' -# We only capture -M main nodes, set the name to your chosen nameing scheme +# 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) -- cgit 1.4.1 From 4398b9b517df46c9066d6554244c45c836d3e1cd Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 31 Aug 2020 16:50:26 +0200 Subject: fix network server --- examples/afl_network_proxy/afl-network-server.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples') diff --git a/examples/afl_network_proxy/afl-network-server.c b/examples/afl_network_proxy/afl-network-server.c index c70fd47d..75eb3d20 100644 --- a/examples/afl_network_proxy/afl-network-server.c +++ b/examples/afl_network_proxy/afl-network-server.c @@ -74,6 +74,7 @@ static u8 *in_data; /* Input data for trimming */ static u8 *buf2; static s32 in_len; +static s32 buf2_len; static u32 map_size = MAP_SIZE; static volatile u8 stop_soon; /* Ctrl-C pressed? */ @@ -381,6 +382,7 @@ int recv_testcase(int s, void **buf) { if (clen < 1) FATAL("did not receive valid compressed len information: %u", clen); buf2 = afl_realloc((void **)&buf2, clen); + buf2_len = clen; if (unlikely(!buf2)) { PFATAL("Alloc"); } received = 0; while (received < clen && @@ -641,6 +643,7 @@ int main(int argc, char **argv_orig, char **envp) { compressor = libdeflate_alloc_compressor(1); decompressor = libdeflate_alloc_decompressor(); buf2 = afl_realloc((void **)&buf2, map_size + 16); + buf2_len = map_size + 16; if (unlikely(!buf2)) { PFATAL("alloc"); } lenptr = (u32 *)(buf2 + 4); fprintf(stderr, "Compiled with compression support\n"); -- cgit 1.4.1