Kevin Deldycke - lsofhttps://kevin.deldycke.com/2011-04-11T16:25:54+02:00Network Commands2011-04-11T16:25:54+02:002011-04-11T16:25:54+02:00Kevin Deldycketag:kevin.deldycke.com,2011-04-11:/2011/04/network-commands/<ul> <li> <p>Get the list of all wireless networks reachable by the <code>wlan0</code> interface:</p> <div class="highlight"><pre><span></span>$ iwlist wlan0 scanning <span class="p">|</span> grep ESSID </pre></div> </li> <li> <p>Get the <span class="caps">IP</span> address where a domain points&nbsp;to:</p> <div class="highlight"><pre><span></span>$ host kevin.deldycke.com </pre></div> </li> <li> <p>Get different kind of <span class="caps">DNS</span> records of the <code>example.com</code> domain:</p> <div class="highlight"><pre><span></span>$ dig example.com CNAME $ dig example.com MX </pre></div> </li> <li> <p>Get …</p></li></ul><ul> <li> <p>Get the list of all wireless networks reachable by the <code>wlan0</code> interface:</p> <div class="highlight"><pre><span></span>$ iwlist wlan0 scanning <span class="p">|</span> grep ESSID </pre></div> </li> <li> <p>Get the <span class="caps">IP</span> address where a domain points&nbsp;to:</p> <div class="highlight"><pre><span></span>$ host kevin.deldycke.com </pre></div> </li> <li> <p>Get different kind of <span class="caps">DNS</span> records of the <code>example.com</code> domain:</p> <div class="highlight"><pre><span></span>$ dig example.com CNAME $ dig example.com MX </pre></div> </li> <li> <p>Get some informations about open&nbsp;ports:</p> <div class="highlight"><pre><span></span>$ netstat --taupen $ netstat --lapute </pre></div> </li> <li> <p>Watch network activity in&nbsp;real-time:</p> <div class="highlight"><pre><span></span>$ watch -n <span class="m">1</span> <span class="s2">&quot;lsof -i&quot;</span> </pre></div> </li> <li> <p>Save all images passing through <code>eth0</code>:</p> <div class="highlight"><pre><span></span>$ driftnet -i eth0 -a -d ./http-pics </pre></div> </li> </ul>