Software protection kills crack related processes

Source: Internet
Author: User
Tags exit integer thread visual studio
Process software protection kills crack related processes

     
Banhai (Sunhai)

Development tools: Microsoft Visual Studio. NET 2003
Operating system: Windows XP



The three timeless themes of program development are:
I. The function and originality of the procedure
Two. The promotion of the procedure
Three. Protection of procedures
  
In theory, there is no program that cannot be crack. The so-called crack, just increase the difficulty of crack.



Managing processes with process classes

The Process class provides access to local and remote processes and enables you to start and stop local system processes.

The process component provides access to processes that are running on the computer. In the shortest possible way, the process is the currently running application. A thread is the basic unit that the operating system assigns processor time to. The thread can execute any part of the process, including the part currently performed by another thread.

The Process component is a useful tool for tasks such as starting, stopping, controlling, and monitoring applications. Using the process component, you can get a list of currently running processes, or start a new process. Process components are used to access system processes. After you initialize the process component, you can use it to get information about the currently running process. Such information includes line Cheng, loaded modules (. dll and. exe files), and performance information, such as the amount of memory currently used by the process.

If you declare a path variable in quotation marks in a system, you must fully qualify the path when you start any process in that location. Otherwise, the path will not be found by the system. For example, if C:\mypath is not in your path, and you use quotes to add it (path =%path%; C:\mypath "), you must fully qualify any processes in the c:\mypath when they are started.

The process component gets information about a set of properties at the same time. When the Process component obtains information about a member of any group, it caches the values of other properties in the group, and does not get new information about other members of the group until you call the Refresh method. Therefore, it is not guaranteed that the property value is newer than the last call to the Refresh method. The group subdivision is related to the operating system.

The system process is uniquely identified on the system by its process identifier. As with many Windows resources, processes are identified by their handles, and handles may not be unique on the computer. A handle is a generic term that represents a resource identifier. The operating system retains the process handle, which is accessed through the Handle property of the process component, even if the process has exited. Therefore, you can get management information for the process, such as exitcode (usually, or zero for success, or not 0 error codes) and Exittime. Handles are very valuable resources, so handle leaks are more harmful than memory leaks.
   


Automatically stop crack related processes

We can use process class detection processes to find crack related processes, that is, to make appropriate measures. For example, stop crack related processes, exit the software, give a warning, turn the official version into a trial version ... (Don't tell me you're going to call Format D:).

There are two ways to use the process component to stop processes. Which method to use depends on the type of process that is stopped:

If the process has a graphical user interface, call the CloseMainWindow method. This method sends a shutdown request to the main window of the process with the same behavior as selecting the Close command from the user interface. Use this method to give the target program an opportunity to prompt the user to save any unsaved data in the cleanup operation.
If the process does not have a user interface, call the Kill method. Warning calling the Kill method stops the process immediately without prompting to save the changed data. Any data that is not saved will be lost.
I divide the crack related process into four categories:
Reverse Compile
Track debugging
Monitoring
Other

Only the real crack master really know how to prevent crack. We first need to know the common crack related software and its process name, especially. net of crack related software. I do not know crack, here is only a list of some of the things I have mastered, I hope that we complement each other to improve.

This mainly uses the Process.mainwindowtitle property to get the main window title of the process.

[Visual Basic] Public ReadOnly Property MainWindowTitle as String
  
The process has a main window associated with it only if the process has a graphical interface. If the associated process does not have a main window (and thus Mainwindowhandle is 0), the MainWindowTitle is an empty string (""). If you have just started a process and want to use its main window title, consider using the WaitForInputIdle method to make the process complete, ensuring that the main window handle is created. Otherwise, the system throws an exception.
Windows 98 Platform Description: If Processstartinfo.useshellexecute is set to True when the process is started, this property is not available on this platform.

Private Sub Close ()

Dim pprocess () as Process
Pprocess = process.getprocesses () ' Get all current processes
Dim all as Integer
Dim myarray () as String = _
{"Assembly View", "Anakrino", "Borg", "Pebrowse", "Processdasm", "Virtualcode", "Dasm", "IDA", _
"Frogsice", "Driverworkbench", "ollydbg", "TWX", "TRW", "SoftICE", "Ntice", "Sice", _
"API Monitor", "Apihooks", "APIs", "Api-log", "Apispy", "Exespy", "File Monitor", "Registrymonitor", "Memorymonitor", " Regmon "," Regshot "," Regsnap "," Regspy "," Res Spy ", _
"Crack", "crack", "SN", "SN"}

For all = 0 to Pprocess.length ()-1
For Kill as Integer = 0 to Myarray.length-1
If InStr (pprocess (All). MainWindowTitle, MyArray (Kill). ToString) Then
Pprocess (All). Kill () ' kills crack related process
End ' exit software. You can also add other measures here.
' MsgBox (pprocess (All). MainWindowTitle)
End If
Next
Next



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.