source: azure_iot_hub_f767zi/trunk/asp_baseplatform/lwip/lwip-2.1.2/test/fuzz/output_to_pcap.sh@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

File size: 626 bytes
Line 
1#!/bin/bash
2
3if [ -z "$1" ]
4then
5 echo "This script will make pcap files from the afl-fuzz crash/hang files"
6 echo "It needs hexdump and text2pcap"
7 echo "Please give output directory as argument"
8 exit 2
9fi
10
11for i in `ls $1/crashes/id*`
12do
13 PCAPNAME=`echo $i | grep pcap`
14 if [ -z "$PCAPNAME" ]; then
15 hexdump -C $i > $1/$$.tmp
16 text2pcap $1/$$.tmp ${i}.pcap
17 fi
18done
19for i in `ls $1/hangs/id*`
20do
21 PCAPNAME=`echo $i | grep pcap`
22 if [ -z "$PCAPNAME" ]; then
23 hexdump -C $i > $1/$$.tmp
24 text2pcap $1/$$.tmp ${i}.pcap
25 fi
26done
27rm -f $1/$$.tmp
28
29echo
30echo "Created pcap files:"
31ls $1/*/*.pcap
Note: See TracBrowser for help on using the repository browser.