求Windows程序包管理器WinGet V0.1.41331 官方版网盘资源
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了求Windows程序包管理器WinGet V0.1.41331 官方版网盘资源相关的知识,希望对你有一定的参考价值。
参考技术A链接:
提取码:725f
软件名称:Windows程序包管理器WinGetV0.1.41331官方版
语言:简体中文
大小:5.24MB
类别:系统工具
介绍:Windows程序包管理器WinGet官方版是功能强大的系统优化软件,软件可以让Windows用户在官方命令情况下对软件进行管理,软件能够让用户取得更多程序上面的授权,由命令行工具和用于在Windows10上安装应用程序的服务集组成。安装后,开发人员可以通过Windows终端。PowerShell或命令提示符访问winget。
求exe程序进程自我保护功能不被系统自带的任务管理器结束掉
求exe程序进程自我保护功能不被系统自带的任务管理器结束掉
就是我打开了一个exe程序后怎样才能让他 不被系统自带的任务管理结束掉 求代码VC++6.0的
给高分
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include "PSAPI.H"
#pragma comment( lib, "PSAPI.LIB" )
HANDLE CreateRemoteThreadProc(char* ProcessName);
DWORD WINAPI WatchThread(LPVOID lparam);
DWORD WINAPI remote(LPVOID pvparam);
DWORD processtopid(char *processname);
BOOL EnablePriv();
//先打开notepad,在运行本程序
typedef struct _remoteparameter
DWORD rpWaitForSingleObject;
DWORD rpOpenProcess;
DWORD rpWinExec;
DWORD rpProcessPID;
HANDLE rpProcessHandle;
char path[MAX_PATH];
REMOTEPARAM;
int main(int argc, char* argv[])
HANDLE RemoteThreadHandle;
HANDLE LocateThreadHandle;
EnablePriv();
RemoteThreadHandle=CreateRemoteThreadProc("notepad.exe");
//本地线程循环注入notepad
LocateThreadHandle=CreateThread(NULL,NULL,WatchThread,(LPVOID)RemoteThreadHandle,NULL,NULL);
WaitForSingleObject(LocateThreadHandle,INFINITE);
WaitForSingleObject(RemoteThreadHandle,INFINITE);//线程等待,循环等待notepad的远程线程执行完毕。即 notepad关闭本程序才关闭
return 0;
//创建远程线程,线程注入
HANDLE CreateRemoteThreadProc(char* ProcessName)
HANDLE ThreadHandle;
char FilePath[MAX_PATH];
GetModuleFileName(NULL,FilePath,MAX_PATH);//得到文件所在路径
printf("%s\n",FilePath);
//根据进程名获取进程ID
int procID=processtopid(ProcessName);
printf("The process pid is %d\n",procID);
HINSTANCE hkernel32;
HANDLE rphandle;
char *remotethr;
char *remotepar;
int cb;
//根据ID打开notepad的进程空间
rphandle=OpenProcess(PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION |
PROCESS_VM_WRITE, FALSE,procID);
if(rphandle==NULL)
printf("Open Remote Process is Error\n");
else
printf("open process is ok\n");
/*****************************************************************/
/*将远程线程函数代码拷入目标进程*/
/*****************************************************************/
cb=sizeof(TCHAR)*4*1024;
//在notepad进程中分配空间,存储函数remote
remotethr=(PTSTR)VirtualAllocEx(rphandle,NULL,cb,MEM_COMMIT,PAGE_EXECUTE_READWRITE);
if(remotethr==NULL)
printf("VirtualAllocEx for Thread Error\n");
CloseHandle(rphandle);
else
printf("VirtualAllocEx is ok\n");
//往notepad空间中写入数据指针remote指向的数据,大小为cb
if(WriteProcessMemory(rphandle,remotethr,(LPVOID)remote,cb,NULL)==FALSE)
printf("WriteProcessMemory for Thread Error\n");
CloseHandle(rphandle);
else
printf("WriteProcessMemory is ok\n");
/*****************************************************************/
/*将远程线程函数参数拷入目标进程*/
/*这里需要重定位远程线程需要的API*/
/*****************************************************************/
REMOTEPARAM rp;
memset((char*)&rp,0,sizeof(rp));
hkernel32=GetModuleHandle("kernel32.dll");
if(hkernel32==NULL)
printf("hKernel32 is Error\n");
//通过让目标进程执行OpenProcess,WinExec,WaitForSingleObject,函数重新打开本程序
rp.rpProcessPID =GetCurrentProcessId();
rp.rpOpenProcess =(DWORD)GetProcAddress(hkernel32,"OpenProcess");
rp.rpWinExec =(DWORD)GetProcAddress(hkernel32,"WinExec");
rp.rpWaitForSingleObject=(DWORD)GetProcAddress(hkernel32,"WaitForSingleObject");
_tcscpy(rp.path,FilePath);
cb=sizeof(char)*sizeof(rp);
//rphandle指向notepad进程,分配空间,存储参数
remotepar=(PTSTR)VirtualAllocEx(rphandle,NULL,cb,MEM_COMMIT,PAGE_READWRITE);
if(remotepar==NULL)
printf("VirtualAllocEx for Parameter Error\n");
CloseHandle(rphandle);
//往notepad进程写入传给remote的参数
if(WriteProcessMemory(rphandle,remotepar,(LPVOID)&rp,cb,NULL)==FALSE)
printf("WriteProcessMemory for Parameter Error\n");
CloseHandle(rphandle);
/*****************************************************************/
/*将远程线程注入目标进程*/
/*****************************************************************/
//在noetpad进程中创建新线程执行remote函数,参数为remotepar,返回线程句柄
ThreadHandle=CreateRemoteThread(rphandle,NULL,0,(LPTHREAD_START_ROUTINE)remotethr,(LPVOID)remotepar,0,NULL);
if(ThreadHandle==NULL)
printf("CreateRemotThreadHandle Error\n");
CloseHandle(rphandle);
else
printf("CreateRemotThreadHandle is ok\n");
return ThreadHandle;
//获取进程ID
DWORD processtopid(char *processname)
DWORD lpidprocesses[1024],cbneeded,cprocesses;
HANDLE hprocess;
HMODULE hmodule;
UINT i;
TCHAR normalname[MAX_PATH]=("UnknownProcess");
if(!EnumProcesses(lpidprocesses,sizeof(lpidprocesses),&cbneeded))
return -1;
cprocesses=cbneeded/sizeof(DWORD);
for(i=0;i<cprocesses;i++)
hprocess=OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,lpidprocesses[i]);
if(hprocess)
if(EnumProcessModules(hprocess,&hmodule,sizeof(hmodule),&cbneeded))
GetModuleBaseName(hprocess,hmodule,normalname,sizeof(normalname));
if(!strcmp(normalname,processname))
CloseHandle(hprocess);
return (lpidprocesses[i]);
CloseHandle(hprocess);
return 0;
//提升进程权限
BOOL EnablePriv()
HANDLE hToken;
if ( OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES,&hToken) )
TOKEN_PRIVILEGES tkp;
LookupPrivilegeValue( NULL,SE_DEBUG_NAME,&tkp.Privileges[0].Luid ); //修改进程权限
tkp.PrivilegeCount=1;
tkp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges( hToken,FALSE,&tkp,sizeof tkp,NULL,NULL ); //通知系统修改进程权限
return 0;
//远程线程要执行的函数
DWORD WINAPI remote(LPVOID pvparam)
REMOTEPARAM *rp=(REMOTEPARAM*)pvparam;
typedef UINT (WINAPI *EWinExec) (LPCSTR, UINT);
typedef HANDLE (WINAPI *EOpenProcess) (DWORD, BOOL, DWORD);
typedef DWORD (WINAPI *EWaitForSingleObject) (HANDLE, DWORD);
EWinExec tWinExec;
EOpenProcess tOpenProcess;
EWaitForSingleObject tWaitForSingleObject;
tOpenProcess =(EOpenProcess)rp->rpOpenProcess;
tWaitForSingleObject =(EWaitForSingleObject)rp->rpWaitForSingleObject;
tWinExec =(EWinExec)rp->rpWinExec;
// 重新打开本进程ID,使本进程可以访问
rp->rpProcessHandle=tOpenProcess(PROCESS_ALL_ACCESS,FALSE,rp->rpProcessPID);
tWaitForSingleObject(rp->rpProcessHandle,INFINITE);
//打开本程序
tWinExec(rp->path, SW_SHOW);
return 0;
//守护进程
DWORD WINAPI WatchThread(LPVOID lparam)
HANDLE RemoteThreadHandle=(HANDLE)lparam;
DWORD ExitCode;
GetExitCodeThread(RemoteThreadHandle,&ExitCode);
while(true)
if(ExitCode!=STILL_ACTIVE)//如果远程线程不激活,就重新激活
printf("RemoteThreadHandle is over\n");
RemoteThreadHandle=CreateRemoteThreadProc("notepad.exe");
Sleep(3000);
return 0;
希望帮到楼主 给个采纳吧追问
给你一份源码能否帮我加下?
本回答被提问者和网友采纳以上是关于求Windows程序包管理器WinGet V0.1.41331 官方版网盘资源的主要内容,如果未能解决你的问题,请参考以下文章
Windows 11 小技巧- winget安装和维护应用程序