This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I wrote a function that read the data from:

f_data = Field.new("data.data")

and then decode the data of the post request, how do I put the decoded data back in the Packet Bytes window so that the "new" data gets higlighted / showen by clicking on "Hypertext Transfer Protocol" --> Data (data.data)?

asked 18 May '11, 00:57

chill's gravatar image

chill
16223
accept rate: 0%


You can't. Modifying the underlying data in a packet is completely forbidden.

What you can do, however, is put the decoded data in a bytearray (if it's not already in a bytearray), construct a new tvbuff with Tvb.new_real, and then put the contents of that tvbuff into the protocol tree as a new item. Tvb.new_real will arrange that there will be a new tab in the Packet Bytes pane for the decoded data; clicking on the new protocol tree item will select that tab and highlight all the data in it.

permanent link

answered 19 May '11, 14:30

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

1

Note that Tvb.new_real has been replaced by ByteArray.tvb (undocumented). The parameters of the new function are exactly the same as the old.

(20 May '11, 07:50) bstn
permanent link

answered 28 Apr '13, 00:35

moceletsor's gravatar image

moceletsor
111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×431
×293

question asked: 18 May '11, 00:57

question was seen: 4,715 times

last updated: 28 Apr '13, 00:35

p​o​w​e​r​e​d by O​S​Q​A