зеркало из https://github.com/mozilla/mig.git
97 строки
6.0 KiB
HTML
97 строки
6.0 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<link href="docstyle.css" rel="stylesheet" />
|
||
<title>Mozilla InvestiGator: Ping module</title>
|
||
<meta content="Sushant Dinesh <sushant.dinesh94@gmail.com>" name="author" />
|
||
</head>
|
||
<body>
|
||
<h1>Mozilla InvestiGator: Ping module</h1>
|
||
<aside class="topic contents" id="table-of-contents">
|
||
<h1>Table of Contents</h1>
|
||
<ul class="auto-toc">
|
||
<li>
|
||
<p><a href="#usage">1 Usage</a></p>
|
||
<ul class="auto-toc">
|
||
<li><a href="#parameters">1.1 Parameters</a></li>
|
||
<li><a href="#note-on-scans">1.2 Note on scans</a></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><a href="#examples">2 Examples</a></p>
|
||
<ul class="auto-toc">
|
||
<li><a href="#basic-icmp-ping">2.1 Basic ICMP ping</a></li>
|
||
<li><a href="#single-tcp-ping-of-twitter-com-443">2.2 Single TCP ping of twitter.com:443</a></li>
|
||
<li><a href="#udp-ping-of-google-s-dns">2.3 UDP Ping of Google's DNS</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</aside>
|
||
<p>The ping module (PM) allows a user to check connection of an endpoint to another host. PM supports ICMP, TCP and UDP pings to a remote host. The response returned by the ping module is similar to ping utility in UNIX systems.</p>
|
||
<section id="usage">
|
||
<h2>1 Usage</h2>
|
||
<p>PM supports ICMP, TCP and UDP pings. PM requires that destination is a valid ipv4, ipv6 address or a Fully Qualified Domain name (FQDN).</p>
|
||
<pre><code class="json"><span class="p">{</span>
|
||
<span class="nt">"count"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
|
||
<span class="nt">"destination"</span><span class="p">:</span> <span class="s2">"www.google.com"</span><span class="p">,</span>
|
||
<span class="nt">"destinationport"</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span>
|
||
<span class="nt">"protocol"</span><span class="p">:</span> <span class="s2">"tcp"</span><span class="p">,</span>
|
||
<span class="nt">"timeout"</span><span class="p">:</span> <span class="mi">5</span>
|
||
<span class="p">}</span></code></pre>
|
||
<section id="parameters">
|
||
<h3>1.1 Parameters</h3>
|
||
<ul>
|
||
<li><strong>protocol:</strong> Specifies the protocol to be used for the ping test. Valid protocols are icmp, tcp and udp.</li>
|
||
<li><strong>destination</strong>: ipv4, ipv6 address or FQDN of the destination host to be checked.</li>
|
||
<li><strong>destinationport</strong>: port number on the destination host to be checked for connectivity. this option is to be left blank when protocol is icmp. For tcp and udp, the destination port defaults to 80 when not specified.</li>
|
||
<li><strong>count</strong>: Number of times the destination has to be pinged. optional. defaults to 3.</li>
|
||
<li><strong>timeout</strong>: Seconds to wait for response before timing out. optional. defaults to 5s.</li>
|
||
</ul>
|
||
</section>
|
||
<section id="note-on-scans">
|
||
<h3>1.2 Note on scans</h3>
|
||
<ul>
|
||
<li>Selecting protocol as TCP performs a TCP Connect scan. This means that a full connection is established (and broken down) when a tcp ping is performed. This might leave records in the destination systems logs.</li>
|
||
<li>A timeout on udp ping indicates that the port checked for <strong>maybe</strong> open. Hence the module returns reachable as true (and latency as timeout). However, if the port is closed, the module returns "Connection Refused" indicating that the port is closed.</li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
<section id="examples">
|
||
<h2>2 Examples</h2>
|
||
<section id="basic-icmp-ping">
|
||
<h3>2.1 Basic ICMP ping</h3>
|
||
<pre><code class="">$ mig ping -t "name='somehost.example.net'" -show all -d 8.8.8.8
|
||
somehost.example.net icmp ping of 8.8.8.8 (8.8.8.8) succeeded. Target is reachable.
|
||
somehost.example.net ping #1 succeeded in 36ms
|
||
somehost.example.net ping #2 succeeded in 21ms
|
||
somehost.example.net ping #3 succeeded in 31ms
|
||
somehost.example.net command success</code></pre>
|
||
</section>
|
||
<section id="single-tcp-ping-of-twitter-com-443">
|
||
<h3>2.2 Single TCP ping of twitter.com:443</h3>
|
||
<pre><code class="">$ mig ping -t "name='somehost.example.net'" -show all -d twitter.com -dp 443 -p tcp -c 1 -t 5
|
||
somehost.example.net tcp ping of twitter.com:443 (199.16.156.102) succeeded. Target is reachable.
|
||
somehost.example.net ping #1 succeeded in 27ms
|
||
somehost.example.net command success</code></pre>
|
||
</section>
|
||
<section id="udp-ping-of-google-s-dns">
|
||
<h3>2.3 UDP Ping of Google's DNS</h3>
|
||
<p>UDP ping is less deterministic because no response is returned from the target if the ping succeeded. A lack of response is considered a success, and no latency is returned.</p>
|
||
<pre><code class="">$ mig ping -t "name='somehost.example.net'" -show all -d 8.8.8.8 -dp 53 -p udp -c 10 -t 5
|
||
somehost.example.net udp ping of 8.8.8.8:53 (8.8.8.8) succeeded. Target is reachable.
|
||
somehost.example.net ping #1 may have succeeded (no udp response)
|
||
somehost.example.net ping #2 may have succeeded (no udp response)
|
||
somehost.example.net ping #3 may have succeeded (no udp response)
|
||
somehost.example.net ping #4 may have succeeded (no udp response)
|
||
somehost.example.net ping #5 may have succeeded (no udp response)
|
||
somehost.example.net ping #6 may have succeeded (no udp response)
|
||
somehost.example.net ping #7 may have succeeded (no udp response)
|
||
somehost.example.net ping #8 may have succeeded (no udp response)
|
||
somehost.example.net ping #9 may have succeeded (no udp response)
|
||
somehost.example.net ping #10 may have succeeded (no udp response)
|
||
somehost.example.net command success</code></pre>
|
||
</section>
|
||
</section>
|
||
</body>
|
||
</html> |