PHP plug-in technology-plug-in Hook (hooks) analysis recently prepared for an open-source personal blog system, because the plug-in function needs to be added in the idea, so we have studied the implementation of the plug-in function.
According to my own understanding, the function of the plug-in is to add and improve the functions of existing programs. The plug-in should be connected to the interfaces provided by the program, then, modify the progr
Program Introduction:
Use this program:
1. You can monitor the program running on your computer and record the time and name of the program that was running on your computer;
2. You can prevent the execution of programs that you specify, such as not to play games.
3. This program needs to be added to the registry to run when the system is started, to achieve the purpose of monitoring. The registry probably is not unfamiliar, is here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
will not be passed to the application (or the next hook) if (!strcmp (p+1,def_process_name)) {//When I run the WIN10 64-bit machine
, it is easy to find that the target process card//live, do not know what the reason, and the XP 32 bit does not have this phenomenon printf ("Notepad keyboard message has been intercepted \ n");
return 1; }}//If not Notepad.exe, call the CallNextHookEx () function, pass the message to the application or the next hook returnNexthookex (G_hhook,n
There are many related articles on the Internet, for specific reference:
The basic method of adding hooks is explained by Getuid, printf and other functions:
Http://blog.chinaunix.net/u/9577/showart_1195703.html
If you want to not only replace the original library functions, but also want to eventually pass the function logic to the original system functions, then you may need to use Rtld_next. The system may indicate that Rtld_next is undefined and
is very simple, receive notification, but I just let git submit notes to fill out the update, to write the intermediate file, so that you can control the Web updates,2. Python script: Python #!/usr/bin/python2.6#coding =utf-8Import OSImport timedir = '/data/www/www.111cn.net/'File = '/data/log/git.log 'Nowfile = OS.GETCWD () + "/" +__file__Stime = Os.stat (nowfile). St_mtime#修改时间变化退出While stime = = Os.stat (nowfile). St_mtime:Log = Os.popen ("Cat" +
The apache user has the execution permission to use sudo-uapachmcm on the server... amp; gitpull can also pull updates, but there is a problem during Web access when the version library is the latest, you can get the command execution result Alreadyup-to-date... the apache user has the corresponding execution permission.
Use on the server
Sudo-u apache cd... git pullYou can also pull updates.
However, a problem occurs during
// keyboard hook Message Processing Process lresult callback debugproc (INT ncode, wparam, lparam) { If (ncode = hc_action) { pdebughookinfo = (pdebughookinfo) lparam; switch (wparam) { case wh_keyboard: case wh_mouse: { // If the hook is not
]# lsindex.php test.txt2. Automatic Update via script fileAutomatically check out files from SVN in real time and sync to Web site root using SVN post-commit implementation[email protected] ~]# cd/opt/svn/repo/[[email protected] repo]# lsConf db format Hooks Locks README.txt[email protected] repo]# CD hooks/[email protected]
By: Achillis
Analysis of the Hook of 360, through the direct hook kifastcallentry to achieve the filtering of all system calls.The version I analyzed is as follows:Main program version: 6.0.1.1003Hookport.sys version: 1, 0, 0, 1005Hookport.sys's
//************************************** ********************************
// Version: V1.0
// Coder: wineggdrop
// Date release: NULL
// Purpose: hookless keylogger
// Test Platform: Win 2 K Pro and Server SP4
// Compiled on: KP 3.0, may compile on
There are many examples on the Internet for self-painting of common menus, but there are few examples of self-painting of system menus. Hook is used mainly, use a revolutionary new approach to custom drawn menus
Using system; using system. collections. generic; using system. reflection; using system. runtime. interopservices; using system. text; using system. windows. forms; namespace ICs. common {/// /// this class allows you to get all keyboard or mouse
After reading the principle of detour, I thought about whether I could simulate one.
Some details were found during the comparison. Detour replaces the first few bytes of the function (five bytes when reading the document) with jmp __
. But does
Each program has its own living space, in the Windows system you can at any time to allow your program to perform some operations, but also trigger the message, the trigger message is divided into three, one is to operate the interface of your
In writing a small program, encountered such a problem, need to use a delegate to hook up the event, but want to use the local variables in this event, and once the delegate has been defined, the hook will not be able to add additional formal
When editing a document in Word, we may need to enter a box with a hook. In Word2010, there are three ways to enter a box with a hook.
Method One
Click "Insert → symbol → other symbol" To open the symbol window, select "Math Operator" at
Want to submit code locally to the SVN server while synchronizing the code of the test serverPHP files that run the server using SVN hooksThe code is as follows:PHPHeader("content-type:text/html; Charset=utf-8
using System; using System.Windows.Forms; using System.Runtime.InteropServices; Namespace Hotelmanage { Public partial class Form1:form { Public Form1 () { InitializeCom Ponent (); } void Hook_onmousechange (object sender, EventArgs e) {
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.