Re: Need a jump opcode generator.
- From: "Skybuck Flying" <spam@xxxxxxxxxxx>
- Date: Fri, 27 Jul 2007 10:58:26 +0200
"Skybuck Flying" <spam@xxxxxxxxxxx> wrote in message
news:f8cbs7$nnu$1@xxxxxxxxxxxxxxxxxxxxxxxxxx
// vSendTo points to sendto function in winsuck 2 ;)
byte( pointer(vSendTo)^ ) := $FF;
Ok, just tested it.
The statement above causes the application to crash.
Me wonders why and investigates...
Also tried:
byte( vSendTo^ ) := $FF;
Oh I see what the problem is...
I did set access rights for the "Stub"
But forget to set access/readwrite rights for the "winsock 2" part.
No problem.
There that should work quite nicely:
var
OldProtect : longword;
if VirtualProtect( vSendTo, 5, PAGE_EXECUTE_READWRITE, OldProtect ) then
begin
writeln('Virtual protect, set execute/read/write for winsock2 sendto
first 5 bytes succeeded.');
end else
begin
writeln('Virtual protect, set execute/read/write for winsock2 sendto
first 5 bytes failed.');
end;
Bye,
Skybuck.
.
- Follow-Ups:
- Re: Need a jump opcode generator.
- From: Skybuck Flying
- Re: Need a jump opcode generator.
- References:
- Need a jump opcode generator.
- From: Skybuck Flying
- Re: Need a jump opcode generator.
- From: Skybuck Flying
- Re: Need a jump opcode generator.
- From: Skybuck Flying
- Need a jump opcode generator.
- Prev by Date: Re: Need a jump opcode generator.
- Next by Date: Re: Need a jump opcode generator.
- Previous by thread: Re: Need a jump opcode generator.
- Next by thread: Re: Need a jump opcode generator.
- Index(es):