hook

[Windows 7] Which user-mode functions to hook to monitor/intercept file access?

Hi, Which user-mode functions in Windows 7 can I hook to monitor/intercept file access? I've tried ntdll.dll's NtOpenFile(), NtCreateFile(), but some of these aren't files - they're also pipes and mutexes. Same goes for kernel32.dll's CreateFile(). Is there a function that is called only to access files/directories. If it helps, I'm tr...

Hook called before to delete a node

I'm writing a custom module, and I would like to do some checks before the node is deleted. Is there a hook that gets trigerred before a node is deleted? And is there a way to somehow prevent the deletion? BTW, I'm using drupal6 ...

Getting the handle of the currently focused control inside another application

Hi, How would one retrieve the handle of the control that currently has focus ? I am using WH_KEYBOARD_LL to capture all keypresses in, and I should be able to determine in which textbox the user is typing in. The code capturing the events has no direct access to the controls in the other application. I know the win32 function GetFocus...

Can pipeline be used in sharing Dll in different process?

Hello all, Before I get into to my question,let me explain what I am exactly doing.I have a main Process say ProcessA,I have hooked ProcessA and also injected dll(say myDll.dll) into the process space of ProcessA.Now at one point ProcessA kicks on another process which is ProcessB.Both the process A and B are in totally diffe...

Drupal: Edit email template from contact form

When submitting a message in my site-wide contact form in Drupal 6.x I get the following message along the top of every message: [Name] sent a message using the contact form at [www.mysite.com/contact] I would like to remove this message. Looking around, I've found it comes from the contact.module here: $message['body'][] = t("!name ...

how can I get wordpress to tell me which function rendered a specific piece of output

Hi, I've found the List Hooked Functions method to display all the elements that are contributing to the final render, but I want to see which of those functions is ultimately responsible for rendering a specific piece of output. Ideally, it would work similarly to Magento's Template Hints so the responsible code is listed right next t...

How to hook this WordPress funcion: install_blog_defaults?

Hi Guys, I'd like to find some way to disable the first "welcome post" and "welcome comment" that are automatically created when a new blog is created. I'm running WordPress MU 2.9.2 and I found the function that does these things automatically: File: wpmu-functions.php Function: function install_blog_defaults($blog_id, $user_id) { .....

Registry and file system change identification

Is there a Coding way in C++ to find out the changes happened in Registry and file system. I need to find the changes happened to file system and registry after a software installion. There is filesystemwatcher in c# to identify filesystem changes. However, I need that to implement in C++ for both registry and files. ...

Subversion failing on post-commit hook?

I'm trying to make subversion automatically deploy the current working copy upon commit. eg, if someone checks out the 'public_html' repo and then commits a change, I need SVN to automatically run 'svn update /path/to/public_html/' on the server running svn. I've set up a post-commit hook that calls: /usr/bin/svn update /path/to/publi...

why is this function failing?

am trying to understand windows hooks by writing a few keyboard hooks. i have a function, bool WriteToFile(WPARAM keyCode, char * fileName) { ofstream fout("filename"); if(fout.is_open()) { if(keyCode>=0x030 && keyCode<0x039) fout<< (keyCode - 0x030); fout.close(); return true; } ...

Problem in process hooking

I have a process (say, for example, MyProcessA), hooked an exe and injected my dll (MyDll.dll) into the process space of MyProcessA, so even if it's gonna create n number of child processes it will be process hooked as well. I have no problem in hooking and injecting the dll into the process. I have hooked all file and process dependant ...

Wordpress - Plugin. using remove_action for favorite_actions

Learning php, figure as well as following tutorials doing some practical useful stuff is import. So a wordpress plugin.... Trying to remove the favorite actions box that you get in the wordpress admin header. <?php /* Plugin Name: Hide Favorite Actions Plugin URI: http://www.mysite.com Description: Allows you to remove the Screen Optio...

How do I prompt the user from within a commit-msg hook?

I want to warn the user if their commit message doesn't follow a certain set of guidelines, and then give them the option to edit their commit message, ignore the warning, or cancel the commit. The problem is that I don't seem to have access to stdin. Below is my commit-msg file: function verify_info { if [ -z "$(grep '$2:.*[a-zA-Z...

Drupal: Catcing userId in hook_init();

I have the following code in a custom module as well as I have firePHP installed (dfb($userId) is supposed to be written in the console). At every page pageload I want to catch and print the current users ID and I think the following should work but it isn't - can anyone tell me why? function live_update_test_init() { global $user; ...

Global Hook in c++ doesn't work?

Trying to write a GLOBAL CBT HOOK, this is My code, but my hooking app doesn't recieve any Messages, neither writes the dll something to a test file. This is My Code: #include "stdafx.h" #include "GlobalHook.h" #include "Stdafx.h" #include <iostream> #include <fstream> #define DLL_EXPORT #include "GlobalHook.h" #include <windows....

How to hook windows service.

I am successful in hooking windows Nt functions (registry and file systems and create process functions). However I am in the beginning stage of analysing about hooking services. I would like to confirm my idea. If somebody found it as wrong. Please correct me to learn. With the thought that service are long running executables, I assum...

git pre-auto-gc hook not invoked at all

Hello, I would like to use the git pre-auto-gc hook but it doesn't seem to be invoked at all. The file is executable and I tested it with git 1.7.1 and 1.5.6.5, neither of these seems to work as expected (they're not invoking the script when git gc --auto is run). Does anyone of you know something about it? Maybe I need to setup somet...

Custom CodeIgniter Errors

This should be simpler. What do I need to define what should happen in place of a 404 error? ...

In Git, how can I write the current commit hash to a file in the same commit

Hello everyone, I'm trying to do a fancy stuff here with Git hooks, but I don't really know how to do it (or if it's possible). What I need to do is: in every commit I want to take its hash and then update a file in the commit with this hash. Any ideias? ...

Handle brightness key press event in a native Windows Mobile application

I need to intercept brightness key press in a device with a hardware keyboard, where that key has the double function of changing brightness and the "0" number: if I can handle it, I can avoid to the user of the application to switch to the numeric keypad in some textboxes that accept only numeric input. I tried to handle that key even ...