PyShark - get data from second http2 layer of packet

47 Views Asked by At

I use the LiveCapture Feature of PyShark: With

packet.layers

I can see all the layers of my packet

[<ETH Layer>, <IP Layer>, <TCP Layer>, <TLS Layer>, <HTTP2 Layer>, <HTTP2 Layer>, <_WS.COL Layer>, <DATA Layer>]

Now I like to read the data from the second http2 layer. I can read the data with:

packet.http2.data_data

It gives me the data of the first element. But I want the data of the second http2 layer.

I tried to count the layers with:

packet.http2[1].data_data

but this doesnt work. Any help for this?

0

There are 0 best solutions below