实际是通过c#编程方式调用了CMD命令行,然后调用netstat命令,然后将CMD命令的输出流转到了C#控制台程序上.也可以将结果输出到文件. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace _19获得系统打开的端口和状态 { class Program { static void Main(strin
类似于TaobaoProtect.exe是由TBSecSvc服务启动的 http://stackoverflow.com/questions/3582108/create-windows-service-from-executable# You can use sc.exe (required when using Powershell): sc create <new_service_name> binPath= "<path_to_the_executable>&qu