首页 > 代码库 > C#-訪问轰炸机,新建进程,结束进程...(ConsoleApp)---ShinePans
C#-訪问轰炸机,新建进程,结束进程...(ConsoleApp)---ShinePans
这个程序能够自己主动打开要打开的网址,而且自己主动结束进程,这样能够达到博文点击流量的添加
program.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace Tst { class Program { static void Main(string[] args) { for(int i=0;i<1000;i++) { Console.WriteLine("添加{0}次了!", i); Util util = new Util(); util.StartThrad(); Thread.Sleep(5000); //设置速度 util.Close(); } } } }
Util.cs
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; namespace Tst { public class Util { public void StartThrad() { ThreadStart start = new ThreadStart(StartIE); Thread thread = new Thread(start); thread.Start(); } public void Close() { Process[] pro = Process.GetProcesses(); //获取全部的进程 //遍历进程 for(int i=0;i<pro.Length;i++) { //推断是否为要查找的进程 if (pro[i].ProcessName.ToString().ToLower() == "360chrome") //本人測试的是 360极速浏览器 ,其它的浏览器请改进程名 pro[i].Kill(); //结束进程; } } private void StartIE() { Process.Start("http://user.qzone.qq.com/574273250"); //待訪问的地址 ,站点的计算规则自己查询,有不同的计算方式,时间间隔,Id号等 } } }
C#-訪问轰炸机,新建进程,结束进程...(ConsoleApp)---ShinePans
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。