Ask Your Question

Revision history [back]

Tshark LUA Bytes fonctions

Hi,

i'm new to lua programming and am trying to create a lua script in conjonction with tshark. My goal is to get a xor key which is in the packet and apply it to the entire data field. It's a malware.

I've found many string functions but how do I get a part of my data.data. Example myvar = data.data[1 to 8 ] Type of data.data = userdata and it's a sequence of bytes https://www.wireshark.org/docs/dfref/d/data.html

Can anyone please advise ? Regards k4nfr3

Tshark LUA Bytes fonctions

Hi,

i'm new to lua programming and am trying to create a lua script in conjonction with tshark. My goal is to get a xor key which is in the packet and apply it to the entire data field. It's a malware.

I've found many string functions but how do I get a part of my data.data. Example myvar = data.data[1 to 8 ] Type of data.data = userdata and it's a sequence of bytes https://www.wireshark.org/docs/dfref/d/data.html

Can anyone please advise ? Regards k4nfr3