title: How to convert a pcap into hex stream using tshark?
body: <p>All I tried is this in Python:</p>
  
  <p>First, I read the pcap file and used this command in Python:</p>
  
  <pre><code>with open("pcap_files/DCERPC.pcap", 'rb') as f:
      content = f.read()
  binascii.hexlify(content)
  </code></pre>
  
  <p>I am not getting the exact hex stream since its reading the entire file.</p>
  
  <p>Hence alternatively, is it possible to copy a pcap into hex stream using tshark?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>In the image <a href="https://i.stack.imgur.com/rBIE9.png" rel="nofollow noreferrer">wireshark capture</a> , there are many Frames, where i select one and copy it has hex stream. What is the command to perform this action in either tshark or xxd?</p>