Between program writing, the flying knife still allows everyone to see how the pursuit uses IP addresses to determine the source of the user (Grace, now we need to reveal the "old bottom" of "Hunting, hello, everyone ).
If you want to write a tracing software, the first thing you think of is to collect an IP allocation table and store them in the database for reading. An IP allocation table exists in the tracing software, but where is this table?
In one go, we know that two files are contained in the catch-up file, namely wry.exe, which is the main program to be pursued and wry. dll. Note that this is the IP Address Allocation Table we have worked hard to find. But which data file ends with a dll? Isn't the dll file a dynamic link library?
Don't worry, let's proceed with the analysis. We found that most of the database generated by the program was a dbf database, so is this wry. dll also a FoxPro database?
To achieve this, change wry. dll to wry. dbf immediately, and then open it with Visual FoxPro. 2, haha, it is indeed a dbf database. It mainly includes four fields: Startip (start IP), Endip (end IP), Country (Country or province of the IP address), and Local (user Internet type ).
^.
Take it easy to use the MDF database on the network. Is there some ......
Convert MDF to SQL Server, regardless of the time interval.
What !? Will not convert MDF to SQL Server ?! Haha, this magazine is for programmers. Let's look at other books first. If we talk about these basics, the wandering brother will scold me for lying to the draft fee :(
When this function is implemented, a function is also used for readability of the program:
Public string GetIPFrom (string sIP)
{
......
}
The IP address obtained in the preceding procedure is generally in the format of 202.101.96.54, And the IP Address Allocation Table is in the format of 202.101.096.054. Therefore, the first thing to do is to add 0 to the less than three parts in each segment of the IP address.
Char [] de = {'.'};
String [] aIP = sIP. Split (de );
String SingleIP;
StringBuilder nIPx = new StringBuilder ();
Int SIPLen;
String strResult = "cannot be found ";
For (int I = 0; I <4; I ++)
{