ASP. Net write Tracing Method

Source: Internet
Author: User

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, And the IP Address Allocation Table is in the format of 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 ++)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.