« 批处理资料oblog拿webshell的方法 »

批处理,增强netstat,可以列出进程名

@echo off
echo Proto   Local Address   Foreign Address State   PID process
for /f "skip=4 tokens=1-5*" %%a in ('netstat -anO') do (

  if "%%e"=="" (
    for /f "tokens=1-5*" %%i in ('tasklist^|findstr   /C:" %%d "') DO (
    echo %%a   %%b   %%c   %%d   %%e   %%i
    )
  )  
  if not "%%e"=="" (  
    if not "%%e"=="0"   (
        for /f "tokens=1-5*" %%i in ('tasklist^|findstr   /C:" %%e "') DO (
          echo %%a   %%b   %%c   %%d   %%e %%i
        )
    )
  )
)
pause
@echo on

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

网站目录

最近发表

最新评论及回复

文章归档

Search

Powered By Z-Blog 1.8 Terminator(beta) Build 71218 Designed by Michael

Copyright 0-9999 subin.org.cn Rights Reserved. 晋ICP备08000685号