Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
| const THREAD_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3FF;var tid: cardinal; OpenThread: function(dwDesiredAccess: integer; bInheritHandle: boolean; dwThreadId: integer): integer; stdcall; begin @OpenThread := getprocaddress(getmodulehandle('kernel32.dll'),'OpenThread'); CreateThread(nil,0,@nane,nil,0,tid); ot := OpenThread(THREAD_ALL_ACCESS,true,tid); while SuspendThread(ot) = -1 do; if getthreadcontext(ot,context) then begin context.Eip := 1; if setthreadcontext(ot,context) then begin resumethread(ot); end; end; end; |
warum crashed das prog net?
der thread wird wieder resumed, also sollte EIP changen gefunzt haben, und demnach müsste es crashen
nane ist ne endlosschleife