- dnsd
- dnssequence
- resolve
Simple, secure, smart DNS server/forwarder
dnsd DOES require root privileges.
Optional Arguments
Switch | Description | Default | Verifier |
-forward | "Forward DNS Queries" |
-zone | "Zone file" | () | (or (null? x) (and (string? x) (file-readable? x))) |
-predict | "Use DNS prediction" |
-port | "Port to listen on" | 53 | (<= 1 x 65535) |
-daemon | "Run in "daemon mode" (silently, in the background)" |
-nameservers | "Nameservers to use for forwarding" | () | (or (null? x) (true-for-all (lambda (i) (and (pair? i) (= (length i) 2) (string? (car i)) (integer? (cadr i)) (<= 1 (cadr i) 65535))) (read-from-string x))) |
-delay | "Artificial resolve delay (in seconds)" | 0 | (<= 0 x 60) |
-predict-window | "Prediction look-ahead window (seconds)" | 3 | (<= 0 x) |
Tree-based DNS Sequence Resolver
dnssequence DOES NOT require root privileges.
This program is designed to time how long it takes to issue a particular series of DNS queries. They can have multiple dependency orderings so that certain DNS requests can't be issued until the results have been received from previous ones. The way we model this sequence of dependencies is a tree.
We use a popular lisp recursive representation for a tree: A tree is either null or a list where the car is an element and the cdr is a list of sub-trees. Additionally, the root of our dependency tree is always the symbol seq.
The following is an ordered dependency sequence. A must be looked up before B which must be looked up before C:
(seq ("a.com" ("b.com" ("c.com"))))
The following is a sequence where all resolutions can be done in parallel (since none of them depend on each other):
(seq ("a.com") ("b.com") ("c.com"))
Required Arguments
Name | Description | Verifier |
tree | "Tree of DNS Names" | (let ((l (read-from-string x))) (and (pair? l) (eq? (car l) (quote seq)))) |
Optional Arguments
Switch | Description | Default | Verifier |
-nameservers | "Nameservers to use for forwarding" | () | (or (null? x) (true-for-all (lambda (i) (and (pair? i) (= (length i) 2) (string? (car i)) (integer? (cadr i)) (<= 1 (cadr i) 65535))) (read-from-string x))) |
-type | "DNS Query Type" | "A" | (defined? (symbolmash "DNS-TYPE-" x)) |
-graphviz | "Display tree for graphviz output" |
-timeonly | "Only display elapsed time (in seconds)" |
Parallel DNS Resolver
resolve DOES NOT require root privileges.
This is a nuff code interface to the nuff resolve function.
Supply the hosts in the extra arg (after the --) list unless you want -stdin. You can press enter during resolution to see the progress so far unless you specified -stdin.
Examples:
$ nuff resolve -- hcsw.org slashdot.org
$ nuff resolve -type PTR -- 1.2.3.4
$ printf 'a.com\nb.com\n' | nuff resolve -stdin
$ nuff resolve -type PTR -- `perl -e 'for($i=100; $i<150; $i++) { print "65.98.116.$i\n"; }'`
Optional Arguments
Switch | Description | Default | Verifier |
-stdin | "Read domain names from standard input instead of extra-args" |
-sexpr | "S-Expression output" |
-type | "DNS Query Type" | "A" | (defined? (symbolmash "DNS-TYPE-" x)) |
- doc
- eval
- describe
- graphviz
- help
Displays nuff documentation in various output styles
doc DOES NOT require root privileges.
The nuffdoc format is a simple S-expression based format that provides most of nuff's documentation.
The nuffdoc files are stored in NUFFDIR/docs/*.nuffdoc
It outputs in ASCII text format by default but can also do HTML.
Required Arguments
Name | Description | Verifier |
docname | "Document name" | (string? x) |
Optional Arguments
Switch | Description | Default | Verifier |
-style | "Desired output style" | "text" | (or (equal? x "text") (equal? x "html")) |
-file | "Treat document parameter as a filename, not a system nuffdoc" |
-cols | "Output columns (only for text mode)" | 80 | (and (integer? x) (<= 40 x)) |
Evaluate a scheme form
eval DOES require root privileges.
eval will (eval)uate the given form, (write) the result, then (quit).
form is evaluated without root privileges unless you specify the -priv option.
Required Arguments
Name | Description | Verifier |
form | "Form to execute" | (pair? (read-from-string x)) |
Optional Arguments
Switch | Description | Default | Verifier |
-priv | "Execute with root privileges (if available)" |
Describes various components of the nuff system
describe DOES NOT require root privileges.
describe provides a command-line interface to nuff's describe function.
At present you can ask describe for info on:
-
Layers
$ nuff describe ip4
-
Interfaces
$ nuff describe pcap
-
layer compilation forms
$ nuff describe '(ip4 -src "127.0.0.1" -data (udp -dp my-port))'
-
parsepaq compilation forms
$ nuff describe '(parsepaq mypaq some-data ((eth ip4) (format #t "Got IP4 packet from ~a~%" mypaq-ip4-src)))
Required Arguments
Name | Description | Verifier |
form | "Form/Symbol to describe" | (string? x) |
Visualise nuff's layers in dot format
graphviz DOES NOT require root privileges.
graphviz outputs nuff's layer transitions as a directed graph in the standard graphviz dot format.
Example use:
$ nuff graphviz | dot -Tpng > nuff-layers.png
Displays information on different nuff commands
help DOES NOT require root privileges.
help gives you a human-readable display of all the options provided by a nuff command.
It uses the information in the module information at the top of the specified nuff command to construct the information. Since this is also a part of the code nuff uses, it is guaranteed to be up-to-date and accurate (except for bugs).
Required Arguments
Name | Description | Verifier |
command | "Command to get help with" | (string? x) |