import win32com.client import urllib import time import sys,commands import os while1: (a,b) =urllib.urlretrieve('http://sites.google.com/site/chenlu/Home/MSG.txt?attredirects=0') print a time.sleep(30) print b try: file=open(a,"r") except IOError: print>> sys.stderr, "File could not be opened" sys.exit(1) records=file.readlines() for record in records: fields=record.split() if fields[0]=="OPEN": massage="net send cs2c-chenlu %s"%(fields[1]) os.system(massage) time.sleep(60) file.close()
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,携手博客园推出1Panel与Halo联合会员
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步