THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

seems like i am missing cjson files for suriwire

HI, i get these messages when i start up wireshark. it says i am missing some files. where is the right place to download them from? the error says: lua error during loading. no filed package preload [cjson] no file cjson.lua no file init.lua no file cjson.dll no file loadall.dll

the suriwire.lua has this "local json = require("cjson") " thanks for any help or suggestions.

thanks for your help and suggestions.

iqworks's avatar
1
iqworks
asked 2022-03-31 18:43:14 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

You would seem to be using a Lua plugin that isn't part of the standard Wireshark distribution so you'll have to seek support from the plugin creator, possibly here.

grahamb's avatar
23.8k
grahamb
answered 2022-04-01 08:46:32 +0000
edit flag offensive 0 remove flag delete link

Comments

thanks, i will check out lua

iqworks's avatar iqworks (2022-04-01 15:50:04 +0000) edit

You should, instead, check for Lua CJSON; the require() function in Lua loads add-on "modules", both built-in modules and third-party modules. CJSON is a third-party module; see the "Installation" section of the Lua CJSON manual for instructions on how to install it.

The Web page for Suriwire does not appear to mention Lua CJSON anywhere. Lua CJSON is, however, mentioned in Suriwire's README.rst file; however, the home page just has a download link for Suriwire, and doesn't point you to the README.rst file for instructions on how to install it, and that README.rst file doesn't point to the Lua CJSON site.

Guy Harris's avatar Guy Harris (2022-04-04 07:35:31 +0000) edit
add a comment see more comments
0

Looks like suriwire.lua could use dkjson:

local ok, json = pcall(require, "cjson")
if not ok then
    json = require("dkjson")
end

This project (ntop/nDPI/wireshark/tshark/lib/) includes dkjson.lua and has an example using it with a tshark Lua plugin.

tshark.lua:

local json = require "dkjson"
Chuckc's avatar
3k
Chuckc
answered 2022-04-04 20:01:25 +0000, updated 2022-04-04 20:03:43 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer