wishnet wishnet
关注数: 27 粉丝数: 84 发帖数: 942 关注贴吧数: 56
高手请进,看看这段程序里有没有木马! 某个整站程序中的一段,卡巴总是报有木马,高手请帮忙看一看!谢谢了!![code]<%'得到文件二进制数据Function GetWebData(byval strUrl)dim curlpathdim Retrieval Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "Get", strUrl, False,"","" .Send GetWebData =.ResponseBody End With Set Retrieval = NothingEnd Function'将数据保存成文件Sub SaveFile(FileName,Data,Path)Dim Ads Set ads=server.CreateObject("Adodb.Stream") With ads .Type=1 .Open .Write Data .SaveToFile server.MapPath(Path&"/"&FileName),2 .Cancel() .Close() End With Set Ads=nothingEnd Sub'检查目录是否存在Function CheckDir1(FolderPath)folderpath1=Server.MapPath("..")&"/"&folderpath Set fso1 = CreateObject("Scripting.FileSystemObject") If fso1.FolderExists(FolderPath1) then '存在 CheckDir1 = True Else '不存在 CheckDir1 = False End if Set fso1 = nothingEnd Function'-------------根据指定名称生成目录-----------------------Function MakeNewsDir1(foldername)dim f Set fso1 = CreateObject("Scripting.FileSystemObject") Set f = fso1.CreateFolder(Server.MapPath("..")&"/"&foldername) MakeNewsDir1 = True Set fso1 = nothingEnd Function'取得文件地址Function GetFile(FileUrl,FilePath)Dim AryFileName,Ary AryFileName=split(FileUrl,"/") Call SaveFile(AryFileName(Ubound(AryFileName)),GetWebData(FileUrl),FilePath)End Function'取网页数据Function GetHttp(url) Dim Retrieval,GetBody Set Retrieval = CreateObject("Microsoft.XMLHTTP") Retrieval.Open "Get", url, False Retrieval.Send GetBody=Retrieval.ResponseBody GetHttp=BytesToBstr(GetBody) Set Retrieval = Nothing End function'二进制转文本Function BytesToBstr(body) Dim objstream Set objstream = Server.CreateObject("Adodb.Stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = "GB2312" BytesToBstr = objstream.ReadText objstream.Closeset objstream = NothingEnd functionfunction DeHttpdata(sStr,Ptrn)Dim regEx,aData,RetStr,Match ' 建立变量。 Set regEx = New RegExp ' 建立规范表达式。 regEx.IgnoreCase = False ' 设置是否区分字母的大小写。 regEx.Global = True ' 设置全程性质。 regEx.Pattern = Ptrn ' 设置模式。 Set Matches = regEx.Execute(sStr) For Each Match in Matches ' 遍历 Matches 集合 RetStr = RetStr & Replace(Match.Value,"""","") &"|" Next DeHttpData =RetStr 'sStr=regEx.Replace(sStr,"^") 'DeHttpData=sStr'(DeTextDatea(sStr,"^")) set regEx=nothingEnd function'取得汉字的拼音首个字母function getpychar(char)Dim tmp,C C=asc(char) if c<0 Then C=C+65536If c>255 Then tmp=65536+asc(char) if(tmp>=45217 and tmp<=45252) then getpychar= "A" if(tmp>=45253 and tmp<=45760) then getpychar= "B" if(tmp>=45761 and tmp<=46317) then getpychar= "C"
1 下一页