Wireshark mailing list archives

reading a config file at startup in lua


From: "Lehmann, Florian (EXT-Nomiko - DE/Ulm)" <florian.lehmann.ext () nsn com>
Date: Fri, 29 Apr 2011 12:04:54 +0200

Hi All,

I was trying to read information from a config-file to control  whether
a lua-plugin shall be loaded or not. Somehow, the following code does
not work with wireshark:

In init.lua:
[...]
dofile("config.lua")
[...]

config.lua (Code snippet, as the rest is not working ):

  1 require "iuplua"
  2 fh = io.open("luaconfig.conf","r")
  3 local t = ""
  4 t = fh:read("*all")

  5 fh:close()
  6 iup.Message("Config File", t)

Iuplua provides simple gui capabilities.
This code works perfectly fine on Windows cmd calling:
%WIRESHARK%\lua5.1.exe config.lua

The same code does not work when called from init.lua at wireshark
startup.

I already searched the web, but I did not found anything similar. Could
someone please tell me, how to solve this issue?

Thanks in advance and best regards from Germany, 
Florian Lehmann

___________________________________________________________________________
Sent via:    Wireshark-users mailing list <wireshark-users () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-users
Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
             mailto:wireshark-users-request () wireshark org?subject=unsubscribe


Current thread: