Spam comment analysis and countermeasure code on blogs

Source: Internet
Author: User

Preface:

A code segment has been written to temporarily filter out spam comments, but the code insertion format is incorrect,
Garbled characters may occur and Time may change. due to physical reasons, the time for accessing the Internet is too small.
(Write logs 30 minutes a day), FTP connection is also slow, so it will not be modified for a period of time,
Thank you for your cooperation.

Recently I found that someone in my BLOG actually uses robot)
Post comments and comments, and these comments contain illegal or unhealthy content,
Seriously damaging my website image. These things are hard to prevent ~~
Please do not click harmful information at will, and I try to clear such junk information at any time.

I can't stand TMD's boring advertising software ~~
For how these software bypasses L-BLOG validation,
I don't know here, but you have attacks, and I have defenses,
In fact, you only need to analyze the rule of spam comments published by the software,
You can use your own ideas (methods) to write a small program to block him.
If you want to get it, you can do it ~~~

I have analyzed the spam robot as follows,
First of all, he must have a huge database. Here he collects many BLOG URLs,
Then they used their methods to bypass the BLOG verification mechanism,
The mark of successful comments is to register an account with a random name, and then analyze the verification code.
(Actually, it is the reverse engineering of the Verification Code). Spam comments will be sent after the breakthrough,
The content is really designed for the UBB syntax. It's really worth noting that these spammers, BS ~~

After analysis, I used my methods to stop it,
You may have a better way to share it with me ~~
For the above analysis, we can first note the comment section.
For reference, I have no spam status here,
So I didn't take any action on him. Shielding principle,
Visitors/netizens are required to select whether to submit the information one more time.
Using form judgment, I use single-choice name = robot_shit value = 0 to indicate passing,
Value = 1 indicates that it cannot pass. OK,
Let's write a program ~~~

In the past two days,
I have been thinking about how robots work.
After N tests, it was found that he indeed deciphered the verification code mechanism of the L-BLOG.
So the fundamental solution is the verification code program.
So we have to work hard on the verification code program.

Because the L-BLOG verification code program is universal,
It is easy to decrypt, so we must increase the complexity of the verification code program.
Number + letter, 4 digits or 6 digits, uppercase or lowercase letters ...... Wait,
After these considerations, the core is the number of vertices, random numbers, locations,
And foreground and background color. OK, basically after consideration,
We are looking for verification code programs for some well-known websites on the Internet,
I am using the verification code program of DVBBS,
Of course, you need to modify the part to facilitate the combination of the BLOG.
At present, the program uses a pure 4-digit verification. If the effect is not good, I think the complexity should be increased.

My code has been written, but it is not mature yet. Or a sentence,
Use Time to test and wait for the official effect. If the result is successful
I am telling you how to modify the specific program to solve your coal-burning problem.
After several days of testing, I think it can be released,
Let's take a look. It should have some effect!

Comments:
Open the blogcomm. asp file and find the following program


CODE:
Program code:

IF IsInteger (blog_ID) = False Then
Msg_Title = "error"
Msg_Content = "<a href =" "javascript: history. go (-1);" "> parameter error. Click back to previous page </a>"

Add programs under him

Program code:
ElseIf Trim (Request. Form ("robot_shit") = Empty Or Trim (Request. Form ("robot_shit") <> 0 Then
Msg_Title = "error"
Msg_Content = "<a href =" "javascript: history. go (-1); ""> Please make sure you have completed (to prevent robot) and click back to the previous page </a>"

Save the blogcomm. asp file, open blogview. asp, and find the following program:

Program code:
</Tr>
</Table> <iframe border = "0" frameBorder = "0" frameSpacing = "0" height = "21" marginHeight = "0" marginWidth = "0" noResize scrolling =" no "width =" 100% "vspale =" 0 "src =" attachment. asp "> </iframe> </td>
</Tr>

Add the following code below:

Program code:
<Tr align = "center">
<Td colspan = "2" nowrap bgcolor = "# FFFFFF"> <font color = "# FF0000"> <strong> determine whether to submit information again (prevent robot spam comments, </strong> </font> <br>
<Input type = "radio" name = "robot_shit" value = "0">
Yes, I have filled it out.
<Input name = "robot_shit" type = "radio" value = "1" checked>
Don't submit in a hurry, waiting for sorting </td>
</Tr>

[Copy to clipboard]

OK. In this case, the comments are also put into epidemic prevention.

OK, success ~~ Let's take a look at the actual effect of my BLOG ~~

You will understand it.

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.