![]() |
|
[Shell] Disk Operating System [DOS]/Batch Tutorial - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Shell] Disk Operating System [DOS]/Batch Tutorial (/showthread.php?tid=407102) Pages: Pages
1
2
|
Disk Operating System [DOS]/Batch Tutorial - dr00py - May 7, 2010 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) Code @echo offThis 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 offthat 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 startSometimes they will put a Code :sCode :sCode start Virus.batthe 2 ways to do it right. These are the best bombs, and can freeze a computer quickly The simple one Code :Salso Code :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 * - Blue Username - May 7, 2010 Nice I hope to see some of your work * - Xeke - May 7, 2010 HAH! my site's on there. * - The Old One - May 7, 2010 nicely done dude.......... * - dr00py - May 7, 2010 (May 7, 2010 02:03 PM)Xeke Wrote: HAH! my site's on there. Yup. Was reading sum threads saw it and wuz like hmm interesting should help people out. (May 7, 2010 02:14 PM)piekiller Wrote: nicely done dude.......... (May 7, 2010 01:57 PM)WSUPDEN Wrote: Nice Thanks! * - Blue Username - May 7, 2010 np npnpnp npnpnp npnpnp npnp np npnp No problem * - ULH4L - May 7, 2010 WOW! Millions of these things. Stop posting them! Post something useful! Like how to use these commands in combonations, and shit. * - Blue Username - May 7, 2010 (May 7, 2010 09:06 PM)ULH4L Wrote: WOW! Yea, Thats exactly what he did. Did you even read the post you fag? * - Blue Username - May 9, 2010 Bump. This tut should be stickied because none of the other tuts explain the variable sets and stuff * - ▓╠╣▓ - May 9, 2010 Nice post, was really useful to me:D * - dr00py - May 9, 2010 (May 9, 2010 04:19 AM)▓╠╣▓ Wrote: Nice post, was really useful to me:D thanks! * - Blue Username - May 10, 2010 You should add some more stuff Like Reg add * - dr00py - May 11, 2010 (May 10, 2010 08:51 AM)WSUPDEN Wrote: You should add some more stuff I stated REG add is usually used for malicous stuff, i usually dont create malicous stuff * - Blue Username - May 11, 2010 (May 11, 2010 07:43 AM)dr00py Wrote: I stated REG add is usually used for malicous stuff, i usually dont create malicous stuffYou should still add it. * - dr00py - May 12, 2010 (May 11, 2010 12:22 PM)WSUPDEN Wrote: You should still add it.Ill add in next tutorial. |