1.0.0 • Published 2 years ago

wireshark-lua-api-declarations v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Wireshark's Lua API TypeScript Declarations

see Lua in Wireshark and Chapter 11. Wireshark’s Lua API Reference Manual

Based on Wireshark 3.6.2

Test

Limitation

typeof(obj)

typeof(obj) is broken because of TypeScript's reserved word.

However, You can make equivalent function in TypeScript.

init.lua in wireshark

function typeof(obj)
    local mt = getmetatable(obj)
    return mt and mt.__typeof or obj.__typeof or type(obj)
end

your.ts

function typeof_ts(this:void,obj:any):string{
  const mt = getmetatable(obj) as any;
  if(mt!=null && mt.__typeof){
    return mt.__typeof;
  }
  if(obj.__typeof){
    return obj.__typeof;
  }
  return type(obj);
}

Regex Library

GRegex Binding is not supported in future version.

https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_PCRE2.html

Example

https://github.com/novogrammer/wireshark-socketio-post-dissector

1.0.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago