Common/ReadIPAddress.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;

/// <summary>
/// 读取IP地址
/// </summary>
public class ReadIPAddress
{

    static private string _dataPath = System.Web.HttpContext.Current.Server.MapPath("~/QQDataBase/QQ.Dat");
    static private string country;
    static private string local;
    static private long firstStartIp = 0;
    static private long lastStartIp = 0;
    static private FileStream objfs = null;
    static private long startIp = 0;
    static private long endIp = 0;
    static private int countryFlag = 0;
    static private long endIpOff = 0;

    #region 搜索匹配数据

    private static byte[] IPLib;

    private static byte[] GetIPLib()
    {
        if (IPLib == null)
        {
            IPLib = ReadData();
        }

        return IPLib;

    }

    private static byte[] ReadData()
    {
        objfs = new FileStream(_dataPath, FileMode.Open, FileAccess.Read);


        int count = (int)objfs.Length;

        byte[] lib = new byte[objfs.Length];
        objfs.Read(lib, 0, count);

        objfs.Close();


        return lib;
    }

    private static byte[] GetSome(long start, long length)
    {
        byte[] some = new byte[length];

        for (long i = start; i < start + length; i++)
        {
后面还有 268 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。