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

Converting bytes to table for Lua dissector doesn’t work

0

See this question: Converting bytes to table in Lua doesn't work in 5.2.4 for some background information.

I'm writing a Lua dissector that tries to decrypt AES packets, and I'm using aeslua to achieve this, but there's one line within that code that Lua doesn't like:

local pwBytes = { string.byte(password,1,#password)}

That line runs fine when I Try It Online, and someone over on SO reported that it works fine in stock 5.2.4, so I'm not sure what's going on.

This is happening on Linux (Ubuntu 14.04, Wireshark v1.10.6, installed via apt-get) and on Windows (Windows 10, Wireshark v2.2.4, installed via pre-built binary)

So how can I fix this issue? For now it's not a problem, because I'm using luagcrypt, but switching to pure Lua would be much easier for cross-platform dissecting.

asked 11 Feb '17, 17:47

Grayda's gravatar image

Grayda
6113
accept rate: 0%

edited 12 Feb '17, 01:52