hook

How to handle hooked WSARecv

痴心易碎 提交于 2021-01-27 18:17:47
问题 I'm working on a project that involves hooking WSARecv . I know how to hook this function, I mean its just the same as hooking another function. Anyway the hard part is when WSARecv is used to perform overlapped operations. The idea is that when an application receives data to intercept that and be possible to modify this, I'm using pipes for this. The native DLL tunnels all data to a managed 'server'. This processes the input etc and returns it back to the native DLL. This works great for

Hooking an App made on MSVC++ with __fastcall enabled from an injected Delphi dll

可紊 提交于 2021-01-27 14:37:26
问题 I am trying to hook a function within a application compiled with microsoft visual studio 2010, with __fastcall enabled from a delphi 2010 dll, but I am not to skilled to figure out how to detour the following problem: The C++ function is: void __fastcall function(int arg1; char* arg2); I was trying something like that (using uallHook): var FTextMessage : procedure(Modo: integer; Msg: pchar); register; procedure onTextMessage(Modo: integer; Msg: pchar); register; begin ShowMessage(inttostr

Hook ZwCreateSection(), CreateProcess() and CreateProcessEx() using mhook to block certain application from launching

只谈情不闲聊 提交于 2021-01-25 21:19:15
问题 I am trying to use mhook to create a global hook on CreateProcess(), CreateProcessEx() or ZwCreateSection() so that i can block certain application from launching. I followed the steps provided at https://www.apriorit.com/dev-blog/160-apihooks. But it doesn't seems to work. Is it even possible and if yes please provide any suggestion. I tried the following code to log every process creation using CreateProcess(). #include "stdafx.h" #include<fstream> #include "mhook/mhook-lib/mhook.h" typedef

Hook ZwCreateSection(), CreateProcess() and CreateProcessEx() using mhook to block certain application from launching

我只是一个虾纸丫 提交于 2021-01-25 21:17:42
问题 I am trying to use mhook to create a global hook on CreateProcess(), CreateProcessEx() or ZwCreateSection() so that i can block certain application from launching. I followed the steps provided at https://www.apriorit.com/dev-blog/160-apihooks. But it doesn't seems to work. Is it even possible and if yes please provide any suggestion. I tried the following code to log every process creation using CreateProcess(). #include "stdafx.h" #include<fstream> #include "mhook/mhook-lib/mhook.h" typedef

Hook ZwCreateSection(), CreateProcess() and CreateProcessEx() using mhook to block certain application from launching

戏子无情 提交于 2021-01-25 21:17:37
问题 I am trying to use mhook to create a global hook on CreateProcess(), CreateProcessEx() or ZwCreateSection() so that i can block certain application from launching. I followed the steps provided at https://www.apriorit.com/dev-blog/160-apihooks. But it doesn't seems to work. Is it even possible and if yes please provide any suggestion. I tried the following code to log every process creation using CreateProcess(). #include "stdafx.h" #include<fstream> #include "mhook/mhook-lib/mhook.h" typedef

CallWndProc Example

给你一囗甜甜゛ 提交于 2021-01-05 11:20:44
问题 This is my first time experimenting with hooks . I'm looking for some good resources for implementing a CallWndProc hook . The MSDN stuff is a bit overwhelming. I have discovered that with this type of hook a external dll needs to be injected. That's mainly where I'm stuck. Not sure what needs to be in the dll and what needs to be in the .NET app. Any dll examples? 回答1: You cannot write a WH_CALLWNDPROC hook in a managed language like C#. So you need more than just an external DLL, you need

CallWndProc Example

北城以北 提交于 2021-01-05 11:18:42
问题 This is my first time experimenting with hooks . I'm looking for some good resources for implementing a CallWndProc hook . The MSDN stuff is a bit overwhelming. I have discovered that with this type of hook a external dll needs to be injected. That's mainly where I'm stuck. Not sure what needs to be in the dll and what needs to be in the .NET app. Any dll examples? 回答1: You cannot write a WH_CALLWNDPROC hook in a managed language like C#. So you need more than just an external DLL, you need

SpecFlow - Retry failed tests

杀马特。学长 韩版系。学妹 提交于 2020-12-29 12:48:49
问题 Is there a way to implement an AfterScenario hook to re-run the current test in case of Fail? Something like this: [AfterScenario("retry")] public void Retry() { if (ScenarioContext.Current.TestError != null) { // ? } } Note : The tests in my project are combined in Ordered tests and executed via MsTest . 回答1: The purpose of Specflow scenarios is to assert that a system is behaving as expected. If some temporal issue causes the test to fail, then getting the test to re-run and "hoping for the

Wordpress: rename Toolbar link

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-15 06:44:37
问题 I need to rename a Toolbar link, take a look at the capture to see what I mean. I found this line of code to remove a link $wp_adminbar->remove_node('wp-logo'); But nothing to 'rename'. 回答1: From this question How rename a plugin title > Wordpress > Dashboard You may use the gettext WordPress filter to achieve rename your menu in your plugin or theme functions.php file: function my_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Copy to a new draft' :