Skip to content

Commit

Permalink
WIP lua fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Feb 21, 2025
1 parent 3656716 commit 326d115
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tests/lua/lua-base64/rule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ local input_base64_with_spaces = "d3 d3 Ln N1 cm lj YX Rh LW lk cy 5v cm c="

function init (args)
local needs = {}
needs["dns.rrname"] = tostring(true)
return needs
end

function match(args)
rrname = tostring(args["dns.rrname"])
rrname = DnsGetDnsRrname()

encoded = base64.encode(rrname)
if encoded ~= expected_base64 then
Expand Down
1 change: 1 addition & 0 deletions tests/lua/lua-base64/test.rules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
alert dns any any -> any any (msg:"TEST DNS LUA dns.rrname"; \
flow:to_server; \
dns.query.name; content: "www.suricata-ids.org"; \
lua:rule.lua; sid:1; rev:1;)

0 comments on commit 326d115

Please sign in to comment.