PDA

Click to See Complete Forum and Search --> : Ultimate Guide to MS-DOS


Ennis
November 5th, 2001, 04:34 PM
|-The Ultimate Guide To MS-DOS-|

Author- Ennis
Contact- nho@hackermail.com

______________________________________________


OK, first of all Windows, I hear screams of lame security and I agree. However every newbie I have every known runs Windows and with the new Script Kiddie culture it is now easier to use Windows as an assault computer and the need for Linux/other OS has declined.
So I have decided to begin with Windows and DOS.
The main reason for this text is that DOS is vital to computer history. The term DOS [ disc operating system ] has become synonomous with operating systems.

This tutorial will show you how to do basic groundwork using MS-DOS which most of you will have especially if your running Windows.
I will begin with DOS as without it Windows is nothing so if you aint interested in DOS then skip to the Windows section.

* ABOUT MSDOS
MSDOS is probably the most widely used operating system in the world today. It is produced by a company we all know Microsoft and was first called
QDOS [ Quick and Dirty Operating System ] but has developed considerably since then.
The original DOS system was made by Tim Patterson and was only 4000 lines of assembly code.

* MSDOS Commands
Since MSDOS was developed later than CP/M it has a wider range of commands available to the user. With nearly 30 built in commands and several additional programs available MSDOS is a powerful operating system.
Here is a list of the main MSDOS commands.

BREAK- allows break key interuption during programs
CLS- clears the video display
COPY- copies files
CTTY- defines the device to be used for input
DATE- sets and displays the date
DEL- deletes named files
DIR- displays list of files on disc
ERASE- erases all files on disc
MKDIR- makes a sub-directory
PATH- sets up search path through sub-directories
PAUSE- stops operation for user response
PROMPT- selects the character to be used as the system prompt
REM- identifies a remark line which the system displays on the screen not executed
REN- renames files
RMDIR- deletes sub-directory
TIME- sets and displays current time
TYPE- lists contents of file to the display
VER- gives the version number of the operating system
VERIFY- sets the discs to read after write to verify data

>>>External command files normally supplied with MSDOS include-

CHKDSK- checks the file structure of discs
DISKCOPY- copies discs
EDLIN- simple line editor
FORMAT- formats blank discs
MORE- pages output into single screens
RECOVER- salvages programs from currupt discs
SORT- used to sort data
_______________________________________________

*LOADING MSDOS
Although it is unlikely that this section will be used by a lot of people i have included it in case anyone ever needs to load MSDOS whatever the reason or problem may be.

OK, here we go MSDOS is supplied on a single floppy disc, these days it should come with Windows. Search around for the disc then stick it in to your computer.
After the MSDOS disc has been inserted you will get a reply on your computer screen, ending with the system prompt
A>_
This shows you that MSDOS has loaded, and is waiting instruction.
NEXT we have to check the directory..

* CHECKING THE DIRECTORY
Now that we have the system prompt we can check what programs are present on the disc.
To do this we use the DIR command, by entering this we will get a list of all files in drive A. {a>_}
A whole load of information will pass the screen eventually stopping at the number of files and how much space is available on the disc.
If there are loads of files on the disc, then the DIR command will try display all of these on a single screen.
To modify this we can add a /W suffix.
DIR/W
which tells DOS to display the directory in wide format.
However this omits the file size and date of last amendment.
So another option is to add the suffix /P
DIR/P
This shows 23 lines of the directory to be displayed, and a keystroke moves onto the next 23 lines.
_______________________________________________

* COPYING FILES
The copy command is in-built into DOS. With copy you can move files from disc to another.
When copying files the new file can have a new name if required.
The command
COPY File1.txt File1.bak
will make an exact copy of file1.txt.

* RENAMING FILES
When copying files it is possible to give the new copy file a different name than the origanal just as in Windows.
DOS also allows you to rename files without copying them.
REN is used for this command.
REN File1.txt Fileone.txt
Also the command
REN*.txt*.doc
will rename all .txt files as .doc files on a disc.

* DELETING FILES
To delete unwanted files use the DOS command DEL.
As with COPY and REN you can remove all files in one go with the command
DEL*.*
but you will recieve the prompt
ARE YOU SURE?
Be careful with this command DOS is not designed to recover accidently deleted files.
_______________________________________________

* MORE ABOUT DIRECTORIES
Files such as .txt files can be specified in the directory in DOS using the command
DIR*.txt
this will show all files such as .txt or .doc
Also remember DOS directories are not in alphabetical order.
_______________________________________________

* BATCH FILES
MSDOS assumes that any file you create with .BAT is a batch file and will execute any commands in the file sequentially.
By creating a .BAT file you can perform complex and repetitive tasks easily.
One of the uses for a batch file is to configure the computer when it is on. For this purpose DOS looks for the AUTOEXEC.BAT file which stands for
AUTOmatically EXECute .BATch

* FILE TYPES
The type of file on a disc is indicated by the suffix that follows also known as its extension.
Here is a list of extensions.
.ASM - 8086 assembly language source code
.BAK - backup file
.BAS - basic source code
.BAT - batch command file
.COM - executable command file
.EXE - relocatable executable file [most commen]
.LIB - library file
.MAP - list file from linker
.$$$ - temporary system generated file

There are many more but too many to name.
%%%hint: viruses usually contain odd extensions such as .VBS etc. but fool user by appearing in an e-mail like so
HAPPY.TXT.vbs
this can easily fool relaxed users.
_______________________________________________

* CHANGING THE PROMPT
Normally MSDOS prompts the user with the current drive letter
A>_
However the system prompt can be altered by software to produce a customized prompt.
This is done by entering PROMPT followed by text or special characters.
HERE is a list of some of them
CHARACTER RESULTING PROMPT
$$ the '$' character
$t the current time
$d the current date
$p the current directory of the hard drive
$v the version number
$n the default drive
$g the '>' character
$i the '<' character
$b a blank space
$s a space [leading only]
$h a backspace

* COMMAND EDITING
Each time you enter a command in DOS it is stored in a special place in the memory known as a template.
So to save time with writing in commands they can be altered to 1 or 2 keystrokes.
However these vary from machine to machine so youll have to see what applies to your pc.
HERE is an example of Command Editing..
if you wanted to TYPE a .txt file and mispell TYPE as BYTE then the following commands will correct the line.
BYTE File1.txt
<NEWLINE>
T
<COPY1>
P
<COPYALL>

which results in
TYPE File1.txt
_______________________________________________

freeOn
November 5th, 2001, 06:19 PM
Very good job I think, Keep it up. Things like this will teach the skript kiddies that you don't need a program to do it. Your own operating system can do it for you. Thus creating an end. I don't know I was never a sckript kiddie, I new that if it is possible for a program to do it then there is usually a mannual way, which is better because what are the lame skript kiddies going to do when they don't have access to programs, all they have is the stantard OS. You are providing input for the brain so good thread.

thor
November 5th, 2001, 06:49 PM
That bought back alot of memories, thank's:)

Guus
November 5th, 2001, 06:52 PM
I think, for any new user that wants to learn msdos, another program will be very usefull:

help

It covers most, if not all, msdos-commands, almost all of them with an example. And really, it isn't that hard to learn.

To use help, be sure to have installed ms-dos. Versions coming with win9x don't have 'help'

aarobonob
November 6th, 2001, 12:50 AM
yes msdos was my second OS.. first was a basic system similar to GWbasic (commodore 64 rom). Anyway, a good thing to point out is differences between versions of DOS... reasons why to use it and stuff like that. I personally loved programming in Dos. I still love my quickBasic complier. when i have more time, i might expand on ennis' thread here inan advanced tutorial. but any msDos questions can be directed at me too :)
i'm always happy to help with the "old school" comptuers...

i still have 4 386's :)\

intruder
November 6th, 2001, 03:45 AM
hey ennis great job man...i really learned..something out of it thanks...
but ennis one suggetion to u..
i will be very greatful to u if u post one tutorial in detail about batch file programming.

thanks
intruder... :borg:

Stronzo
November 6th, 2001, 03:57 AM
Also remember that if you want to know more about what a particular command does or what flags you can use with it use the following syntax:

[command name] /help

Terr
November 6th, 2001, 04:16 AM
Originally posted by Stronzo
Also remember that if you want to know more about what a particular command does or what flags you can use with it use the following syntax:

[command name] /help

Don't forget...
[command name] /?

And, if very desperate (More for *nix stuff though)
[command name] -h
[command name] --help

Stronzo
November 6th, 2001, 04:29 AM
Originally posted by Terr
Don't forget...
[command name] /?

My bad. Oops. That's what I meant :D

jackthekiller
November 6th, 2001, 06:52 AM
A year ago friend of mine tell me that MSDOS will put in history because it will no longer used as an operating system. I have no comment about it. For me, DOS is really powerfull OS.

ThePreacher
November 6th, 2001, 07:31 AM
I remember finally figuring out how to run my mothers computer using msdos right after windows 95 came out. It was like I had control for once. Later I took a class that taught us a lot of DOS. Now I hope to learn how to use linux/unix in the same way. By the way what are script kiddies?

owen76
November 6th, 2001, 02:08 PM
Does DOS/Windows come with a built in compiler in any language?
Where can I get one?
I don't think mine has qbasic and a batch tutorial would be wonderful.

evilbob
November 6th, 2001, 02:11 PM
cool stuff man

sparkant
November 6th, 2001, 02:25 PM
Hm, sorry to bother you with this, Ennis, but could it be you forgot to explain what you mean by COPY1 and COPYALL ?
right arrow,
F3 ?

djeez, I could be wrong too, but i guess it should be done like that, no?

Hm,

Grtz,

sparkant
November 6th, 2001, 02:30 PM
Yes. The DOS "compiler", command interpreter, is debug.exe. Very usefull if one want's to hack copy-protections, although I would suggest SoftIce for that use. debug.exe can be found at the %systemroot% of your DOS-install. It can be used to directly execute ASM instructions, as well can you trace code, take hex-dumps from RAM & ROM, etc.

It is a very usefull and powerfull tool, if you know how to use it.

In the hope of having shone a bit of clarity on this subject,

Grtz,

Prat
November 6th, 2001, 02:36 PM
Well I think DOS served its purpose as a security hole ROFL.. j/k
I think that DOS was cool for gaming way back when there was nothing for Windows.. I don't know I just wanted to put my 2 cents in..

Ennis
November 6th, 2001, 03:52 PM
Originally posted by intruder
hey ennis great job man...i really learned..something out of it thanks...
but ennis one suggetion to u..
i will be very greatful to u if u post one tutorial in detail about batch file programming.

thanks
intruder... :borg:

Ill get working on it, but Im not gonna be around here for a while. Im working on my new site with a friend and Ive got BIG exams coming up.
Ill be checking in for a while but I aint gonna be living here like I used to.

blackmask
November 16th, 2001, 12:27 PM
Good Job .It was a great help.

:D

Inferno_x_2001
November 16th, 2001, 01:24 PM
One of the things with scripts and stuff is that anything a aprogram can do, can be done manually, in most cases that is. Excluding call functions and what not.

Focmaester
November 20th, 2001, 11:26 AM
DOS whas great, but then again Gates didn't write it (thank God).
If Paterson would have sold it to IBM instead of Microsoft he would have been filthy rich.

blackD
November 20th, 2001, 06:26 PM
this site is realy great hahaha ... much humour and stuff (nothing against your thread ennis...it's great) :p

Ennis
December 1st, 2001, 12:34 PM
Yep good ol' DOS gotta love it!

micael
December 1st, 2001, 03:54 PM
Good work.. I was for a minute way back in the old times running a BBS system.. Tears in my eyes, those old happy days with a lots of happy moments all thanks to DOS :-).

Craisins
December 2nd, 2001, 07:01 AM
Originally posted by ThePreacher
By the way what are script kiddies?
A script kiddie is one of those annoying little kids (or adults in some cases) that get ahold of an exploit program that someone else has writen (such as SubSeven, Legion, ect.), then uses it and tells the world that he or she is "bad-ass yo", when they really have no idea what is going on behind the scenes of the program. They push a button and connect to a shared computer but couldn't tell ya the protocol or the port used.

Craisins
December 2nd, 2001, 07:06 AM
Originally posted by owen76
Does DOS/Windows come with a built in compiler in any language?
Where can I get one?
I don't think mine has qbasic and a batch tutorial would be wonderful.
I think Qbasic is still on the 98 and 95 CD. I don't have it with me or I could tell you exactly where to look. As soon as I get it back from my friend I'll tell ya.

bizzybutlazy
December 2nd, 2001, 07:38 AM
we were all script kiddies at one point, it helps you learn.......

Craisins
December 2nd, 2001, 03:28 PM
Originally posted by bizzybutlazy
we were all script kiddies at one point, it helps you learn.......
There's nothing wrong with using a program to help you learn.

8 Easy Steps To Becoming A Script Kiddie
1. Hear someone say a "I have this AWESOME hacking program....."
2. Beg them to give it to ya until they hit you or they give it to you.
3. Take it home and look at the disk.
4. Ask them what a .zip is and beg them to give you a program to make it work.
5. 5 days later, finally get it unzipped. Look at program, infect yourself.
6. Beg your friend to teach you how to use it.
7. Infect your mom's machine and make the CD-ROM eject at wierd times.
8. Go to school the next day and tell everyone you are a Super Elite hacker and no one should mess with you.

tazjam
December 2nd, 2001, 11:16 PM
debug is an assembler if you use it right, an as for where to find qbasic, there's a folder on the win9x cd named oldmsdos or olddos, something like that...

Kidd_Zero
July 14th, 2005, 08:46 PM
I am trying to learn dos now so it was a help

Ennis
July 14th, 2005, 09:47 PM
wow, old school tutorial.

Spyder32
July 14th, 2005, 11:06 PM
wow, old school tutorial.

Your telling me! :eek: Still a nice one.. nice to see you by the way, Ennis. ;)