间接信息传递(可以发挥想象实现远程关机==)
2009-06-16 10:29
211 查看
import win32com.client
import urllib
import time
import sys,commands
import os
while 1:
(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()
import urllib
import time
import sys,commands
import os
while 1:
(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()
相关文章推荐
- win7实现远程关机-可以批量局域网远程关机
- 利用XP实现网络远程统一关机
- c# 实现远程关机功能
- 06-php雇员管理系统-实现显示雇员信息列表分页改进(可以处理大数据100000条)
- 通过shutdown命令实现网络远程关机
- SMSDemo android 简单拦截短信例子可以实现发 远程控制
- 使用jQuery插件jRemoteValidate进行远程ajax验证,可以自定义返回的信息
- php实现远程关机
- 用ServerSocket 实现服务端与客户端之间信息传递
- 发现这句话可以查看db2的版本信息,不受远程限制
- AIDL实现不同应用之间跨进程通讯及传递与返回各种数据类型和远程接口回调
- 完成一个学生管理程序,使用学号作为键添加5个学生对象,并可以将全部信息保存在文件中,可以实现对学生信息的学号查找,输出全部学生信息的功能。
- 完成一个学生管理程序,使用学号作为键添加5个学生对象,并可以将全部信息保存在文件中,可以实现对学生信息的学号查找,输出全部学生信息的功能。
- 一个实现ajax之后既可以刷新又可以让提示信息延长的js实现方法
- 如何开发一个java开源框架-----Jvn框架之实现参数传递跟信息返回(第二讲)
- 实现Win XP远程关机和远程重启的方法
- 用命令实现Win7远程桌面关机和重启
- 使用xml实现Webservice信息传递--调用
- WCF后续之旅(6): 通过WCF Extension实现Context信息的传递
- python实现websocket服务器,可以在web实时显示远程服务器日志