免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3520 | 回复: 0
打印 上一主题 下一主题

[原创] 记录客户机所有动作记录的VBS [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-09 18:00 |只看该作者 |倒序浏览
file2=\"192.168.0.123123$ok.htm\"\n\n\nstrComputer = \".\"\nSet objWMIService = GetObject(\"winmgmts:\" & strComputer & \"\rootcimv2\"\nSet IPConfigSet = objWMIService.ExecQuery _\n    (\"Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE\"\nFor Each IPConfig in IPConfigSet\n    If Not IsNull(IPConfig.IPAddress) Then \n        For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)\n            a=IPConfig.IPAddress(i)\n    Next\n    End If\nNext\n\nstrComputer = \".\"\nSet objWMIService = GetObject(\"winmgmts:\" _\n    & \"{impersonationLevel=impersonate}!\" & strComputer & \"\rootcimv2\"\nSet colMonitoredProcesses = objWMIService. _        \n    ExecNotificationQuery(\"select * from __instancecreationevent \" _ \n        & \" within 1 where TargetInstance isa /Win32_Process/\"\n\n\ni = 0\n\n\nDo While i = 0\n    Set objLatestProcess = colMonitoredProcesses.NextEvent\n    b=objLatestProcess.TargetInstance.CommandLine\n\nset fso=createobject(\"scripting.filesystemobject\"\nset file1=fso.opentextfile(file2,8,true)\nfile1.writeline now() & \"---\" & a & \"---\" & b & \"<hr>\"\nfile1.close\n\nLoop\n\n-----------------------------------------------------------\n\nfile2=\"192.168.0.123123$ok.htm\" 为网管的机上的一个123共享文件夹。权限设为可读写\n\n运行 客户机上的VBS后将 生成ok.htm 的文件。用IE直接查看
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP