Saturday 14 September 2013

C Language Virus To Enable/Disable USB Ports

It is a simple C code to disable all your computer USB ports and you can also re-enable the USB port using another code.It is easy to understand who know basics of C programming.




Source Code for disable USB Ports:
#include
void main()
{
system(“reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f”);
}
write down the above code into your C compiler.save the file as “BLOCK_USB.C” And execute the program by pressing Ctrl+F9.Now all your USB ports are disabled.If you want re-enable your USB ports use the below code
Source Code for enable USB Ports:
#include
void main()
{
system(“reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f”);
}
write down the code.save the file as “UNBLOCK_USB.C” and execute the file.Now all your USB ports are re-enabled.Enjoy C programming.

No comments:

Post a Comment