tshark -r modbus.pcap -T fields -e modbus.regval_unit16 > new.txt
There are actually 3 ip in the destination field. If you do not mention ip.dst filter just like the above command, then response will come for all the destination ip and that will be written to new.txt file.
Assuming we are using sublime text editor. In sublime we need to remove blank lines by putting \n and replace with nothing, then we also need to remove single and more than single space by putting \s+ and replace with nothing. Now convert all the decimal values to ascii to get the string.
Only taking response for 238.0.0.5
tshark -r modbus.pcap -T fields -e modbus.regval_unit16 ip.dst == 238.0.0.5 > new.txt
or
tshark -r modbus.pcap -T fields -e modbus.regval_unit16 -Y "ip.dst == 238.0.0.5" > new.txt
Now only response for 238.0.0.5
Avi
Comments
Post a Comment