[Python] A Way To Get "direction" value from frame packet flags with pyshark

Discussão em 'Python' iniciado por Stack, Abril 28, 2025.

  1. Stack

    Stack Membro Participativo

    I've been struggling to find the syntax needed to obtain the "Inbound" flag within the frame layer of my packets [​IMG]

    When I print(packet.frame) this is the output I get. I want the "Direction: Inbound" part (or even just the direction value, doesn't have to be the string). Yet, I am unable to figure out if there's a further field I can access beyond this - or should I be trying to convert this whole thing to a string.

    I already tried print(packet.frame_info) and I don't have any other layers in my packets.

    print(packet.layers)
    >> [<FRAME Layer>, <RAW Layer>, <IP Layer>, <UDP Layer>, <DATA Layer>]


    Any help would be appreciated - the documentation is hard to find.

    Continue reading...

Compartilhe esta Página