Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - notbugme

#1
newLISP in the real world /
August 09, 2005, 01:11:57 PM
Quote from: "Lutz"Good suggestion, I implemented an optional 'true' flag which will force hostbyname() even if starting with a number digit:



newLISP v.8.6.2 on OSX UTF-8, execute 'newlisp -h' for more info.

> (net-lookup "216.16.84.66.sbl-xbl.spamhaus.org" true)
"127.0.0.2"
>


This will show up in 8.6.2



Lutz



ps: and a welcome to 'notbugme'

Great!
#2
newLISP in the real world /
August 09, 2005, 08:40:19 AM
Quote from: "Dmi"probably, the safe way will be to write something like:
(define (great-net-lookup s)
  (let (l nil)
    (net-lookup
      (if (set 'l (match '(? ? ? ? "in-addr" "arpa") (parse s ".")))
        (join (reverse l) "."))
        s)))

That is a smart way to handle "*.*.*.*.in-addr.arpa" but it does not work for doing a DNS BL query -- eg "216.16.84.66.sbl-xbl.spamhaus.org".
#3
newLISP in the real world /
August 09, 2005, 08:31:18 AM
Quote from: "newdep"Welcome ;-)
Thanks.


Quote from: "newdep"net-lookup does this ->

Returns a hostname string from str-ip-number in IP dot format or returns the IP number in dot format from str-hostname.

That was what I meant by net-lookup getting confused. I believe that in order for it to determine which way it acts anytime it is called it examines the argument and wrongly calls the http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/gethostbyaddr_2.asp">gethostbyaddr instead of http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/gethostbyname_2.asp">gethostbyname when called with  "10.41.232.199.in-addr.arpa".
#4
newLISP in the real world /
August 09, 2005, 07:53:16 AM
Quote from: "pjot"This is not a bug since it is no feature of newLisp anyway.



Nor standard network commands can handle this format:
Quote
c:Scripts>ping 10.41.232.199.relays.ordb.org

Unknown host 10.41.232.199.relays.ordb.org.


ORDB does not list that address as an open relay. Try 216.16.84.66.sbl-xbl.spamhaus.org:
C:>ping 216.16.84.66.sbl-xbl.spamhaus.org

Pinging 216.16.84.66.sbl-xbl.spamhaus.org [127.0.0.2] with 32 bytes of data:

Reply from 127.0.0.2: bytes=32 time<10ms TTL=128
Reply from 127.0.0.2: bytes=32 time<10ms TTL=128
Reply from 127.0.0.2: bytes=32 time<10ms TTL=128
#5
newLISP in the real world / bug in net-lookup
August 09, 2005, 04:08:43 AM
The following code suggests that net-lookup is not capable of handling queries such as 10.41.232.199.in-addr.arpa. It appears newLISP gets confused by the query starting with an IP address. This feature is important to me because I would like to be able to check for an IP's address in a DNS BL -- ie check whether 10.41.232.199.relays.ordb.org returns 127.0.0.2 to indicate the address is listed as an open relay.


newLISP v.8.6.0 on Win32 MinGW, execute 'newlisp -h' for more info.

> (net-lookup "gnu.org")                    ;; right
"199.232.41.10"
> (net-lookup "199.232.41.10")              ;; right
"gnu.org"
> (net-lookup "10.41.232.199.in-addr.arpa") ;; wrong
nil
> (net-lookup "10.41.232.199")              ;; right
nil
> (exit)