C++ Function to Find Offset of 'bhyyinfo' String in Buffer
This function searches for the offset of the 'bhyyinfo' string in a given buffer. It returns the offset of the first character after the string, which is assumed to be the start of the online information. If the string is not found, it returns 0.
DWORD GetOffset(PBYTE buff)
{
for (size_t i = 0; i < 1000 ; i++)
{
if (buff[i] == 'b' && buff[i+1] == 'h' && buff[i + 2] == 'y' && buff[i + 3] == 'y' && buff[i + 4] == 'i' && buff[i + 5] == 'n' && buff[i + 6] == 'f' && buff[i + 7] == 'o')
{
return i + 8;
}
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/mDCB 著作权归作者所有。请勿转载和采集!