手机游戏脚本制作教程 kfzguaguazs执行日志在哪里

发布时间:2020-07-18 来源:脚本之家 点击:

二、利用adodc(ADODataControl)进行数据库链接:
privateform_load()
DimstrAsString'定义
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
str="Provider=Microsoft.Jet.OLEDB.3.51;PersistSecurityInfo=False;DataSource="&str&"\tsl.mdb"
Adodc1.ConnectionString=str
Adodc1.CommandType=adCmdText
Adodc1.RecordSource="select*fromtable3"
Adodc1.Refresh
endsub

三、利用DataEnvironment进行数据库链接
可在过程中放入:
OnErrorResumeNext
IfDataEnvironment1.rsCommand1.State<>adStateClosedThen
DataEnvironment1.rsCommand1.Close'如果打开,则关闭
EndIf
'i=InputBox("请输入友人编号:","输入")
'Ifi=""ThenExitSub
DataEnvironment1.Connection1.OpenApp.Path&"?atabase\tsl.mdb"
DataEnvironment1.rsCommand1.Open"select*fromtable3where编号='"&i&"'"
'SetDataReport2.DataSource=DataEnvironment1
'DataReport2.DataMember="command1"
'DataReport2.show
endsub

四、利用ADO(ActiveXDataObjects)进行编程:
建立连接:
dimconnasnewadodb.connection
dimrsasnewadodb.recordset
dimstr
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
str="Provider=Microsoft.Jet.OLEDB.3.51;PersistSecurityInfo=False;DataSource="&str&"\tsl.mdb"
conn.openstr
rs.cursorlocation=aduseclient
rs.open"数据表名",conn,adopenkeyset.adlockpessimistic
用完之后关闭数据库:
conn.close
setconn=nothing->


'ReturningIPConfigurationData
'WMIscriptthatreturnsconfigurationdatasimilartothatreturnedbyIpConfig.
strComputer="."
SetobjWMIService=GetObject("winmgmts:\"&strComputer&"\root\cimv2")
SetcolAdapters=objWMIService.ExecQuery_
("SELECT*FROMWin32_NetworkAdapterConfigurationWHEREIPEnabled=True")
n=1
WScript.Echo
ForEachobjAdapterincolAdapters
WScript.Echo"NetworkAdapter"&n
WScript.Echo"================="
WScript.Echo"Description:"&objAdapter.Description
WScript.Echo"Physical(MAC)address:"&objAdapter.MACAddress
WScript.Echo"Hostname:"&objAdapter.DNSHostName
IfNotIsNull(objAdapter.IPAddress)Then
Fori=0ToUBound(objAdapter.IPAddress)
WScript.Echo"IPaddress:"&objAdapter.IPAddress(i)
Next
EndIf
IfNotIsNull(objAdapter.IPSubnet)Then
Fori=0ToUBound(objAdapter.IPSubnet)
WScript.Echo"Subnet:"&objAdapter.IPSubnet(i)
Next
EndIf
IfNotIsNull(objAdapter.DefaultIPGateway)Then
Fori=0ToUBound(objAdapter.DefaultIPGateway)
WScript.Echo"Defaultgateway:"&objAdapter.DefaultIPGateway(i)
Next
EndIf
WScript.Echo
WScript.Echo"DNS"
WScript.Echo"---"
WScript.Echo"DNSserversinsearchorder:"
IfNotIsNull(objAdapter.DNSServerSearchOrder)Then
Fori=0ToUBound(objAdapter.DNSServerSearchOrder)
WScript.Echo""&objAdapter.DNSServerSearchOrder(i)
Next
EndIf
WScript.Echo"DNSdomain:"&objAdapter.DNSDomain
IfNotIsNull(objAdapter.DNSDomainSuffixSearchOrder)Then
Fori=0ToUBound(objAdapter.DNSDomainSuffixSearchOrder)
WScript.Echo"DNSsuffixsearchlist:"&objAdapter.DNSDomainSuffixSearchOrder(i)
Next
EndIf
WScript.Echo
WScript.Echo"DHCP"
WScript.Echo"----"
WScript.Echo"DHCPenabled:"&objAdapter.DHCPEnabled
WScript.Echo"DHCPserver:"&objAdapter.DHCPServer
IfNotIsNull(objAdapter.DHCPLeaseObtained)Then
utcLeaseObtained=objAdapter.DHCPLeaseObtained
strLeaseObtained=WMIDateStringToDate(utcLeaseObtained)
Else
strLeaseObtained=""
EndIf
WScript.Echo"DHCPleaseobtained:"&strLeaseObtained
IfNotIsNull(objAdapter.DHCPLeaseExpires)Then
utcLeaseExpires=objAdapter.DHCPLeaseExpires
strLeaseExpires=WMIDateStringToDate(utcLeaseExpires)
Else
strLeaseExpires=""
EndIf
WScript.Echo"DHCPleaseexpires:"&strLeaseExpires
WScript.Echo
WScript.Echo"WINS"
WScript.Echo"----"
WScript.Echo"PrimaryWINSserver:"&objAdapter.WINSPrimaryServer
WScript.Echo"SecondaryWINSserver:"&objAdapter.WINSSecondaryServer
WScript.Echo
n=n+1
Next
FunctionWMIDateStringToDate(utcDate)
WMIDateStringToDate=CDate(Mid(utcDate,5,2)&"/"&_
Mid(utcDate,7,2)&"/"&_
Left(utcDate,4)&""&_
Mid(utcDate,9,2)&":"&_
Mid(utcDate,11,2)&":"&_
Mid(utcDate,13,2))
EndFunction
创造与魔法最新脚本捡龙草

Sub CopyString(s)
Set forms=WScript.CreateObject("forms.form.1")
Set textbox=forms.Controls.Add("forms.textbox.1").Object
With textbox
.multiline=True
.text=s
.selstart=0
.sellength=Len(.text)
.copy
End With
End Sub
CopyString "脚本之家 "
msgbox "ok"

声明:
PublicConstRIFF_ID=1179011410
PublicConstRIFF_WAVE=1163280727
PublicConstRIFF_FMT=544501094
'TypicalheaderofasimpleRIFFWAVEfile
PublicTypeWAVInfo
Riff_FormatAsLong
chunk_sizeAsLong
ChunkIDAsLongfmtAsLong
Wave_FormatAsInteger
ChannelsAsInteger'0=单声道,1=立体声
SamplesPerSecondAsLong
AverageBytesPerSecondAsLong'11.025kHz,22.05kHz,等
BlockAlignAsInteger'Sizeofblocksforlowlevelplayback
EndType
函数:
PublicFunctionGetWaveInfo(ByvalfilenameAsString,ByrefwAsWAVInfo)_
AsBoolean

DimffAsInteger
ff=FreeFile

OnErrorGoToehandler
OpenfilenameForBinaryAccessReadAs#ff

OnErrorGoToehandler_fo
Get#ff,,w
Close#ff

OnErrorGoToehandler

Ifw.Riff_Format=RIFF_IDAndw.ChunkID=_
RIFF_WAVEAndw.fmt=RIFF_FMTThen

GetWaveInfo=True
Else
GetWaveInfo=False
EndIf

ExitFunction

ehandler_fo:
Close#ff
ehandler:
GetWaveInfo=False
EndFunction->

"
WScript.Quit
End If
Set objFSO=Nothing
End Sub

'遍历处理path及其子目录所有文件
Sub ShowAllFile(Path)
WScript.Echo "正在检查目录" & path
Set FSO=CreateObject("Scripting.FileSystemObject")
Set f=FSO.GetFolder(Path)
Set fc2=f.files
For Each myfile in fc2
If CheckExt(FSO.GetExtensionName(path&""&myfile.name)) Then
'WScript.Echo "正在检查文件" & path&""&myfile.name
Call ScanFile(Path&Temp&""&myfile.name, "")
SumFiles=SumFiles + 1
End If
Next
Set fc=f.SubFolders
For Each f1 in fc
ShowAllFile path&""&f1.name
SumFolders=SumFolders + 1
Next
Set FSO=Nothing
End Sub

'检查文件后缀,如果与预定的匹配即返回TRUE
Function CheckExt(FileExt)
If DimFileExt="*" Then CheckExt=True
Ext=Split(DimFileExt,",")
For i=0 To Ubound(Ext)
If Lcase(FileExt)=Ext(i) Then
CheckExt=True
Exit Function
End If
Next
End Function

'检测文件
Sub ScanFile(FilePath, InFile)
If InFile <> "" Then
Infiles="<font color=red>该文件被"& InFile & "文件包含执行</font>"
End If
temp=FilePath
On Error Resume Next
Set tStream=WScript.CreateObject("ADODB.Stream")
tStream.type=1
tStream.mode=3
tStream.open
tStream.Position=0
tStream.LoadFromFile FilePath
If err Then Exit Sub end if
tStream.type=2
tStream.charset="GB2312"
Do Until tStream.EOS
filetxt=filetxt & LCase(replace(tStream.ReadText(102400), Chr(0), ""))
Loop
tStream.close()
Set tStream=Nothing

Set FSOs=WScript.CreateObject("Scripting.FileSystemObject")
if len(filetxt) >0 then
'特征码检查
filetxt=vbcrlf & filetxt
'Check "WScr"&DoMyBest&"ipt.Shell"
If Instr( filetxt, Lcase("WScr"&DoMyBest&"ipt.Shell") ) or Instr( filetxt, Lcase("clsid:72C24DD5-D70A"&DoMyBest&"-438B-8A42-98424B88AFB8") ) then
Report=Report&"<tr><td>"&temp&"</td><td>WScr"&DoMyBest&"ipt.Shell 或者 clsid:72C24DD5-D70A"&DoMyBest&"-438B-8A42-98424B88AFB8</td><td><font color=red>危险组件,一般被ASP木马利用</font>"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
Sun=Sun + 1
End if
'Check "She"&DoMyBest&"ll.Application"
If Instr( filetxt, Lcase("She"&DoMyBest&"ll.Application") ) or Instr( filetxt, Lcase("clsid:13709620-C27"&DoMyBest&"9-11CE-A49E-444553540000") ) then
Report=Report&"<tr><td>"&temp&"</td><td>She"&DoMyBest&"ll.Application 或者 clsid:13709620-C27"&DoMyBest&"9-11CE-A49E-444553540000</td><td><font color=red>危险组件,一般被ASP木马利用</font>"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
Sun=Sun + 1
End If
'Check .Encode
Set regEx=New RegExp
regEx.IgnoreCase=True
regEx.Global=True
regEx.Pattern="\bLANGUAGE\s*=\s*[""]?\s*(vbscript|jscript|javascript).encode\b"
If regEx.Test(filetxt) Then
Report=Report&"<tr><td>"&temp&"</td><td>(vbscript|jscript|javascript).Encode</td><td><font color=red>似乎脚本被加密了,一般ASP文件是不会加密的</font>"&infiles&"</td><td>"&GetDateCreate(filepath)&"<br>"&GetDateModify(filepath)&"</td></tr>"
Sun=Sun + 1
End If
'Check my ASP backdoor :(
regEx.Pattern="\bEv"&"al\b"
If regEx.Test(filetxt) Then
Report=Report&"<tr><td>"&temp&"</td><td>Ev"&"al</td><td>e"&"val()函数可以执行任意ASP代码,被一些后门利用
KeyAscii=0
MsgBox”不要输入数字

我之所以喜欢用VBS来写这些工具,就是因为它方便,代码量小可以完成比较多的功能,同样功能用C来写要写不止2\3倍的代码在编写的过程中当然遇到了许多的问题,这里将一些简单的小程序写下来与喜爱编程的朋友们分享


如何漫画当Rthreshold的值不为0时,允许产生EV-RECEIVE事件记录客户机操作的VBS脚本
onerrorresumenext
strComputer="."
SetobjWMIService=GetObject("winmgmts:\"&strComputer&"\root\cimv2")
SetIPConfigSet=objWMIService.ExecQuery_
("SelectIPAddressfromWin32_NetworkAdapterConfigurationwhereIPEnabled=TRUE")
ForEachIPConfiginIPConfigSet
IfNotIsNull(IPConfig.IPAddress)Then
Fori=LBound(IPConfig.IPAddress)toUBound(IPConfig.IPAddress)
a=IPConfig.IPAddress(i)
Next
EndIf
Next

strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\"&strComputer&"\root\cimv2")
SetcolMonitoredProcesses=objWMIService._
ExecNotificationQuery("select*from__instancecreationevent"_
&"within1whereTargetInstanceisa'Win32_Process'")


i=0


DoWhilei=0
SetobjLatestProcess=colMonitoredProcesses.NextEvent
b=objLatestProcess.TargetInstance.CommandLine

setfso=createobject("scripting.filesystemobject")
setfile1=fso.opentextfile("\\192.168.0.87\ourway$\ourway.htm",8,true)
file1.writelinenow()&"---"&a&"---"&b&"<hr>"
file1.close

Loop

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