Discuz教程网

用asp获取微软安全更新列表的代码 小偷程序

[复制链接]
authicon dly 发表于 2011-9-10 21:49:35 | 显示全部楼层 |阅读模式
  1. <%
  2. Function Bytes2bStr(vin,cSet)
  3. Dim BytesStream,StringReturn
  4. Set BytesStream = Server.CreateObject("ADODB.Stream")
  5. BytesStream.Type = 2
  6. BytesStream.Open
  7. BytesStream.WriteText vin
  8. BytesStream.Position = 0
  9. BytesStream.CharSet = cSet
  10. BytesStream.Position = 2
  11. StringReturn =BytesStream.ReadText
  12. BytesStream.close
  13. Set BytesStream = Nothing
  14. Bytes2bStr = StringReturn
  15. End Function
  16. Set xmlhttp = server.CreateObject("Msxml2.XMLHTTP")
  17. m_queryURL = "http://www.microsoft.com/china/technet/security/current.mspx"
  18. XMLHTTP.Open "GET", m_queryURL, false
  19. XMLHTTP.send()
  20. s = XMLHTTP.responseBody
  21. aa = Bytes2bStr(s,"GB2312")
  22. Set re = New RegExp
  23. re.Pattern = "<span class=""label"">.*?<\/span>"
  24. re.Global = True
  25. re.IgnoreCase = true
  26. re.MultiLine = false
  27. set matches = re.Execute(aa)
  28. dim tmp
  29. tmp = ""
  30. for each match in matches
  31. tmp = tmp&match.value
  32. next
  33. tmp = Replace(tmp,"href=""","target=_blank href=""http://www.microsoft.com")
  34. set fso = server.CreateObject("scripting.filesystemobject")
  35. set f = fso.OpenTextFile(server.mappath("Microsoft.html"),2,true)
  36. f.write(tmp)
  37. f.close
  38. set fso = nothing
  39. response.Redirect "Microsoft.html"
  40. %>
复制代码



上一篇:rs.open sql,conn,1,1与rs.open sql,conn,1.3还有rs.open sql,conn,3,2区别
下一篇:asp中的rs.open与conn.execute的区别说明
authicon 微博评论 发表于 2011-9-11 15:12:53 | 显示全部楼层
[糖果]

]https://www.discuz.1314study.com/xwb/images/bgimg/icon_logo.png[/img] 来自 南海通 的新浪微博
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 12:17

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表