Convert dfilter script to Lua