欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-05-03 12:47:44
复制代码 代码如下:<% function bytes2bstr(vin,cset) dim bytesstream,stringreturn set bytesst...
复制代码 代码如下:

<%
function bytes2bstr(vin,cset)
dim bytesstream,stringreturn
set bytesstream = server.createobject("adodb.stream")
bytesstream.type = 2
bytesstream.open
bytesstream.writetext vin
bytesstream.position = 0
bytesstream.charset = cset
bytesstream.position = 2
stringreturn =bytesstream.readtext
bytesstream.close
set bytesstream = nothing
bytes2bstr = stringreturn
end function
set xmlhttp = server.createobject("msxml2.xmlhttp")
m_queryurl = "http://www.microsoft.com/china/technet/security/current.mspx"
xmlhttp.open "get", m_queryurl, false
xmlhttp.send()
s = xmlhttp.responsebody
aa = bytes2bstr(s,"gb2312")
set re = new regexp
re.pattern = "<span class=""label"">.*?<\/span>"
re.global = true
re.ignorecase = true
re.multiline = false
set matches = re.execute(aa)
dim tmp
tmp = ""
for each match in matches
tmp = tmp&match.value
next
tmp = replace(tmp,"href=""","target=_blank href=""http://www.microsoft.com")
set fso = server.createobject("scripting.filesystemobject")
set f = fso.opentextfile(server.mappath("microsoft.html"),2,true)
f.write(tmp)
f.close
set fso = nothing
response.redirect "microsoft.html"
%>