Obtaining DLL encrypted news content with ASP

Source: Internet
Author: User
Tags chr

Here's the code:
<%
On Error Resume Next
Dim objXmlHttp, XML
Set XML = Server.CreateObject ("Microsoft.XMLHTTP")
Xml. Open "Get", "http://chanye.finance.sina.com.cn/yj/2005-01-05/236914.shtml", False
Xml. Send
Tmpstr= Xml.responsetext
EP=CLNG (InStr (1,tmpstr, "Meta_data2")) +18
Tmpstr=replace (Tmpstr,vbcrlf, "")
Tmpstr=replace (TMPSTR,CHR (9), "")
Tmpstr=replace (TMPSTR,CHR (32), "")
Mydata=mid (TMPSTR,1,EP)
Recfilen=server. MapPath ("Tempstr.txt")
Set Astream=server.createobject ("ADODB.stream")
astream.type=2
Astream.mode = 3
Astream.open
Astream.charset = "GB2312"
Astream.position =0
Astream.writetext mydata,1
Astream.savetofile recfilen,2
Astream.close
Set Astream1=server.createobject ("ADODB.stream")
astream1.type=2
Astream1.mode = 3
Astream1.charset = "GB2312"
Astream1.open
Astream1.loadfromfile (Recfilen)
Assp=astream1.size
Crttmpstr=astream1.readtext (ASSP)
Astream1.close
SP1=CLNG (InStr (1,crttmpstr, "meta_data1")) +16
EP1=CLNG (InStr (Sp1,crttmpstr, "Name=meta_data2"))-7
Lth1=ep1-sp1
Newdata=mid (CRTTMPSTR,SP1,LTH1)
%>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style>
body{
font-size:12px
}
td{
font-size:12px
}
</style>
<title> using ASP to obtain DLL encryption news content </title>
<table width= "540" border= "0" align= "center" cellpadding= "0" cellspacing= "0" >
<tr>
<td> Update Time: <%=now%> get content length: <%=lth1%>
Bytes
Note to useHttp://127.0.0.1/Ip1HtmlView.dllYou have to download the DLL file first, how to say it without more?!
<object Id=htmlip1view codebase=http://127.0.0.1/ip1htmlview.dll#version=1,0,1,14 Classid=CLSID:D 854fc15-d3ea-496a-b2a0-a772a3de1d09>
<param name= "meta_data1" value= "<%=newdata%>" >
<param name= "Meta_data2" value= "" >
<param name= "meta_data3" value= "" >
<param name= "meta_data4" value= "" >
<param name= "Meta_data5" value= "" >
<param name= "meta_data6" value= "" >
<param name= "Meta_data7" value= "" >
<param name= "Meta_data8" value= "" >
<param name= "BaseURL" value= ">"
<param name= "random" value= ">"
</object></td>
</tr>

</table>

</body>

Description of the code: The reason for the use of ADODB.stream, because the content is not always achieve the desired effect, the position of EP is always much longer than expected, and I tried to use INSTRB,MIDB and other functions are also confusing results, so helpless under this unwise, Also hope master advice (ouch, how do I feel the acid does not slip the OH). Of course, only for the current location is valid, the other appropriate modification on the line, or even directly generate the page, and record to the database, become their own, with the above things to write a database should be enough.
It is not difficult to prevent the DLL from being downloaded, and for IIS to be an ISAPI extension with a. dll, the executable file can optionally be restricted to "null" by the action of a DLL file (anything, anyway, random input is OK.) )。 If the DLL does not work for the outside station, it is afraid to talk nonsense. Prevent the news from being stolen against a method like this, check request. ServerVariables ("Http_referer") is not the site to coax out on it.
In addition, because I did not graduate from college, but also learn iron, so there must be a lot of rubbish place, please do not hesitate, thank you.



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.