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!
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
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>
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
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.