]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests/lua-output-smtp: update for lua lib
authorJason Ish <jason.ish@oisf.net>
Tue, 6 May 2025 20:43:52 +0000 (14:43 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 7 May 2025 19:01:00 +0000 (21:01 +0200)
tests/lua-output-smtp/smtp.lua

index ec10f98f5e0400b8a13c884d33b000125381192b..6f12108aadcf1206dc51c9e12a37ed23e1e9e7d2 100644 (file)
@@ -1,5 +1,6 @@
 -- simple fast-log to file lua module
 local packet = require "suricata.packet"
+local smtp = require "suricata.smtp"
 
 name = "smtp_lua.log"
 
@@ -19,8 +20,9 @@ end
 function log(args)
    p = packet.get()
    ts = p:timestring_legacy()
-   from = SMTPGetMailFrom()
-   to = SMTPGetRcptList()
+   local smtptx = smtp.get_tx()
+   local from = smtptx:get_mail_from()
+   local to = smtptx:get_rcpt_list()
    to_string = ""
    for key,val in pairs(to) do
       to_string = to_string .. val