1

With tcp packets I process with pyshark, I can get the payload simply enough.

    payload.append(p.tcp.payload) # assuming p is a packet

How can I access the udp payload? There is no "payload" field accessible for the udp layer. This is probably simple for those that do it often but it is not for me. Any help/guidance appreciated. Already looked at stackoverflow, pyshark github site, google, and dir(p), dir(p.udp), and everything else I can think of.

ClayD
  • 332
  • 4
  • 14
  • Does this answer your question? [pyshark: access raw udp payload](https://stackoverflow.com/questions/50857673/pyshark-access-raw-udp-payload) – Will Jan 15 '21 at 12:03

1 Answers1

1

I think you want something like:

p.data.data
zsnafu
  • 332
  • 3
  • 13