kirei / fpdns Goto Github PK
View Code? Open in Web Editor NEWNet::DNS::Fingerprint
License: Other
Net::DNS::Fingerprint
License: Other
Could you please create a tag/release so package systems can fetch a tarball?
Few examples:
194.116.240.111 (PowerDNS)
version.bind. 5 CH TXT "Served by PowerDNS - http://www.powerdns.com"
fingerprint (194.116.240.111, 194.116.240.111): Unlogic Eagle DNS 1.0 -- 1.0.1 [New Rules]
178.248.241.21 (PowerDNS)
version.bind. 5 CH TXT "Served by POWERDNS 3.1 $Id: packethandler.cc 2579 2012-04-26 11:28:04Z peter $"
fingerprint (178.248.241.21, 178.248.241.21): Unlogic Eagle DNS 1.0 -- 1.0.1 [New Rules]
81.19.145.5 (unknown, but I would guess PowerDNS as well)
version.bind. 5 CH TXT "World4You.com Domainnameserver"
fingerprint (81.19.145.5, 81.19.145.5): Unlogic Eagle DNS 1.0 -- 1.0.1 [New Rules]
zephyr ~ # fpdns -Df isc.org
fingerprint (isc.org, 199.6.1.30): No match found
fingerprint (isc.org, 2001:500:60:0:0:0:0:30): No match found
Can't call method "zclass" on an undefined value at /usr/lib64/perl5/vendor_perl/5.16.3/x86_64-linux/Net/DNS/Packet.pm line 472.
zephyr ~ # qlist -Iv =dev-perl/Net-DNS
dev-perl/Net-DNS-0.740.0
zephyr ~ # qlist -Iv =net-dns/fpdns
net-dns/fpdns-0.10.0_pre20130404
zephyr ~ #
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
perl --version
This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-gnu-thread-multi
(with 56 registered patches, see perl -V for more detail)
apps/fpdns -D foobar.com
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
% fpdns nn.uninett.no
fingerprint (nn.uninett.no, 158.38.0.181): Meilof Veeningen Posadis [Old Rules]
fingerprint (nn.uninett.no, 2001:700:0:503:0:0:aa:5302): Meilof Veeningen Posadis [Old Rules]
% dig version.bind ch txt +short @nn.uninett.no
"9.10.5-P3"
%
This is with fpdns "current", out of github.
I have the debug log from fpdns -d
, but since nn.uninett.no
is openly accessible it is easy to reproduce.
It also manages to not be able to identify Microsoft's DNS server on Windows 2012R2; it just says no match found
. An example of such an installation is ns01.uis.no
.
unknown opcode NS_NOTIFY_OP at /usr/pkg/lib/perl5/vendor_perl/5.16.0/x86_64-netbsd-thread-multi/Net/DNS/Parameters.pm line 248.
It looks like NS_NOTIFY_OP should simply be NOTIFY, which is easy to fix.
Net:DNS 0.66 is working OK.
Net:DNS 0.68 is working OK.
the latest release is from 2019, but the latest commits are from 2020 :-)
It looks like fpdns is incompatible with Net::DNS 0.69.
First off, you get "read-only" warnings from these four lines in fp2header:
$header->qdcount(shift @list);
$header->ancount(shift @list);
$header->nscount(shift @list);
$header->arcount(shift @list);
Secondly, you get a stack backtrace seemengly because NS_NOTIFY_OP is
unknown:
unknown opcode NS_NOTIFY_OP at /usr/pkg/lib/perl5/vendor_perl/5.16.0/x86_64-netbsd-thread-multi/Net/DNS/Parameters.pm line 248.
Net::DNS::Parameters::opcodebyname('NS_NOTIFY_OP') called at /usr/pkg/lib/perl5/vendor_perl/5.16.0/x86_64-netbsd-thread-multi/Net/DNS/Header.pm line 187
Net::DNS::Header::opcode('Net::DNS::Header=HASH(0x7f7ff57a3c30)', 'NS_NOTIFY_OP') called at /usr/pkg/lib/perl5/vendor_perl/5.16.0/Net/DNS/Fingerprint.pm line 2166
Net::DNS::Fingerprint::fp2header('0,NS_NOTIFY_OP,0,0,0,0,0,0,NOERROR,0,0,0,0', 'Net::DNS::Header=HASH(0x7f7ff57a3c30)') called at /usr/pkg/lib/perl5/vendor_perl/5.16.0/Net/DNS/Fingerprint.pm line 2189
Net::DNS::Fingerprint::probe('Net::DNS::Fingerprint=HASH(0x7f7ff77072e8)', 158.38.0.181, 53, '0,NS_NOTIFY_OP,0,0,0,0,0,0,NOERROR,0,0,0,0', '. IN A') called at /usr/pkg/lib/perl5/vendor_perl/5.16.0/Net/DNS/Fingerprint.pm line 2070
...
It looks like NS_NOTIFY_OP should simply be NOTIFY, which is easy to fix.
The former problem with the 4 header fields not being settable is more tricky, and may require a tweak to Net::DNS. Looking at the change log for Net::DNS between 0.69 and the current 0.72 doesn't show something has been done to lift this restriction.
So... what to do?
Please make a new release. The latest release is from 2013-04-04 and there have been several important commits since then. Thanks!
When running fpdns 8.8.8.8
I get:
`Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 986.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 987.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/Net/DNS/Resolver/Base.pm line 988.
fingerprint (8.8.8.8, 8.8.8.8): No match found`
I get a similar result when running it on our internal DNS servers.
fpdns is not compatible with libnet-dns-perl 0.68
here is the back trace:
Net::DNS::Header::data: no such method at /usr/share/perl5/Net/DNS/Fingerprint.pm line 669
at /usr/lib/perl5/Net/DNS/Header.pm line 222
Net::DNS::Header::AUTOLOAD('Net::DNS::Header=HASH(0x28ff5a8)') called at /usr/share/perl5/Net/DNS/Fingerprint.pm line 669
Net::DNS::Fingerprint::probe('Net::DNS::Fingerprint=HASH(0x28ff140)', 98.138.253.109, 53, '0,IQUERY,0,0,1,0,0,0,NOERROR,0,0,0,0', '. IN A') called at /usr/share/perl5/Net/DNS/Fingerprint.pm line 539
Net::DNS::Fingerprint::process('Net::DNS::Fingerprint=HASH(0x28ff140)', 98.138.253.109, 53, '0,IQUERY,0,0,1,0,0,0,NOERROR,0,0,0,0', '. IN A', 'ARRAY(0x27385e0)') called at /usr/share/perl5/Net/DNS/Fingerprint.pm line 517
Net::DNS::Fingerprint::init('Net::DNS::Fingerprint=HASH(0x28ff140)', 98.138.253.109, 53) called at /usr/share/perl5/Net/DNS/Fingerprint.pm line 443
Net::DNS::Fingerprint::hash('Net::DNS::Fingerprint=HASH(0x28ff140)', 98.138.253.109, 53) called at /usr/share/perl5/Net/DNS/Fingerprint.pm line 455
Net::DNS::Fingerprint::string('Net::DNS::Fingerprint=HASH(0x28ff140)', 98.138.253.109, 53) called at fpdns line 116
main::fingerprint('Net::DNS::Fingerprint=HASH(0x28ff140)', 'yahoo.com') called at fpdns line 106
main::main called at fpdns line 195
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.