Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I'm writting a little program to get DNS information.

I'm trying to get HINFO values via  :

use Net::DNS;
use Net::DNS::RR;

my $host = "";
my $res   = Net::DNS::Resolver->new;

$query = $res->query($host, "NS");
   if ($query) {
       foreach $rr (grep { $_->type eq 'NS' } $query->answer) {
           print "nameserver: ";
           print $rr->nsdname, "\n";
           my $val = $rr->nsdname;
           my $txt   = Net::DNS::RR->new("$var 3600 HS TXT 'text record'");
           print $txt->print, "\n";
   else {
       warn "query failed: ", $res->errorstring, "\n";

but I didn't get relevant datas with the code :

           my $txt   = Net::DNS::RR->new("$var 3600 HS INFO 'text record'");
           print $txt->print, "\n";

Any idea ?


Alexandre Jaquet a écrit :
Quoted text here. Click to load it

I correct the query with :
           my $info   = Net::DNS::RR->new("$var 3600 IN HSINFO '' ''");
           print $info->print, "\n";

according to the doc :   but
still don't get relevant informations

maybe this is because the record is not used


Quoted text here. Click to load it
Quoted text here. Click to load it

Possible.  Likely, even--same thing will happen if you try an NXDOMAIN A
record, but even more likely since widespread HINFO use fell out of favour
around 1991 or so.  As with so many things (finger comes to mind), what was
once a useful tool is now considered a security risk.

Vorxion - Founder of the knocking-shop of the mind.

"You have it, you sell it, you've still got it--what's the difference?"
--Diana Trent, "Waiting for God", on why a modelling agency is really a
knocking-shop.  Applied by me to the field of consulting.  :)

The Sci-Fi fan's solution to debt:  Reverse the polarity on your charge card.

Site Timeline