Use ASP to get Microsoft Security Update List code thief/Thief/Collect

Source: Internet
Author: User
Copy Code code as follows:

<%
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 the 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"
%>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.