Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | RE: libnetng : name resolution |
|---|---|
| Date: | Sat, 14 Aug 2004 14:01:48 -0500 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 WIN32 code ported without too much trouble. (See changes in attached) NOTE: I have used the getopt.c and getopt.h included with the current win32 libnet code. - - Kirby C:\cvs\gai\Debug>gai -i 10.25.80.155 ascii -> addr: name=10.25.80.155 addr=10 25 80 4294967195 C:\cvs\gai\Debug>gai -i 10.25.80.155 -n ascii -> addr: name=10.25.80.155 addr=10 25 80 4294967195 C:\cvs\gai\Debug>gai -i www.google.com ascii -> addr: name=www.google.com addr=66 102 7 4294967187 C:\cvs\gai\Debug>gai -i www.google.com -c ascii -> addr: name=www.google.com addr=66 102 7 4294967187 (FQDN ok) C:\cvs\gai\Debug>gai -i www.google.com -n libnet_resolve_ascii2addr(): unable to resolve (err=11001: No such host is known . ) - -----Original Message----- From: Frédéric Raynal [mailto:ipappy-ml@security-labs.org] Sent: Saturday, August 14, 2004 12:47 PM To: libnet@securityfocus.com Cc: mike schiffman; Kirby Kuehl Subject: libnetng : name resolution Hi, Attached is a file containing the new API for name resolution. As we talked earlier with Mike nd Kirby, it is now based on getaddrinfo() and getnameinfo() because they are supposed to be protocol independant. So, the functions provided here work with both IPv4 and IPv6 ... in theory ;-) Moreover, I have included the structure of addresses defined by Dug Song in libdnet (once again, thanks to you for that nice libray) That way, compatibility between the libraries will help in futur developments. Important ========= Performing some tests on Linux (2.6) and Mac OS X (10.3), I noticed different behavior ... which is quite annoying. I cant say right now if it comes from a stupid bug I made, or if is a "normal bug". Hence, I _really_ need you to make tests on your system Linux Mac OS X 2.6 10.3 ./gai -i 1.2.3.4 ok ok ./gai -i 1.2.3.4 -n ok ok ./gai -i 1.2.3.4 -c ok 0:1 ok 0:1 ./gai -i 217.12.3.11 -c ok 0:1 ok 0:1 ./gai -i google.fr -n [1] ok 1:0 ./gai -i google.fr ok 1:0 ok 1:0 ./gai -i google.fr -c ok 1:X ok 1:0 ./gai -i yahoo.fr -c [2] 1:1 [3] 1:0 ./gai -4 1.2.3.4 ok 0:1 [4] ./gai -4 1.2.3.4 -c [6] 0:1 [4] ./gai -4 1.2.3.4 -n ok [4] [1] unable to resolve (err=-2: Name or service not known) [2] ascii - -> addr: name=yahoo.fr addr=217 12 3 11 (FQDN ok) [3] ascii -> addr: name=yahoo.fr addr=217 12 3 11 [4] libnet_resolve_addr2ascii(): getnameinfo() failed (Unknown error: 0) X:Y means X DNS request of type A, and Y of type PTR. When nothing is speicied, it means there is no DNS request. On Mac OS X, take care there is a DNS cache so there can be no DNS request if the request is already cached. Questions ========= - - these functions need to be tested everywhere they can (Solaris, Win, and so on). - - why getnameinfo() fails on my iBook ? - - can someone test that with IPv6 - - these functions are probably not available on all systems. OpenSSH made their own portable one (in openbsd/fake-rfc2553.c) Is there a volunteer to do that ? I promise to offer him a beer. Thanks for your help Fred PS: I'll release an alpha version (ie not all builders and features from 1.1 API will be available) probably tomorow or monday. -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQR5hm/JlWu/m+KZxEQLbAACeMeJ7J5p9OncPTdZrKyetKN4H+scAoK77 oLM3Z4RV6a11+HTh9FEWdHXz =jA+q -----END PGP SIGNATURE-----
gai.c
Description: Text document
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | libnetng : name resolution, Frédéric Raynal |
|---|---|
| Next by Date: | libnetng : devel release, pappy-ml |
| Previous by Thread: | libnetng : name resolution, Frédéric Raynal |
| Next by Thread: | Re: libnetng : name resolution, David Barroso |
| Indexes: | [Date] [Thread] [Top] [All Lists] |