|
本帖最后由 夏目阿布 于 2021-9-25 07:35 编辑
|
进程_取子进程ID_模糊 | 整数型 | | |
进程ID | 整数型 | | | | 子进程名 | 文本型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | szExeFile | 字节集 | | | hSnapshort | 整数型 | | | pe32 | PROCESSENTRY32W | | | bRet | 逻辑型 | | | hProcess | 整数型 | | | pbi | PROCESS_BASIC_INFORMATION | | | hProcessID | 整数型 | | |
szExeFile = 删除Unicode结尾空白字节 (编码_Ansi到Unicode (子进程名, )) hProcessID = #INVALID_HANDLE_VALUE 如果真 (szExeFile = { }) 返回 (hProcessID ) hSnapshort = CreateToolhelp32Snapshot ( #TH32CS_SNAPPROCESS, 0 ) 如果真 (hSnapshort = #INVALID_HANDLE_VALUE ) 返回 (hProcessID ) pe32.dwSize = 556 bRet = Process32FirstW (hSnapshort, pe32 ) 判断循环首 (bRet ) 如果真 (寻找字节集 (删除Unicode结尾空白字节 (到字节集 (pe32.szExeFile )), szExeFile, ) ≥ 1 )  hProcess = OpenProcess ( #PROCESS_QUERY_INFORMATION, 0, pe32.th32ProcessID )  bRet = NtQueryInformationProcess (hProcess, #NULL, 取数据_通用型 (pbi ), 24, #NULL ) ≥ 0   如果真 (bRet )   如果真 (pbi.InheritedFromUniqueProcessId = 进程ID )    hProcessID = pe32.th32ProcessID    跳出循环 ()     CloseHandle (hProcess) bRet = Process32NextW (hSnapshort, pe32) 判断循环尾 ()CloseHandle (hSnapshort )返回 (hProcessID )
如果子进程名是调试版的状态下,没有固定的子进程名,增加这个可以把第二个参数改成“.tmp”就能取到调试版的ID
|
评分
-
查看全部评分
|