Important alert: (current site time 5/19/2013 12:49:13 AM EDT)
 

winzip icon

IPWhois - IPv6

Email
Submitted on: 6/25/2012 12:18:04 PM
By: J.A. Coutts 
Level: Advanced
User Rating: By 1 Users
Compatibility: VB 6.0
Views: 2518
 
     IPWhois is a utility program that can be used to query Whois servers to find out where and to whom an IP address is assigned. Now why would you want to do that? There are some instances when all you have to go on is the IP address. For example, you live in North America and you receive an email from your financial institution requesting some action. Is this a phishing attempt, or is the email genuine? Virtually the only thing that cannot be spoofed on an email is the originating IP address. To determine if the email is legitimate, you can find the originating IP address in the header and do a Whois lookup on it. Even the freebie email providers like Yahoo, Hotmail, And Gmail now list the originating IP address on outbound mail. If the originating IP is assigned to Europe, Asia, or South America, you can be pretty certain that the email is not genuine. There are many online utilities available that will perform this function (and more), but IPWhois accesses the primary Whois servers directly through TCP port 43. The default is the ARIN server, which offers a Referral Service. IPWhois has an option that allows it to follow that referral to the other primary servers, or even to a private Whois server. At the moment, ARIN does not offer a referral to whois.afrinic.net. The current version of IPWhois supports both IPv4 and IPv6 transport. You do not need to use IPv6 transport to query an IPv6 address. You can query it over IPv4. But because IPWhois uses system calls that are IP version independent, it will not run or compile on Windows operating systems that do not support dual stack. This pretty much restricts it to Windows Vista or better.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 13 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

6/26/2012 12:45:21 PMBonnie West

Excellent code!

However...

Private Sub FreeMemory()
'Free memory allocated by AllocateMemory
If m_lngMemoryHandle <> 0 Then
m_lngMemoryHandle = 0
m_lngMemoryPointer = 0
GlobalFree m_lngMemoryHandle '<-- should this be last?
End If
End Sub

Too bad it doesn't work on XP...
(If this comment was disrespectful, please report it.)

 
6/28/2012 4:28:57 AMBonnie West

Forgive me for bringing this up again, but, from what I can undertand regarding that particular subroutine, the logic seems to be like this:

1. If m_lngMemoryHandle is a valid handle, i.e., does not contain NULL,
2. Then, set it to Zero/NULL (m_lngMemoryHandle = 0)
3. Before calling GlobalFree m_lngMemoryHandle

I've just tried calling GlobalFree with a NULL handle and it returns 0/NULL (MSDN says that is the success code). Also Err.LastDllError returned 0. If that's the case, then m_lngMemoryHandle probably wasn't being freed, was it? Am I missing something here?

Anyway, thanks for the offer, but at the moment, I have no projects requiring Socket functionality. Still, I must thank you for sharing your code to us!
(If this comment was disrespectful, please report it.)

 
6/28/2012 4:31:12 AMBonnie West

Forgive me for bringing this up again, but, from what I can undertand regarding that particular subroutine, the logic seems to be like this:

1. If m_lngMemoryHandle is a valid handle, i.e., does not contain NULL,
2. Then, set it to Zero/NULL (m_lngMemoryHandle = 0)
3. Before calling GlobalFree m_lngMemoryHandle

I've just tried calling GlobalFree with a NULL handle and it returns 0/NULL (MSDN says that is the success code). Also Err.LastDllError returned 0. If that's the case, then m_lngMemoryHandle probably wasn't being freed, was it? Am I missing something here?

Anyway, thanks for the offer, but at the moment, I have no projects requiring Socket functionality. Still, I must thank you for sharing your code with us!
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.