Hi,

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.

Thanks

asked 31 Aug '11, 17:17

mrb's gravatar image

mrb
16337
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
...
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 = {}
...
link

answered 08 Nov '11, 20:26

ShomeaX's gravatar image

ShomeaX
736
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

Tags:

×194

Asked: 31 Aug '11, 17:17

Seen: 4,777 times

Last updated: 08 Nov '11, 20:26

powered by OSQA