Plugin download ┊ Spam reference Defense patch (automatically change key every hour, support static page) _ Application Tips

Source: Internet
Author: User
Tags chr decrypt xsl
Publisher: Wizard
Patch name: Spam Reference Defense patch
Release time: 2007-1-4
Version number: 3rd Edition
Applicable version: Pjblog 2.6
Original Author: Wizard
Demo Address: http://www.hljsh.com/
Download Address: http://bbs.pjhome.net/attachment.php?aid=2143
Introduction to Plug-ins: can effectively prevent garbage references. Encrypted submit address, 2nd edition to add key verification, and automatically replace key every hour.
This version does not modify the database, only 4 files are modified and static page mode is supported!

Effect
Trackback Address: trackback.asp?tbid=jnkrqof8&key=joknpnkoqpmppmc0

The specific installation method is as follows:

===========================================================
File trackback.asp
Find
Tbid = Checkstr (Request.QueryString ("Tbid"))
Replace into
Tbid = Decrypt (Checkstr (Request.QueryString ("Tbid"))

Find
If Not (Isinteger (Request.QueryString ("Tbid")) and Isinteger (Request.QueryString ("Logid")) Then
Replace into
If not Isinteger (Decrypt (Request.QueryString ("Tbid"))) and Isinteger (Request.QueryString ("Logid")) Then

Find
Where blog_id= "&logID&" and Tb_id= &checkstr (Request.QueryString ("Tbid"))
Replace into
Where blog_id= "&logID&" and Tb_id= &decrypt (Checkstr (Request.QueryString ("Tbid"))
* * There are 2 places



Find
'==================================
' Trackback processing page
' Update Time: 2006-6-1
'==================================
Join in below


Dim keys,keys1
Keys=request.querystring ("key")
Keys1=encrypt ((now) & (Month (now)) & (Today) &hour (now))
If Keys<>keys1 Then
Response.c
Response.Write "<?xml version=" "1.0" "encoding=" "UTF-8" "><?xml-stylesheet type=" "text/xsl" "href=" "tb.xsl "" "?>"
%>
<response><error>1</error><message> The information you submitted has expired. Please check ...</message></response>
<%
Else


Dim strget
Strget=trim (Request.QueryString ("Tbid"))
If Len (strget) > 8 Then
Response.c
Response.Write "<?xml version=" "1.0" "encoding=" "UTF-8" "><?xml-stylesheet type=" "text/xsl" "href=" "tb.xsl "" "?>"
%>
<response><error>1</error><message> The information you submitted has been wrong. Please check ...</message></response>
<%
Else

Dim tbids
Tbids = Decrypt (Checkstr (Request.QueryString ("Tbid"))

If Tbids < 1 Then
Response.c
Response.Write "<?xml version=" "1.0" "encoding=" "UTF-8" "><?xml-stylesheet type=" "text/xsl" "href=" "tb.xsl "" "?>"
%>
<response><error>1</error><message> The information you submitted has been wrong. Please check ...</message></response>
<%
Else

Find
' Trackback response function added above
End If
End If
End If


Can not change ***********
Find
Response.Redirect ("Search.asp?searchtype=trackback")
Replace into
Response.c
Response.Write "<?xml version=" "1.0" "encoding=" "UTF-8" "><?xml-stylesheet type=" "text/xsl" "href=" "tb.xsl "" "?>"
%>
<response><error>1</error><message> Log ID error. Please check ......</message></response>
<%
Find
<response><error>1</error><message> log is not referenced .</message></response>
Replace into
The <response><error>1</error><message> log (id=<% Response.Write tbid%>) is not referenced. </ Message></response>

Can not change ***********



===========================================================
File class\cls_article.asp
Find
Trackback address: <a href= "<%= (siteurl&" trackback.asp?tbid= "&id)%>" target= "_blank" ><%= (SiteURL& "Trackback.asp?tbid=" &id)%></a>
Replace into
Trackback address: <a href= "<%= (siteurl&" trackback.asp?tbid= "&encrypt (ID) &" &key= "&encrypt ( Now) & (Month (now)) & (Today) &hour (now))%> "target=" _blank "><%=" (siteurl& " Trackback.asp?tbid= "&encrypt (ID) &" &key= "&encrypt ((now) & (Month (now)) & (Today) &hour (now ()))%></a>
Find
Sub Showcomm (logid,comdesc,discomment)
Add the following
Dim K1
K1=encrypt ((now) & (Month (now)) & (Today) &hour (now))
Find
href= "" Trackback.asp?action=deltb&tbid= "&commarr (6,pcount) &" &logid= "&LogID&" "
Replace into
href= "" Trackback.asp?action=deltb&tbid= "&encrypt (Commarr (6,pcount)) &" &logid= "&LogID&" &key= "&k1&" ""

Find
Temparticle=replace (Temparticle, "<" & "%st (A)%" & ">", "")
Replace into
Dim K1
K1=encrypt ((now) & (Month (now)) & (Today) &hour (now))
Temparticle=replace (Temparticle, "<" & "%st (A)%" & ">", "")
Temparticle=replace (Temparticle, "<" & "%st (KEY)%" & ">", K1) ========================================= ==================
File class\cls_logaction.asp
Find
Temp1=replace (TEMP1, "< $trackback $>",siteurl& "trackback.asp?tbid=" &logid)
Replace into
Temp1=replace (TEMP1, "< $trackback $>",siteurl& "trackback.asp?tbid=" &encrypt (logid) & "&key=" & "<" & "%st (KEY)%" & ">") ===========================================================
File common\function.asp
Add on top of file last,%>

Function Encrypt (Thenumber)
On Error Resume Next
Dim N, Szenc, T, HiN, LoN, I
n = CDBL ((thenumber + 1570) ^ 2-7 * (Thenumber + 1570)-450)
If N < 0 Then Szenc = "R" Else szenc = "J"
n = CStr (ABS (n))
For i = 1 to Len (n) Step 2
t = Mid (n, I, 2)
If Len (t) = 1 Then
Szenc = Szenc & T
Exit for
End If
HiN = (CInt (t) and 240)/16
LoN = CInt (t) and 15
Szenc = Szenc & CHR (ASC ("M") + HiN) & CHR (ASC ("C") + LoN)
Next
Encrypt = Szenc
End Function


Function Decrypt (Thenumber)
On Error Resume Next
Dim e, N, sign, T, HiN, LoN, newn, I
E = Thenumber
If left (e, 1) = "R" Then sign =-1 Else sign = 1
E = Mid (E, 2)
newn = ""
For i = 1 to Len (e) Step 2
t = Mid (E, I, 2)
If ASC (T) >= ASC ("0") and ASC (T) <= ASC ("9") Then
newn = newn & T
Exit for
End If
HiN = Mid (t, 1, 1)
LoN = Mid (T, 2, 1)
HiN = (ASC (HiN)-ASC ("M")) * 16
LoN = ASC (LoN)-ASC ("C")
t = CStr (HiN or LoN)
If Len (t) = 1 Then t = "0" & T
newn = newn & T
Next
E = CDBL (newn) * Sign
Decrypt = CLng ((7 + SQR (49-4 * ( -450-E)))/2-1570)
End Function
================================================
Demo to my blog to see. My network is very slow. Please endure.
Users who have not modified these 4 files can download the overlay below.
================================================
The need to use a static page to the background of the new build all diaries.
I don't know what's wrong with that. I hope everyone will enthusiastically test and shoot bricks.
Click to download this file

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.