~samiam/MaraDNS

ref: 3.5.0021 MaraDNS/maradns-win32/Askmara.html -rw-r--r-- 4.5 KiB
ca00f282 — Sam Trenholme MaraDNS release 3.5.0021 4 months ago
                                                                                
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
145
146
147
148
<!-- Do *not* edit this file; it was automatically generated by ej2html
     Look for a name.ej file with the same name as this filename -->
<!-- Last updated Tue Dec  6 10:54:40 2005 -->

<HTML><HEAD>



<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
</HEAD><BODY >

<H1>NAME</H1>
askmara - do simple dns queries
<H1>DESCRIPTION</H1>

<b>askmara</b> queries the user-specified dns server for records, and
outputs the reply in a csv2-compatible format (csv2 is the format of zone
files that <b>maradns</b> uses).

<H1>USAGE</H1>
<b>askmara</b> [-n] [ -v | -t timeout] query [ server ]

<H1>OPTIONS</H1>

<dl>
<dt>-t
<dd>
If this is present, the following argument is the askmara timeout, in
seconds.  Note that <b>askmara</b> can not both have a user-defined
timeout and verbose output.
<dt>-v
<dd>
If this is set, <b>askmara</b>
will verbosely output the complete reply that the server sent.  Note
that this verbose output is not csv2-compatible.
<dt>-n
<dd>
If this is set, <b>askmara</b>, when sending out a query, will not
request DNS recursion; in other words, askmara will request that the
remote DNS server not contact other DNS server to answer the query in
question.
<dt>query
<dd>
dns record to be queried.  The query has two sections:
The type of record we desire, and the hostname we want this record for.

<p>

The type of query can have two forms: A one-letter mnemonic, or a
numeric rtype followed by a colon.  This is immediately concatenated by
the full name of the host name we wish to look up.  

<p>

For example, to ask for the IP of 'example.com.', we can use the one-letter
mnemonic, in the form 'Aexample.com.', or we can use the numeric RR followed
by a colon, giving the query '1:example.com.' (since A has the record type
of one).  Note that the query name needs the trailing dot at the end.

<p>
Askmara supports a handful one-letter mnemonics, as follows:
<P>
<b>A</b> signifies a request for an A (ipv4 address) RR <p>
<b>N</b> signifies a NS RR <p>
<b>C</b> signifies that we are asking for a CNAME RR <p>
<b>S</b> signifies that we want a SOA RR <p>
<b>P</b> signifies that we want a PTR RR <p>
<b>@</b> signifies that we mant a MX RR <p>
<b>T</b> signifies that we want a TXT RR <p>
<b>Z</b> signifies that we want to ask for all RRs.
<dt>server
<dd>IP address of the dns server to be queried. If no server is given,
askmara will query 127.0.0.1.
</dl>

<h1>EXAMPLES</h1>

Asking the server with the ip 127.0.0.1 for the IP address of example.com:

<pre>
askmara Aexample.com.
</pre>

Asking the server with the ip 198.41.0.4 for the IP address of example.com:

<pre>
askmara Aexample.com. 198.41.0.4
</pre>

Asking the server with the ip address 127.0.0.1 for the IP address of
example.com, using the rr_number:query format:

<pre>
askmara 1:example.com. 
</pre>

Asking the server with the ip address 127.0.0.1 for a SRV record.  In
particular, we ask for the "http over tcp" service for example.net.
Since askmara doesn't have a mnemonic for SRV record types, we
use the numeric code (33 for SRV):

<pre>
askmara 33:_http._tcp.example.net.
</pre>

Asking the server with the ip address 127.0.0.1 for the AAAA (ipv6 ip)
record for example.net:

<pre>
askmara 28:example.net. 
</pre>

Note that the output will be a raw DNS packet in both the SRV 
and AAAA examples.

<h1>BUGS</h1>

When askmara is asked for an SOA record, the output of <b>askmara</b>
closely resembles the format of a csv2 file, but can not be parsed as a
csv2 file without modification.

<p>

askmara outputs multi-chunk ("character-string") TXT
records incorrectly (it only outputs the first chunk).

<h1>SEE ALSO</h1>
<b>maradns(8)</b>
<br>
<A href=http://www.maradns.org>http://www.maradns.org</A>

<h1>LEGAL DISCLAIMER</h1>
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS 
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE 
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

<h1>AUTHOR</h1>
MaraDNS is written by Sam Trenholme. Jaakko Niemi used 5 minutes
to roll this manpage together, which Sam has subsequently revised.
</BODY></HTML>