Comments (5)
ZyrexCalculateRelativeOffset(length, (ZyanUPointer)address,
address value error.
maybe like this.
#L568
// Write opcode
ZyanU8* address = (ZyanU8*)context->destination + context->bytes_written;
ZyanUPointer ptr = (ZyanUPointer)address;
if (opcode == 0xE9)
{
*address++ = 0xE9;
} else
{
*address++ = 0x0F;
*address++ = opcode;
}
// Write relative offset
*(ZyanI32*)(address) =
ZyrexCalculateRelativeOffset(length, ptr,
instruction->absolute_target_address);
from zyan-hook-engine.
Thanks for reporting. I will have a look later. Itβs very possible that the 32-bit hooking is still off a bit because I mainly tested on 64-bit for now.
A first stable version is expected to be released in the next two weeks.
from zyan-hook-engine.
@nblog
I was not able to reproduce the problem on my local branch - but I already made some changes, so it might have been fixed in the meantime.
Probably going to push my local changes on the weekend after some cleaning.
from zyan-hook-engine.
I have tested the error still exists
The reason for the error is when you calculate the relative address
#L581 ZyrexCalculateRelativeOffset source_address = address
And you were address ++ at #L572, and #L575 #L576.
The calculated relative offset is also wrong
The correct approach should be to save the address once after #L569
// Write opcode
ZyanU8* address = (ZyanU8*)context->destination + context->bytes_written;
ZyanUPointer ptr = (ZyanUPointer)address;
if (opcode == 0xE9)
{
*address++ = 0xE9;
} else
{
*address++ = 0x0F;
*address++ = opcode;
}
// Write relative offset
*(ZyanI32*)(address) =
ZyrexCalculateRelativeOffset(length, ptr,
instruction->absolute_target_address);
from zyan-hook-engine.
Sorry I am busy with work at the moment and had no time to finish my changes. I just pushed my local progress which definitely does not have the problem you describe. Might have other issues tho .. still work in progress.
from zyan-hook-engine.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zyan-hook-engine.