Hello, I've written this simple script for tshark. What it does is extract all of the TCP connections that contain a SYN packet within the capture.
My problem is, for large .pcap files, I get an “argument list too long” error when executing the final tshark command. I assume my filter grows too large. Is there any scripting wizardry that would allow me to duplicate my expected results without getting an “argument list too long” error? asked 22 Sep ‘10, 11:10 cmkastn |
One Answer:
You could make the filter smaller by using the "tcp.stream==<x>" filter instead of two ip/ip/port/port filters per connection. This would change your script into:
Of course that only helps to a certain amount. If you really want to be safe in all situations, you can loop through all the tcp sessions and filter them out individually into new files and then merge them all together with mergecap afterwards. But that’s uhmm… well, nit very efficient ;-) answered 22 Sep ‘10, 11:24 SYN-bit ♦♦ |