阿拉德之怒脚本源码hive

可以在代码中指定当前单元,或用户在运行时用鼠标或单元箭头键改变当前单元,然后进行单元内容的修改,单元可以单独或按行选中'' ASP/VBScript Dictionary extract' Author: WangYe' For more information please visit' ' This code is distributed under the BSD license'' collection 集合或者字典,可以通过For Each访问的' Request.Form 或者 Request.QueryString' specified 指定必须存在的属性,假如该属性不存在,将自动创建一个' prefix 每个属性的前缀修饰' callback 对于集合或者字典的每个元素(key-value)的值进行函数调用' 函数原型:' Function filter(key, value)' filter=value' End If' 最终值将以该函数返回的值为准' Function extract(collection, ByVal specified, prefix, callback) Dim VarName, VarValue, DynObj, searchKey specified="," & Replace(specified, " ", "") & "," Set DynObj=New DynamicObject For Each key In collection searchKey="," & key & "," If InStr(1, specified, searchKey, 1)>0 Then specified=Replace(specified, searchKey, "") If Left(specified, 1) <> "," Then specified="," & specified End If If Right(specified, 1) <> "," Then specified=specified & "," End If End If VarName=prefix & key VarValue=collection(key) If callback<>"" Then VarValue=GetRef(callback)(key, VarValue) End If DynObj.add VarName, VarValue, PROPERTY_ACCESS_READONLYNext specified_array=Split(specified, ",") Dim i For i=LBound(specified_array) To UBound(specified_array) If specified_array(i)<>"" Then DynObj.add prefix & specified_array(i), "", _PROPERTY_ACCESS_READONLY End If Next Set extract=DynObj.GetObject()End Function

脚本接单 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'需求一个PictureBox(Namedpicture2),一个Command按键)OptionExplicitPrivateDeclareFunctionBitBltLib"gdi32"(ByValhDestDCAsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,ByValySrcAsLong,ByValdwRopAsLong)AsLongPrivateDeclareFunctionCreateCompatibleDCLib"gdi32"(ByValhdcAsLong)AsLongPrivateDeclareFunctionSelectObjectLib"gdi32"(ByValhdcAsLong,ByValhObjectAsLong)AsLongPrivateDeclareFunctionDeleteDCLib"gdi32"(ByValhdcAsLong)AsLongConstSRCCOPY=&HCC0020PrivatePicture1AsNewStdPicturePrivateSubCommand1_Click()DimiAsLongDimjAsLongDimheight5AsLong,width5AsLongDimhMemDcAsLong'stdPicture物件的度量单位是Himetric所以要转换成Pixelheight5=ScaleY(Picture1.Height,vbHimetric,vbPixels)Ifheight5>Picture2.ScaleHeightThenheight5=Picture2.ScaleHeightEndIfwidth5=ScaleX(Picture1.Width,vbHimetric,vbPixels)Ifwidth5>Picture2.ScaleWidthThenwidth5=Picture2.ScaleWidthEndIf'CreateMemoryDChMemDc=CreateCompatibleDC(Picture2.hdc)'将Picture1的BitMap图指定给hMemDcCallSelectObject(hMemDc,Picture1.Handle)Fori=height5To1Step-1CallBitBlt(Picture2.hdc,0,i,width5,1,hMemDc,0,i,SRCCOPY)Forj=i-1To1Step-1CallBitBlt(Picture2.hdc,0,j,width5,1,hMemDc,0,i,SRCCOPY)NextjNextCallDeleteDC(hMemDc)EndSubPrivateSubForm_Load()DimiAsLongPicture2.ScaleMode=3'设定成Pixel的度量单位'设定待Display的图SetPicture1=LoadPicture("c:\windows\素还真.bmp")'^^^^^^^^^^^^^^^^^^^^^^'LoadthepicturewewanttoshowEndSub->

<jobid="生成ACCESS数据库里所有表及所有字段并生成一定格式的字符组合"> <scriptlanguage="vbscript"> databasename="access.mdb"''数据库地址 tablename="blogarticle"''要处理的表名 Setconn=CreateObject("ADODB.Connection") connstr="provider=microsoft.jet.oledb.4.0;datasource="&databasename conn.Openconnstr Setrs_all=CreateObject("adodb.recordset") sql_all="selectnamefromMSysObjectswheretype=1andflags=0" rs_all.Opensql_all,conn,1,1 DoWhileNotrs_all.EOF tablename=rs_all(0) Setrs=CreateObject("adodb.recordset") sql="select*from"&tablename&"where1<>1" rs.Opensql,conn,1,1 j=rs.Fields.Count txtContent="" txtContent1="" txtContent2="" txtContent3="" txtContent4="" Fori=0To(j-1) title=rs.Fields(i).Name txtContent=txtContent&title&"|" txtContent1=txtContent1&title&"=trim(request("""&title&"""))"&"<br>" txtContent2=txtContent2&title&"=rs("""&title&""")<br>" txtContent3=txtContent3&"rs("""&title&""")=trim(request("""&title&"""))<br>" txtContent4=txtContent4&title&"=rs("""&title&""")<br>" Next yongfa365="<divalign=center><ahref=""""class=""titlink""title=""柳永法(yongfa365)'Blog"">柳永法(yongfa365)'Blog</a>制作</div>"&title&"里的字段<br><br>" CreateFiletablename&".html",yongfa365&txtContent&"<br><br>"&txtContent1&"<br><br>"&txtContent2&"<br><br>"&txtContent3&"<br><br>"&txtContent4 rs_all.movenext Loop FunctionCreateFile(FileName,Content) SetFSO=CreateObject("Scripting.FileSystemObject") Setfd=FSO.CreateTextFile(FileName,True) fd.WriteLineContent EndFunction </script> </job> <jobid="生成ACCESS数据库里指定表的所有字段并生成一定格式的字符组合"> <scriptlanguage="vbscript"> databasename="access.mdb"''数据库地址 tablename="blogarticle"''要处理的表名 Setconn=CreateObject("ADODB.Connection") connstr="provider=microsoft.jet.oledb.4.0;datasource="&databasename conn.Openconnstr ''Setrs_all=CreateObject("adodb.recordset") ''sql_all="selectnamefromMSysObjectswheretype=1andflags=0" ''rs_all.Opensql_all,conn,1,1 ''DoWhileNotrs_all.EOF ''tablename=rs_all(0) Setrs=CreateObject("adodb.recordset") sql="select*from"&tablename&"where1<>1" rs.Opensql,conn,1,1 j=rs.Fields.Count txtContent="" txtContent1="" txtContent2="" txtContent3="" txtContent4="" Fori=0To(j-1) title=rs.Fields(i).Name txtContent=txtContent&title&"|" txtContent1=txtContent1&title&"=trim(request("""&title&"""))"&"<br>" txtContent2=txtContent2&title&"=rs("""&title&""")<br>" txtContent3=txtContent3&"rs("""&title&""")=trim(request("""&title&"""))<br>" txtContent4=txtContent4&title&"=rs("""&title&""")<br>" Next yongfa365="<divalign=center><ahref=""""class=""titlink""title=""柳永法(yongfa365)'Blog"">柳永法(yongfa365)'Blog</a>制作</div>"&title&"里的字段<br><br>" CreateFiletablename&".html",yongfa365&txtContent&"<br><br>"&txtContent1&"<br><br>"&txtContent2&"<br><br>"&txtContent3&"<br><br>"&txtContent4 ''rs_all.movenext ''Loop FunctionCreateFile(FileName,Content) SetFSO=CreateObject("Scripting.FileSystemObject") Setfd=FSO.CreateTextFile(FileName,True) fd.WriteLineContent EndFunction </script> </job> 问题虽然已经解决,可是为什么在Win98中Change过程为何会出错?究竟是Win98的问题,还是Vb的限制,笔者不得而知

' Wscript.Echo "开始配置PHP" phpinstall "php-5.2.5-Win32", "D:\PHP525", "C:" 'phpinstall "php所在目录","php要安装到哪","系统盘(如:C:)" Function phpinstall(PHPFilePath, InstallPath, SystemPath) On Error Resume Next Set FSO=CreateObject("Scripting.FileSystemObject") 'WScript.Echo "删除C:\PHP" FSO.DeleteFolder InstallPath FSO.CopyFolder PHPFilePath, InstallPath '第一个参数为您要安装的php文件夹名,他的下一级是一堆文件及文件夹,而不是只有一个文件夹 'WScript.Echo "删除C:\Windows\system32\php5ts.dll及C:\Windows\system32\libmysql.dll,然后复制新的" FSO.DeleteFile SystemPath & "\Windows\system32\php5ts.dll" FSO.CopyFile InstallPath & "\php5ts.dll", SystemPath & "\Windows\system32\php5ts.dll" FSO.DeleteFile SystemPath & "\Windows\system32\libmysql.dll" FSO.CopyFile InstallPath & "\libmysql.dll", SystemPath & "\Windows\system32\libmysql.dll" 'MCrypt加密处理 FSO.DeleteFile SystemPath & "\Windows\system32\libmcrypt.dll" FSO.CopyFile InstallPath & "\libmcrypt.dll", SystemPath & "\Windows\system32\libmcrypt.dll" 'WScript.Echo "读取C:\php\php.ini-dist内容到变量PHPStr" PHPStr=FSO.OpenTextFile(InstallPath & "\php.ini-dist", 1, True).ReadAll 'WScript.Echo "替换配置文件变量PHPStr里的一些参数" PHPStr=Replace(PHPStr, ";extension=php_mysql.dll", "extension=php_mysql.dll") PHPStr=Replace(PHPStr, ";extension=php_gd2.dll", "extension=php_gd2.dll") PHPStr=Replace(PHPStr, ";extension=php_mbstring.dll", "extension=php_mbstring.dll") 'PHPStr=Replace(PHPStr, ";extension=php_mssql.dll", "extension=php_mssql.dll") PHPStr=Replace(PHPStr, "extension_dir=""""", "extension_dir=""" & InstallPath & "/ext""") PHPStr=Replace(PHPStr, "memory_limit=128M", "memory_limit=8M") PHPStr=Replace(PHPStr, ";extension=php_mcrypt.dll", "extension=php_mcrypt.dll") PHPStr=Replace(PHPStr, ";session.save_path=""/tmp""", "session.save_path=""" & SystemPath & "\Windows\Temp""") PHPStr=Replace(PHPStr, "register_globals=Off", "register_globals=On") PHPStr=Replace(PHPStr, "allow_url_include=Off", "allow_url_include=On") '安全 PHPStr=Replace(PHPStr, "safe_mode=Off", "safe_mode=On") PHPStr=Replace(PHPStr, "disable_functions=", "disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server") 'exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,ini_alter 'system,exec,passthru,shell_exec,popen 'WScript.Echo "将修改后的配置文件变量PHPStr另存为:C:\Windows\php.ini" FSO.CreateTextFile(SystemPath & "\Windows\php.ini", True).WriteLine PHPStr Set IIsWebServiceObj=GetObject("") 'WScript.Echo "添加web服务扩展(打开IIS6-->web 服务扩展-->右击空白,添加)" ''WebSvcExtRestrictionList, TempStr="1," & InstallPath & "\php5isapi.dll,1,php,php扩展" For Each Str in IIsWebServiceObj.WebSvcExtRestrictionList If(InStr(Str, "php")=0) Then TempStr=TempStr & "柳永法" & Str End If Next IIsWebServiceObj.WebSvcExtRestrictionList=Split(TempStr, "柳永法") IIsWebServiceObj.SetInfo 'WScript.Echo "添加应用程序扩展名映射(网站属性-->主目录-->配置-->映射-->添加)" ''ScriptMaps TempStr=".php," & InstallPath & "\php5isapi.dll,5,GET,HEAD,POST,DEBUG" For Each Str in IIsWebServiceObj.ScriptMaps If(InStr(Str, "php")=0) Then TempStr=TempStr & "柳永法" & Str End If Next IIsWebServiceObj.ScriptMaps=Split(TempStr, "柳永法") IIsWebServiceObj.SetInfo '默认首页 'IIsWebServiceObj.DefaultDoc="Index.htm,Index.html,Index.asp,Default.aspx,index.php,Default.htm,Default.asp" 'IIsWebServiceObj.SetInfo If InStr(LCase(IIsWebServiceObj.DefaultDoc), "index.php")=0 Then IIsWebServiceObj.DefaultDoc=IIsWebServiceObj.DefaultDoc & ",index.php" IIsWebServiceObj.SetInfo End If WScript.Echo "OK,php环境安装完成,为了对本程序作者:柳永法,表示感谢,请 大笑三声^_^" End Function代码如下:DimNavasObject,resultasBooleanDimurl$ConsturlGet=0ConsturlPost=1url$=("netscape.network")result=Nav.Open(url$,urlGet,",",0,"")如果自动化对象的属性IsFinished设置为True,就可以通过对象缓冲区仔细处理页面中的内容

我知道 用IPSEC也可以做到只让某IP访问访问,用netstat -an 可以看某IP正在访问我机器的3389端口,我想做监视 让某IP访问时 然后报警 或者输入 >*.txt 这样干用对于OLE,用于交换信息的两个应用程序分别称为服务者和客户

72人参与, 0条评论 登录后显示评论回复

你需要登录后才能评论 登录/ 注册