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


I have written a dissector and placed it in /home/me

I edited init.lua with dofile("/home/me/mydissector.lua") when i run wireshark i get Lua: Error During Loading

If i cd /home/me and run wireshak the dissector is loaded properly.

I am running Wireshark 1.4.1 & Lua 5.1 on CentOS 5.6 as root.


asked 31 Aug '11, 17:17

mrb's gravatar image

accept rate: 0%

edited 31 Aug '11, 17:35

There should be additional detail after "Error during loading". For example:

tshark: Lua: Error during loading:
 [string "dummy.lua"]:2: bad argument #1 to 'dofile' (dofile: file does not exist)

What is your full error message?

(31 Aug '11, 19:16) helloworld

just to check, if you have seen 'disable potentialy harmful lua functions when running superuser' comment in the init.lua?

there's a special check for running under root that disables dofile and other os related libraries.

if running_superuser then
    local disabled_lib = {}
    setmetatable(disabled_lib,{ __index = function() error("this package has been disabled") end } );

    dofile = function() error("dofile has been disabled") end

If you absolutely need to run wireshark as root then you can temporarly disable that check by adding say '0 and' to if condition:

if 0 and running_superuser then
    local disabled_lib = {}
permanent link

answered 08 Nov '11, 20:26

ShomeaX's gravatar image

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 31 Aug '11, 17:17

question was seen: 8,776 times

last updated: 08 Nov '11, 20:26

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