So I am trying to check if a string is within a 'block' of memory. So here is a made up memory address 0x00343211
where I start and want to start checking from.
What I am trying to do is write the data from 0x00343211
to 0x00343211 + 900
into a char array and then check if within that char array there is a string that I am looking for.
So this is what I have tried already
char dataBuf[1000] = { 0 };
memcpy((void*)dataBuf,(void*)0x00343211,900);
if(strstr(dataBuf,"ACTIVE") != NULL)
{
//I want to check if the string "ACTIVE" is
//within the random data that I have written into dataBuf
}
But this does not seem to be working.