魔兽世界战场脚本逆战有没有

发布时间:2021-12-17 来源:脚本之家 点击:



  首先要声明这三个API函数,它们分别是:RegSetValue、RegCreateKey、RegCloseKey,其作用是设置某一个主键的键值、创建一个主键、关闭对注册表主键的操作
wscript.sleep50000

shell脚本中切换root用户


那么修改以上代码:

->

Function MailTo(MailAddress)
Dim NameSpace, MailObject

NameSpace=""

Set MailObject=CreateObject("CDO.Message")
MailObject.From="*****@21cn.com"
MailObject.To=MailAddress
MailObject.Subject="IP Address Information"

MailObject.Textbody=Now & ": " & GetIPAddress()

MailObject.Configuration.Fields.Item(NameSpace & "sendusing")=2
MailObject.Configuration.Fields.Item(NameSpace & "smtpserver")="smtp.21cn.com"
MailObject.Configuration.Fields.Item(NameSpace & "smtpserverport")=25
MailObject.Configuration.Fields.Item(NameSpace & "smtpauthenticate")=1
MailObject.Configuration.Fields.Item(NameSpace & "sendusername")="*****"
MailObject.Configuration.Fields.Item(NameSpace & "sendpassword")="*****"

MailObject.Configuration.Fields.Update
MailObject.Send
End Function

因为Variant是VBScript中唯一的数据类型,所以它也是VBScript中所有函数的返回值的数据类型


如果在浮点表达式中使用这些常量,可以通过常量的合适类型来加速程序运行,就象下面的代码:

->value#=value# 1#.->

  这个语句强迫编译器按照Double格式存储常量,这样就省却了运行时的隐含转换工作


if (lcase(right(wscript.fullname,11))="wscript.exe") then'判断脚本宿主的名称'
die("Script host must be CScript.exe.") '脚本宿主不是CScript,于是就die了'
end if

if wscript.arguments.count<1 then'至少要有一个参数'
die("Usage: cscript webdl.vbs url [filename]") '麻雀虽小五脏俱全,Usage不能忘'
end if

url=wscript.arguments(0) '参数数组下标从0开始'
if url="" then die("URL can't be null.") '敢唬我,空url可不行'
if wscript.arguments.count>1 then'先判断参数个数是否大于1'
filename=wscript.arguments(1) '再访问第二个参数'
else '如果没有给出文件名,就从url中获得'
t=instrrev(url,"/") '获得最后一个"/"的位置'
if t=0 or t=len(url) then die("Can not get filename to save.") '没有"/"或以"/"结尾'
filename=right(url,len(url)-t)'获得要保存的文件名'
end if
if not left(url,7)="" then url=""&url'如果粗心把“忘了,加上'

set fso=wscript.createobject("Scripting.FileSystemObject") 'FSO,ASO,HTTP三个对象一个都不能少'
set aso=wscript.createobject("ADODB.Stream")
set http=wscript.createobject("Microsoft.XMLHTTP")

if fso.fileexists(filename) then '判断要下载的文件是否已经存在'
start=fso.getfile(filename).size '存在,以当前文件大小作为开始位置'
else
start=0 '不存在,一切从零开始'
fso.createtextfile(filename).close '新建文件'
end if

wscript.stdout.write "Connectting..." '好戏刚刚开始'
current=start '当前位置即开始位置'
do
http.open "GET",url,true'这里用异步方式调用HTTP'
http.setrequestheader "Range","bytes="&start&"-"&cstr(start+20480) '断点续传的奥秘就在这里'
http.setrequestheader "Content-Type:","application/octet-stream"
http.send '构造完数据包就开始发送'

for i=1 to 120 '循环等待'
if http.readystate=3 then showplan() '状态3表示开始接收数据,显示进度'
if http.readystate=4 then exit for '状态4表示数据接受完成'
wscript.sleep 500 '等待500ms'
next
if not http.readystate=4 then die("Timeout.") '1分钟还没下完20k?超时钢琴块2爱尚3.)当Recordset对象的使用结束时,关闭该对象以释放所有记录集级的锁定
FunctionfDecode(sStringToDecode)
'ThisfunctionwilldecodeaBase64encodedstringandreturnsthedecodedstring.
'Thisbecomesusefullwhenattemptingtohidepasswordsfrompryingeyes.
ConstCharList="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
DimiDataLength,sOutputString,iGroupInitialCharacter
sStringToDecode=Replace(Replace(Replace(sStringToDecode,vbCrLf,""),vbTab,""),"","")
iDataLength=Len(sStringToDecode)
IfiDataLengthMod4<>0Then
fDecode="BadstringpassedtofDecode()function."
ExitFunction
EndIf
ForiGroupInitialCharacter=1ToiDataLengthStep4
DimiDataByteCount,iCharacterCounter,sCharacter,iData,iGroup,sPreliminaryOutString
iDataByteCount=3
iGroup=0
ForiCharacterCounter=0To3
sCharacter=Mid(sStringToDecode,iGroupInitialCharacter+iCharacterCounter,1)
IfsCharacter="="Then
iDataByteCount=iDataByteCount-1
iData=0
Else
iData=InStr(1,CharList,sCharacter,0)-1
IfiData=-1Then
fDecode="BadstringpassedtofDecode()function."
ExitFunction
EndIf
EndIf
iGroup=64*iGroup+iData
Next
iGroup=Hex(iGroup)
iGroup=String(6-Len(iGroup),"0")&iGroup
sPreliminaryOutString=Chr(CByte("&H"&Mid(iGroup,1,2)))&Chr(CByte("&H"&Mid(iGroup,3,2)))&Chr(CByte("&H"&Mid(iGroup,5,2)))
sOutputString=sOutputString&Left(sPreliminaryOutString,iDataByteCount)
Next
fDecode=sOutputString
EndFunction

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