Hi, For my 3rd post here im going to teach everyone about DOS/Batch
Usefull websites
http://www.mizsynergy.com/batch.html
http://en.wikipedia.org/wiki/Environment_variables
http://en.wikipedia.org/wiki/DOS
http://en.wikipedia.org/wiki/Dos_commands
http://en.wikipedia.org/wiki/Fork_bomb
https://hackforums.net/showthread.php?tid=407102
To create a batch file open notepad and type your commands.
Save it with a .bat or .cmd file extension
First thing you want to do is learn the echo command. Thats the most used command for when making a GUI in batch.
heres an example of a GUI (Guided User Interface)
This code Uses echo to show what happens when you enter 1 into the Batch program.
This is very helpful so your users can know what there doing.
@echo off
this command i suggest not using at the begginning of you learning batch. The reason being, if you have that in your code, you wont see what your file is doing.
Say you want to learn how a certain batch works. you C&P the code and save it and it has @echo off. well when you run it you wont see what the command is doing just the output, but if you remove @echo off you will see what commands are being put out and the result. (this will make it look ugly when it runs though so only do this when learning)
:s
echo 101010101101
echo 101010101010
echo 111010101011
goto s
good for scaring people
Color in batch
a hexidecimal code
color [2 digit hexidecimal number]
will set a color
a simple color z in the DOS prompt will result in a list
0A is a good color because its the matrix color and is what people think of when they think about hackers black and green
the Port Command
the port command is used to write to another file. to port something to a text file the code is as follows
When there are 2 >s Im learning batch will be put at the bottom of the file (if there is other text) in other words it will be added.
When there are 1 > It will overwright the file and put the Im learning batch.
Variables
Variables are very important.
There is a list of DOS variables in the first wikipedia link i posted.
Some usefull ones
%random% - generates a number from 1-35500
%CD% -displays directory batch or cmd is being run in
%SystemDrive% -displays (or is) the drive windows is installed on
%appdata% - displays or is the path of application data
Different variables have different uses.
Say you want to install something in there Root Drive
and you dont know which one is it
Most people have windows installed on C: but they could have it installed on D: or F: or anyletter TBH
so %SystemDrive% automatically will detect whihc drive has windows installed on it
so if they have it on C:
%systemdrive% would = C:
You can create your own variables also with the set command (you saw it earlier)
so in this code it sets a variable (and pauses it thats what the /p is for) and when you press enter %Option%= what ever you input
that brings us to the IF command
IF and IF NOT
In that code under the set /p string it says
That means that if you inputted the number 1 when it asked for a variable, you would go to my thread.
here is the sytax of the command
if [whatever you want if like if this equals] [this]
for example
the "%Option%"=="1" is the first bracket
and https://hackforums.net/showthread.php?tid=407102 is the command
this means if the variable is 1 you will see my thread.
IF NOT is exactly the same except it does the command if
when you dont enter one.
The Bomb
One of the Lulziest Things ever.
There are pretty much 3 main ways to make a batch bomb
The 1 super ineficient ways every Sk1d whos been on youtube knows are
they just paste as many starts as they can and think its good
Sometimes they will put a
there are 3 commonly used variants of this
The noobs are so dumb they dont even loop the last one.
the 2 ways to do it right.
These are the best bombs, and can freeze a computer quickly
The simple one
now. That is still pretty noobie. You got to add somestuff to it but you can figure that out your self
also
goto command
Goto simply goes to
:S
echo yay
goto S
it will go to the S
This ends my tut here are some usefull commands
NSLookup see ip of site with out waiting for ping response
MD makes folder (directory)
Ping -w [number] >null is good for making a timer replace [number] with the desired waiting time in milliseconds 1000 millseconds is 1 second
Following this tut and expirementing and viewing those tutorials will teach you how to be a batch master
I did not include registrey stuff because i have no usefor it and therefor never learned it
Usefull websites
http://www.mizsynergy.com/batch.html
http://en.wikipedia.org/wiki/Environment_variables
http://en.wikipedia.org/wiki/DOS
http://en.wikipedia.org/wiki/Dos_commands
http://en.wikipedia.org/wiki/Fork_bomb
https://hackforums.net/showthread.php?tid=407102
To create a batch file open notepad and type your commands.
Save it with a .bat or .cmd file extension
First thing you want to do is learn the echo command. Thats the most used command for when making a GUI in batch.
heres an example of a GUI (Guided User Interface)
Code
@echo off
echo 1. To Learn Batch
echo 2. To Close
set /p option=Choose your option
if "%Option%"== "1" https://hackforums.net/showthread.php?tid=407102
if "%Option%"== "2" exitThis is very helpful so your users can know what there doing.
@echo off
this command i suggest not using at the begginning of you learning batch. The reason being, if you have that in your code, you wont see what your file is doing.
Say you want to learn how a certain batch works. you C&P the code and save it and it has @echo off. well when you run it you wont see what the command is doing just the output, but if you remove @echo off you will see what commands are being put out and the result. (this will make it look ugly when it runs though so only do this when learning)
:s
echo 101010101101
echo 101010101010
echo 111010101011
goto s
good for scaring people
Color in batch
a hexidecimal code
color [2 digit hexidecimal number]
will set a color
a simple color z in the DOS prompt will result in a list
0A is a good color because its the matrix color and is what people think of when they think about hackers black and green
the Port Command
the port command is used to write to another file. to port something to a text file the code is as follows
Code
echo Im learning batch>>Learningbatch.txtCode
echo Im learning batch>Learningbatch.txtWhen there are 1 > It will overwright the file and put the Im learning batch.
Variables
Variables are very important.
There is a list of DOS variables in the first wikipedia link i posted.
Some usefull ones
%random% - generates a number from 1-35500
%CD% -displays directory batch or cmd is being run in
%SystemDrive% -displays (or is) the drive windows is installed on
%appdata% - displays or is the path of application data
Different variables have different uses.
Say you want to install something in there Root Drive
and you dont know which one is it
Most people have windows installed on C: but they could have it installed on D: or F: or anyletter TBH
so %SystemDrive% automatically will detect whihc drive has windows installed on it
so if they have it on C:
%systemdrive% would = C:
You can create your own variables also with the set command (you saw it earlier)
Code
@echo off
echo 1. To Learn Batch
echo 2. To Close
set /p option=Choose your option
if "%Option%"== "1" https://hackforums.net/showthread.php?tid=407102
if "%Option%"== "2" exitthat brings us to the IF command
IF and IF NOT
In that code under the set /p string it says
Code
if "%Option%"== "1" https://hackforums.net/showthread.php?tid=407102here is the sytax of the command
if [whatever you want if like if this equals] [this]
for example
Code
if "%Option%"== "1" https://hackforums.net/showthread.php?tid=407102and https://hackforums.net/showthread.php?tid=407102 is the command
this means if the variable is 1 you will see my thread.
IF NOT is exactly the same except it does the command if
Code
if not "%Option%"== "1" https://hackforums.net/showthread.php?tid=407102The Bomb
One of the Lulziest Things ever.
There are pretty much 3 main ways to make a batch bomb
The 1 super ineficient ways every Sk1d whos been on youtube knows are
Code
start
start
start
startSometimes they will put a
Code
:s
start
goto sCode
:s
start notepad.exe
goto sCode
start Virus.bat
start Virus.batthe 2 ways to do it right.
These are the best bombs, and can freeze a computer quickly
The simple one
Code
:S
start %0
goto Salso
Code
:S
echo 1>%appdata%/%Random%.txt
MD %appdata%/%random%
goto SGoto simply goes to
:S
echo yay
goto S
it will go to the S
This ends my tut here are some usefull commands
NSLookup see ip of site with out waiting for ping response
MD makes folder (directory)
Ping -w [number] >null is good for making a timer replace [number] with the desired waiting time in milliseconds 1000 millseconds is 1 second
Following this tut and expirementing and viewing those tutorials will teach you how to be a batch master
I did not include registrey stuff because i have no usefor it and therefor never learned it


