|
|
|
[求助]CreateFile运行后第一个参数怎么变了
果然可以,现在读入输出都正常了。 1.现在还不明白就是为什么执行CreateFile后会跳到HeapFree。 2.顺便问下,执行CreateRemoteThrea()注入dll后,是不是不能用WaitForSignalObject() 啊。用上之后,目标会无响应,不用就正常了。不知道是怎么回事。 |
|
|
|
[求助]CreateFile运行后第一个参数怎么变了
这样返回的文件句柄应该没问题啊,事实上这个函数执行结果是不正确的,我把分配内存的函数换成,GlobalAlloc 这一类,能正常使用了,但显示的结果还是错误的,不知道错误处在哪,程序用的是unicode编码,打开汉字显示也是乱码。 BOOL LoadTextFileToEdit(HWND hEdit,LPCTSTR lpFileName) { HANDLE hFile; hFile=CreateFile(lpFileName,GENERIC_READ,FILE_SHARE_READ, NULL,OPEN_EXISTING,0,NULL); if (hFile!=INVALID_HANDLE_VALUE) { DWORD dwFileSize; dwFileSize=GetFileSize(hFile,NULL); if (dwFileSize!=INVALID_FILE_SIZE) { LPTSTR lpszFileText; lpszFileText=(LPTSTR)GlobalAlloc(GPTR,dwFileSize+1); if (lpszFileText!=NULL) { DWORD dwRead; if (ReadFile(hFile,lpszFileText, dwFileSize,&dwRead,NULL)) { lpszFileText[dwFileSize]=0;//字符串末尾置零 if (SetWindowText(hEdit,lpszFileText)) { GlobalFree(lpszFileText); CloseHandle(hFile); MessageBox(NULL,_T("Open may be successful"),_T("Hello"),MB_OK); return TRUE; } } } } } return FALSE; } |
|
[求助][求助][求助]远程注入dll,注入成功,但目标进程变为无响应
#include <Windows.h> #include <stdio.h> #include <tchar.h> DWORD WINAPI RemoteFunc(PVOID pvid) { FILE* fp; while (TRUE) { fopen_s(&fp,"c:\\users\\dong\\desktop\\aaa.txt","a+"); fprintf(fp,"I'm not in you\n"); fclose(fp); Sleep(3000); } return TRUE; } int APIENTRY DllMain( HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved ) { switch(dwReason) { case DLL_PROCESS_ATTACH: { HANDLE hThead=CreateThread(NULL,0,RemoteFunc,NULL,0,NULL); if (hThead==NULL) { MessageBox(NULL,_T("d"),_T("d"),MB_OK); } /*WaitForSingleObject(hThead,INFINITE);*/ } break; default: return TRUE; } return TRUE; } 这样吗?运行后目标直接死掉了,去掉注释的那句,是未响应 |
|
|
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值