Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

please help tshark -b duration problem.

I have a bash script that using tshark command. when I use tshark -b filesize option, all the script lines are running well. But, when I use tshark -b duration option instead, the capturing is working well but the next script lines are stopped.

I'll give my script. please help me..

This is my bash script.


printf "start packet capturing\n\n"

while echo ~/wireshark/build/run/tshark -nni ens33 -T ek -w /var/packets/test.pcap -b duration:30

do shopt -s nullglob

for filename in /var/packets/*.pcap; do

        foldername=$(echo "$filename" | awk '{print (substr($0, 25, 8));}'); 

        mkdir -p /var/packets/"$foldername" 

        echo `~/wireshark/build/run/tshark -r "$filename" -T ek > "$filename".json`

        mv "$filename" /var/packets/"$foldername"

        mv "$filename".json /var/Json

        echo "$filename $foldername" ;

done

done

thanks.

please help tshark -b duration problem.

I have a bash script that using tshark command. when I use tshark -b filesize option, all the script lines are running well. But, when I use tshark -b duration option instead, the capturing is working well but the next script lines are stopped.

I'll give my script. please help me..

This is my bash script.


tshark version is 3.1.1

printf "start packet capturing\n\n"

while echo ~/wireshark/build/run/tshark -nni ens33 -T ek -w /var/packets/test.pcap -b duration:30

do shopt -s nullglob

for filename in /var/packets/*.pcap; do

        foldername=$(echo "$filename" | awk '{print (substr($0, 25, 8));}'); 

        mkdir -p /var/packets/"$foldername" 

        echo `~/wireshark/build/run/tshark -r "$filename" -T ek > "$filename".json`

        mv "$filename" /var/packets/"$foldername"

        mv "$filename".json /var/Json

        echo "$filename $foldername" ;

done

done

thanks.

please help tshark -b duration problem.

I have a bash script that using tshark command. when I use tshark -b filesize option, all the script lines are running well. But, when I use tshark -b duration option instead, the capturing is working well but the next script lines are stopped.

Or do you know how to split a packet every 30 seconds besides the -b duration option?

I'll give my script. please help me..

This is my bash script.

tshark version is 3.1.1

printf "start packet capturing\n\n"

while echo ~/wireshark/build/run/tshark -nni ens33 -T ek -w /var/packets/test.pcap -b duration:30

do shopt -s nullglob

for filename in /var/packets/*.pcap; do

        foldername=$(echo "$filename" | awk '{print (substr($0, 25, 8));}'); 

        mkdir -p /var/packets/"$foldername" 

        echo `~/wireshark/build/run/tshark -r "$filename" -T ek > "$filename".json`

        mv "$filename" /var/packets/"$foldername"

        mv "$filename".json /var/Json

        echo "$filename $foldername" ;

done

done

thanks.

please help tshark -b duration problem.

I have a bash script that using tshark command. when I use tshark -b filesize option, all the script lines are running well. But, when I use tshark -b duration option instead, the capturing is working well but the next script lines are stopped.

Or do you know how to split a packet every 30 seconds besides the -b duration option?

I'll give my script. please help me..

This is my bash script.

script. tshark version is 3.1.1

printf "start packet capturing\n\n"

capturing\n\n" while echo ~/wireshark/build/run/tshark `~/wireshark/build/run/tshark -nni ens33 -T ek -w /var/packets/test.pcap -b duration:30

duration:30` do shopt -s nullglob

 for filename in /var/packets/*.pcap; do
          foldername=$(echo "$filename" | awk '{print (substr($0, 25, 8));}'); 
          mkdir -p /var/packets/"$foldername" 
          echo `~/wireshark/build/run/tshark -r "$filename" -T ek > "$filename".json`
          mv "$filename" /var/packets/"$foldername"
          mv "$filename".json /var/Json
          echo "$filename $foldername" ;
     done
done

done

thanks.