<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Bella,<br>
    conoscete mica un comando che mi dà il nome di un NAS partendo dal
    suo IP?<br>
    <br>
    Googlando un po' sono giunto a "dig" e il risultato è ad es. questo:<br>
    <blockquote><big><tt>$ dig -x 10.176.0.5</tt><tt><br>
        </tt><tt><br>
        </tt><tt>; <<>> DiG 9.8.1-P1 <<>> -x
          10.176.0.5</tt><tt><br>
        </tt><tt>;; global options: +cmd</tt><tt><br>
        </tt><tt>;; Got answer:</tt><tt><br>
        </tt><tt>;; ->>HEADER<<- opcode: QUERY, status:
          NXDOMAIN, id: 48389</tt><tt><br>
        </tt><tt>;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY:
          1, ADDITIONAL: 0</tt><tt><br>
        </tt><tt><br>
        </tt><tt>;; QUESTION SECTION:</tt><tt><br>
        </tt><tt>;5.0.176.10.in-addr.arpa.    IN    PTR</tt><tt><br>
        </tt><tt><br>
        </tt><tt>;; AUTHORITY SECTION:</tt><tt><br>
        </tt><tt>10.in-addr.arpa.    3600    IN    SOA    <b>attila.nir.nnx</b>.
          terribilywrong.gmail.com. 20131026 7200 14400 14400 14400</tt><tt><br>
        </tt><tt><br>
        </tt><tt>;; Query time: 25 msec</tt><tt><br>
        </tt><tt>;; SERVER: 10.11.12.13#53(10.11.12.13)</tt><tt><br>
        </tt><tt>;; WHEN: Fri Nov 29 18:36:17 2013</tt><tt><br>
        </tt><tt>;; MSG SIZE  rcvd: 115</tt></big><tt><br>
      </tt></blockquote>
    <br>
    <br>
    PS: ho inserito questa funzione in un ciclo e l'ho parsata con
    questa regex "<font color="#cc33cc"><tt><big>/.*\t(.*?)\..*\.nnx/i</big></tt></font>",
    il risultato è che mi fa vedere il nome DNS. Il problema è che ci
    sono un sacco di "attila".<br>
    @Dario c'è un motivo se si chiamano quasi tutti così? Ha un valore
    quell'attila oppure posso dirgli "attila = <i>null</i>"?<br>
    <br>
    - Gubi<br>
  </body>
</html>