title: Convert pcap file to reassemled stream(json)
body: <p>There is pcap file for <a href="https://wiki.wireshark.org/SampleCaptures?action=AttachFile&amp;do=get&amp;target=telnet-cooked.pcap" rel="nofollow noreferrer">telnet-cooked.pcap</a> that I want to extract all sessions to reassemled stream</p>
  <p>For example in this pcap</p>
  <pre><code>192.168.0.1 -&gt; 192.168.0.2 : &quot;login:&quot;
  192.168.0.2 -&gt; 192.168.0.1 : &quot;fake&quot;
  </code></pre>
  <p>How can I do that with python or another tools automatically to json that present me all the stream in pcap file ? (not with wireshark)</p>
  <p>I care only about source and dest IP and payload</p>
  <p>I tried to use <code>tshark</code> with command:</p>
  <pre><code>tshark -r telnet-cooked.pcap -T json &gt;output.json
  </code></pre>
  <p>But I get only big json file that translate each packet to json , with lot of key that I didn't want like <code>eth</code> , and this didn't do reassemled of the stream</p>