for example
function pdfParser:onToken(token, first, last)
local file = io.open("payload.txt", "w+")
io.output(file)
local payload = nw.getPayload(1,200)
io.write(payload)
io.close(file)
nw.createMeta(self.keys['filetype'], "pdf Archive" )
end
Can i save the payload as a file?
Does Lua parser support IO.open and other standard function?
The way that Lua was implemented on the decoders does not support all the functionality for performance reasons. It does not support the IO functions, nor can you add-in additional modules, such as DNS Resolving.