Several anti-DDoS Methods

Source: Internet
Author: User
Several anti-DDoS Methods

1) Use the findwindow API function.
You can query the window title (or/and Class Name) to determine whether the program is running. If it is found, it indicates that the program is running, and you can exit the program to achieve the effect of not repeating the operation; otherwise, it indicates that the program is running for the first time.
This method is not applicable to situations where the program title is dynamically changed and the system runs a program with the same title (or/and class name)

2) mutex/event/semaphore
Determine whether the program is running by means of mutex objects, semaphores, events, and other thread synchronization objects. The most common functions are: createmutexa (Note: QQ Hall and QQ game hall use this method to limit the opening of multiple programs)

3) file ing)
By placing program instance information in a cross-process memory ing file, you can also control multiple programs.

4) DLL global share zone
The DLL global shared area is initialized only once when it is mapped to the address space of each process. It is the first time that it is loaded by windows. Therefore, you can use the data in this area to limit the number of programs.

5) global atom
Add a specific string to the global atom table through globaladdatom. when running the program, check whether the string exists to restrict the program from opening more. (This atom will not be released automatically. You must call globaldeleteatom to release atom before exiting the program)

6) Check window properties
Add some data to the property list of the specified window through setprop. during the running of the program, enumerate the window and check whether the data exists to limit the extra opening.

The above only lists the most common methods. I don't know if there are any other methods. I have gone through ~~~~~~~~

Several anti-DDoS Methods

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.