summaryrefslogtreecommitdiffstats
path: root/src/dnsjit.1in
blob: 75124094b6877f305a30f522bb58629c8d097035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
.\" Copyright (c) 2018-2023, OARC, Inc.
.\" All rights reserved.
.\"
.\" This file is part of dnsjit.
.\"
.\" dnsjit is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" dnsjit is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with dnsjit.  If not, see <http://www.gnu.org/licenses/>.
.\"
.TH dnsjit 1 "@PACKAGE_VERSION@" "dnsjit"
.SH NAME
dnsjit \- DNS engine based around LuaJIT for capturing, parsing, replaying and statistics gathering
.SH SYNOPSIS
.SS Run a Lua script
.B dnsjit
.I file.lua
.I ...
.SS Shebang-style
  #!/usr/bin/env dnsjit
  ...
.SH DESCRIPTION
.B dnsjit
is a combination of parts taken from
.BR dsc ,
.BR dnscap ,
.BR drool,
and put together around Lua to create a script-based engine for easy
capturing, parsing and statistics gathering of DNS message while also
providing facilities for replaying DNS traffic.
.LP
One of the core functionality that
.B dnsjit
brings is to tie together C and Lua modules through a receiver/receive
interface.
This allows creation of custom chains of functionality to meet various
requirements.
Another core functionality is the ability to parse and process DNS messages
even if the messages are non-compliant with the DNS standards.
.LP
.B NOTE
current implementation is
.I ALPHA
which means functionality are not set and may be changed or removed.
.LP
.SH MODULE CATEGORIES
The following Lua module categories exists:
.TP
.B dnsjit.core
Core modules for handling things like logging, DNS messages and
receiver/receive functionality.
.TP
.B dnsjit.lib
Various Lua libraries or C library bindings.
.TP
.B dnsjit.input
Input modules used to read DNS messages in various ways.
.TP
.B dnsjit.filter
Filter modules to process or manipulate DNS messages.
.TP
.B dnsjit.output
Output modules used to display DNS message, export to various formats or
replay them against other targets.
.LP
See each category's man-page for more information.
.SH LUA GLOBALS
The following Lua global variables are defined:
.TP
.B DNSJIT_VERSION
A string with the full version.
.TP
.B DNSJIT_MAJOR_VERSION
An integer with the major version number.
.TP
.B DNSJIT_MINOR_VERSION
An integer with the minor version number.
.TP
.B DNSJIT_PATCH_VERSION
An integer with the patch version number.
.TP
.B DNSJIT_BUGREPORT
A string with the email address to file bug reports to.
.TP
.B DNSJIT_URL
A string with the URL to the repository issue tracker, preferred place to
file bug reports.
.SH EXAMPLE
Following example display the DNS ID found in queries.
.LP
  local input = require("dnsjit.input.pcapthread").new()
  local output = require("dnsjit.filter.lua").new()

  output:func(function(filter, object)
      local packet = object:cast()
      local dns = require("dnsjit.core.object.dns").new(packet)
      dns:parse()
      print(dns.id)
  end)

  input:open_offline("file.pcap")
  input:only_queries(true)
  input:receiver(output)
  input:run()
.LP
See more examples in the
.I examples
directory.
.SH SEE ALSO
.BR dnsjit.core (3),
.BR dnsjit.lib (3),
.BR dnsjit.input (3),
.BR dnsjit.filter (3),
.BR dnsjit.output (3)
.SH AUTHORS
Jerry Lundström, DNS-OARC
.LP
Maintained by DNS-OARC
.LP
.RS
.I https://www.dns-oarc.net/
.RE
.LP
.SH BUGS
For issues and feature requests please use:
.LP
.RS
\fI@PACKAGE_URL@\fP
.RE
.LP
For question and help please use:
.LP
.RS
\fI@PACKAGE_BUGREPORT@\fP
.RE
.LP