-
-
[求助]再次向大家请教一个问题
-
发表于:
2008-4-13 16:21
4023
-
跟刚才请教的拿个问题差不多,晕,,,,,,
PCSTR Ntdll_Func_Name[320];------------------>>>>>关键一,全局
VOID ListNtdllFunction(IN PVOID Addr)
{
HANDLE hMod;
IMAGE_DOS_HEADER * dosheader;
IMAGE_OPTIONAL_HEADER * opthdr;
PIMAGE_EXPORT_DIRECTORY exports;
ULONG addr, i;
PUCHAR pFuncName = NULL;
PULONG pAddressOfNames;
hMod=Addr;
dosheader = (IMAGE_DOS_HEADER *)hMod;
opthdr =(IMAGE_OPTIONAL_HEADER *) ((BYTE*)hMod+dosheader->e_lfanew+24);
exports = (PIMAGE_EXPORT_DIRECTORY)((BYTE*)dosheader+ opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
pAddressOfNames=(ULONG*)((BYTE*)hMod+exports->AddressOfNames);
for (i = 0; i < exports->NumberOfNames; i++)
{
int u=0;
pFuncName = (PUCHAR)( (BYTE*)hMod + pAddressOfNames[i]);
if ( 'N' == pFuncName[0] && 't' == pFuncName[1] )
{
Ntdll_Func_Name
=pFuncName;
DbgPrint(" %s \n",Ntdll_Func_Name);---------->>>>关键二.输出正常
u++;
}
}
DbgPrint(" %s \n",Ntdll_Func_Name[1]);-------->>>>问题:输出是NULL,为什么??
}
今天被此类问题搞晕了,以前好像没遇到过....菜啊!!!!!
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)