python

超轻量级php框架startmvc

查看端口并杀进程python脚本代码

更新时间:2020-08-14 09:12:02 作者:startmvc
我就废话不多说,直接上代码吧:#-*-coding:utf-8-*-importosout=os.system('netstat-aon|findstr"25"')#25端

我就废话不多说,直接上代码吧:


# -*- coding: utf-8 -*-
import os
out=os.system('netstat -aon|findstr "25"')#25端口号
print(out)#输出进程
out=os.system('tasklist|findstr "3316"')#3316进是程
print(out)#输出程序名字
out=os.system('taskkill /f /t /im MESMTPC.exe')#MESMTPC.exe程序名字
print(out)#

依次手动执行每个命令

以上这篇查看端口并杀进程python脚本代码就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

端口 杀进程 python