Nmap Development mailing list archives
Re: [NSE] ASN
From: jah <jah () zadkiel plus com>
Date: Sun, 07 Sep 2008 04:14:00 +0100
On 06/09/2008 06:09, David Fifield wrote:
One other thing. The DNS queries in ASN.nse don't work with the caching DNS server in my DSL modem. If I use a script arg and use the DNS server the modem is using it works fine. But without it there's a timeout of 40 seconds (4 times 10 seconds I guess) per host. Maybe the script could bail out if the first query times out, and mark that it has done so in the registry so other instances of the script don't waste their time?
Attached is an update which makes the following changes: When no dns servers could be found by dns.lua, or if no response was obtained from any dns server, then a debug message is printed, an entry is made in the registry to signal all threads and no further queries are attempted. Very interested to know if this is satisfactory for your fussy resolver David. Outputs "No Such Name" when this message is received. I'd decided not to show this message, but for now at least, it's helpful to know that we got an answer we can understand rather than wondering if the query failed. Results aren't duplicated and "See the result for " is output along with the IP address which is displaying the full record. This is also the case for when the full record is merely "No Such Name". When this message is encountered, a small range of addresses containing the target IP is cached in the registry as it is assumed that where there's one No Such Name there'll be others. The range is /29 for IPv4 and /48 for v6. Ensure that the Origin ASN is always sought first because we accept the first No Such Name and quit. Improvement to the output for full records where every BGP for the target has the same set of AS Numbers: Host script results: | AS Numbers: | BGP: 125.88.0.0/14 | Country: CN | Origin AS: 4134 - CHINANET-BACKBONE No.31,Jin-rong Street | Peer AS: 174 703 1239 1299 2828 2914 3320 3491 3549 3561 7132 11164 17888 | BGP: 125.88.0.0/13 | Country: CN | Origin AS: 4134 - CHINANET-BACKBONE No.31,Jin-rong Street | Peer AS: 174 703 1239 1299 2828 2914 3320 3356 3491 3549 7132 11164 17888 | BGP: 125.80.0.0/12 | Country: CN | Origin AS: 4134 - CHINANET-BACKBONE No.31,Jin-rong Street |_ Peer AS: 174 703 1239 1299 2828 2914 3320 3491 3549 3561 7132 11164 17888 Is combined: Host script results: | AS Numbers: | BGP: 125.88.0.0/14 and 125.88.0.0/13 and 125.80.0.0/12 | Country: CN | Origin AS: 4134 - CHINANET-BACKBONE No.31,Jin-rong Street |_ Peer AS: 174 703 1239 1299 2828 2914 3320 3491 3549 3561 7132 11164 17888 Much better! Regards, jah
Attachment:
ASN.nse.gz
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: [NSE] ASN made more robust and documented - much more to do., (continued)
- Re: [NSE] ASN made more robust and documented - much more to do. David Fifield (Sep 03)
- Re: [NSE] ASN made more robust and documented - much more to do. jah (Sep 03)
- Re: [NSE] ASN made more robust and documented - much more to do. Michael Pattrick (Sep 03)
- Re: [NSE] ASN made more robust and documented - much more to do. David Fifield (Sep 03)
- Re: [NSE] ASN made more robust and documented - much more to do. jah (Sep 03)
- Re: [NSE] ASN made more robust and documented - much more to do. Michael Pattrick (Sep 03)
- Re: [NSE] ASN jah (Sep 05)
- Re: [NSE] ASN David Fifield (Sep 05)
- Re: [NSE] ASN David Fifield (Sep 05)
- Re: [NSE] ASN jah (Sep 06)
- Re: [NSE] ASN jah (Sep 06)
- Re: [NSE] ASN David Fifield (Sep 16)
- Re: [NSE] ASN jah (Sep 06)
- Re: [NSE] ASN ipOps and whois jah (Sep 06)