COMM/IPClass.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Diagnostics;
namespace COMM
{
public class RedirectMode
{
public static readonly int Mode_1 = 1;
public static readonly int Mode_2 = 2;
}
public class IPFormat
{
public static readonly int HeaderLength = 8;
public static readonly int IndexRecLength = 7;
public static readonly int IndexOffset = 3;
public static readonly int RecOffsetLength = 3;
public static readonly string UnknownCountry = "未知的国家";
public static readonly string UnknownZone = "未知的地区";
public static uint ToUint(byte[] val)
{
if (val.Length > 4) throw new ArgumentException();
if (val.Length < 4)
{
byte[] copyBytes = new byte[4];
Array.Copy(val, 0, copyBytes, 0, val.Length);
return BitConverter.ToUInt32(copyBytes, 0);
}
else
{
return BitConverter.ToUInt32(val, 0);
}
}
}
public class IPLocation
{
private IPAddress m_ip;
private string m_country;
private string m_loc;
public IPLocation(IPAddress ip, string country, string loc)
{
m_ip = ip;
m_country = country;
m_loc = loc;
}
public IPAddress IP
{
后面还有 186 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。