Merging upstream version 1.2.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
9ce9cc1418
commit
cc381791fc
340 changed files with 71346 additions and 6734 deletions
|
@ -1,18 +1,30 @@
|
|||
#!/usr/bin/env dnsjit
|
||||
local pcap = arg[2]
|
||||
local compression = arg[3]
|
||||
|
||||
if pcap == nil then
|
||||
print("usage: "..arg[1].." <pcap>")
|
||||
print("usage: "..arg[1].." <pcap> [compression]")
|
||||
return
|
||||
end
|
||||
|
||||
local object = require("dnsjit.core.objects")
|
||||
local input = require("dnsjit.input.pcap").new()
|
||||
local zinput = require("dnsjit.input.zpcap").new()
|
||||
local layer = require("dnsjit.filter.layer").new()
|
||||
local dns = require("dnsjit.core.object.dns").new()
|
||||
|
||||
input:open_offline(pcap)
|
||||
layer:producer(input)
|
||||
if string.lower(string.sub(pcap, -4)) == ".zst" or compression == "zstd" then
|
||||
zinput:zstd()
|
||||
zinput:open(pcap)
|
||||
layer:producer(zinput)
|
||||
elseif string.lower(string.sub(pcap, -4)) == ".lz4" or compression == "lz4" then
|
||||
zinput:lz4()
|
||||
zinput:open(pcap)
|
||||
layer:producer(zinput)
|
||||
else
|
||||
input:open_offline(pcap)
|
||||
layer:producer(input)
|
||||
end
|
||||
local producer, ctx = layer:produce()
|
||||
|
||||
while true do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue