Results 1 to 6 of 6

Thread: NSlookup

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2011
    Posts
    3

    Question NSlookup

    Hi,
    I'm looking for how to run nslookup in Visual Basic, can anyone give me some advice?
    thanks

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: NSlookup

    Do you really want to run nslookup?

    Or are you asking how to resolve a DNS name to an IP address? Reverse-lookup an IP address to a DNS name?

    Something else?

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2011
    Posts
    3

    Re: NSlookup

    I'm actually looking for something to see, in the RECEIVED FROM: email header, if domain and IP address match, so to control spam. Thanks for your interest

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: NSlookup

    I have attached a simple example showing how a program can reverse-lookup an IP address and get it corresponding DNS name.

    If you do this with the IP address you can compare the result against the DNS Name in the mail header. This can get a little "iffy" though. A host can have many names.
    Attached Files Attached Files

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2011
    Posts
    3

    Re: NSlookup

    thanks for the tip, very useful!
    but now, if I want to do the opposite, to obtain the IP address of a Domain? you have some other examples? thanks again

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: NSlookup

    Forward lookups are trivial. You can do this using the Winsock control, or if you examine the code provided above you will see that it can be done using a subset of the logic in the reverse lookup function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width