diff options
| author | van Hauser <vh@thc.org> | 2021-12-09 11:55:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-09 11:55:36 +0100 |
| commit | 08ca4d54a55fe73e64a994c41a12af61f52e497e (patch) | |
| tree | 2d0f060cf98afbe80f5bf810fd6b167a5152be81 /afl-plot | |
| parent | 773baf9391ff5f1793deb7968366819e7fa07adc (diff) | |
| parent | 4c6d94ea5f854071277ed9729de2d4ef7d07cc84 (diff) | |
| download | afl++-08ca4d54a55fe73e64a994c41a12af61f52e497e.tar.gz | |
Merge pull request #1101 from AFLplusplus/dev
Dev
Diffstat (limited to 'afl-plot')
| -rwxr-xr-x | afl-plot | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/afl-plot b/afl-plot index 87b9caae..75981d7f 100755 --- a/afl-plot +++ b/afl-plot @@ -12,7 +12,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # get_abs_path() { @@ -195,15 +195,19 @@ exit 1 fi -mkdir -p "$outputdir/tmp" -afl-plot-ui > "$outputdir/tmp/win_ids" & +rm -rf "$outputdir/.tmp" +mkdir -p "$outputdir/.tmp" +mkfifo "$outputdir/.tmp/win_ids" || exit 1 -sleep 0.5 +afl-plot-ui > "$outputdir/.tmp/win_ids" & +W_IDS=$(cat "$outputdir/.tmp/win_ids") -W_ID1=$(cat $outputdir/tmp/win_ids | head -1) -W_ID2=$(cat $outputdir/tmp/win_ids | head -2 | tail -1) -W_ID3=$(cat $outputdir/tmp/win_ids | head -3 | tail -1) -W_ID4=$(cat $outputdir/tmp/win_ids | tail -1) +rm -rf "$outputdir/.tmp" + +W_ID1=$(echo "$W_IDS" | head -n 1) +W_ID2=$(echo "$W_IDS" | head -n 2 | tail -n 1) +W_ID3=$(echo "$W_IDS" | head -n 3 | tail -n 1) +W_ID4=$(echo "$W_IDS" | tail -n 1) echo "[*] Generating plots..." @@ -265,12 +269,6 @@ _EOF_ sleep 1 -rm "$outputdir/tmp/win_ids" - -if [ -z "$(ls -A $outputdir/tmp)" ]; then - rm -r "$outputdir/tmp" -fi - else echo "[*] Generating plots..." |
