forked from Coldzer0/Coldhook
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDISASM.lpr
More file actions
33 lines (28 loc) · 682 Bytes
/
DISASM.lpr
File metadata and controls
33 lines (28 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
program DISASSM;
{$mode Delphi}{$H+}
{$IFDEF UNIX}
{$define UseCThreads}
{$ENDIF}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes,sysutils,machapi,hookutils
{ you can add units after this };
var
// ptr : Pointer;
PID : integer;
port : mach_port_name_t;
begin
PID := 0;
port := 0;
if task_for_pid(mach_task_self,2756,port) = KERN_SUCCESS then
begin
writeln('Port : ',port);
if task_resume(port) = KERN_SUCCESS then
writeln('task_resume ok');
end
else
writeln('Error : ', GetLastOSError);
writeln('======================================================' );
end.