Showing posts with label DOS. Show all posts
Showing posts with label DOS. Show all posts

When you first turn on you computer (BEFORE DIALING INTO YOUR ISP),
open a MS-DOS Prompt window (start/programs MS-DOS Prompt).
Then type netstat -arn and press the Enter key.
Your screen should display the following (without the dotted lines
which I added for clarification).

-----------------------------------------------------------------------------
Active Routes:

Network Address Netmask Gateway Address Interface Metric
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
255.255.255.255 255.255.255.255 255.255.255.255 0.0.0.0 1

Route Table

Active Connections

Proto Local Address Foreign Address State

--------------------------------------------------------------------------------

If you see anything else, there might be a problem (more on that later).
Now dial into your ISP, once you are connected;
go back to the MS-DOS Prompt and run the same command as before
netstat -arn, this time it will look similar to the following (without
dotted lines).

-------------------------------------------------------------------------------------

Active Routes:

Network Address Netmask Gateway Address Interface Metric
0.0.0.0 0.0.0.0 216.1.104.70 216.1.104.70 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
216.1.104.0 255.255.255.0 216.1.104.70 216.1.104.70 1
216.1.104.70 255.255.255.255 127.0.0.1 127.0.0.1 1
216.1.104.255 255.255.255.255 216.1.104.70 216.1.104.70 1
224.0.0.0 224.0.0.0 216.1.104.70 216.1.104.70 1
255.255.255.255 255.255.255.255 216.1.104.70 216.1.104.70 1

Route Table

Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:0 0.0.0.0:0 LISTENING
TCP 216.1.104.70:137 0.0.0.0:0 LISTENING
TCP 216.1.104.70:138 0.0.0.0:0 LISTENING
TCP 216.1.104.70:139 0.0.0.0:0 LISTENING
UDP 216.1.104.70:137 *:*

--------------------------------------------------------------------------------

What you are seeing in the first section (Active Routes) under the heading of
Network Address are some additional lines. The only ones that should be there
are ones belonging to your ISP (more on that later). In the second section
(Route Table) under Local Address you are seeing the IP address that your ISP
assigned you (in this example 216.1.104.70).

The numbers are divided into four dot notations, the first three should be
the same for both sets, while in this case the .70 is the unique number
assigned for THIS session. Next time you dial in that number will more than
likely be different.

To make sure that the first three notation are as they should be, we will run
one more command from the MS-DOS window.
From the MS-DOS Prompt type tracert /www.yourispwebsite.com or .net
or whatever it ends in. Following is an example of the output you should see.

---------------------------------------------------------------------------------------

Tracing route to /www.motion.net [207.239.117.112]over a maximum of 30 hops:
1 128 ms 2084 ms 102 ms chat-port.motion.net [216.1.104.4]
2 115 ms 188 ms 117 ms chat-core.motion.net [216.1.104.1]
3 108 ms 116 ms 119 ms www.motion.net [207.239.117.112]
Trace complete.

------------------------------------------------------------------------------------------

You will see that on lines with the 1 and 2 the first three notations of the
address match with what we saw above, which is a good thing. If it does not,
then some further investigation is needed.

If everything matches like above, you can almost breath easier. Another thing
which should you should check is programs launched during startup. To find
these, Click start/programs/startup, look at what shows up. You should be
able to recognize everything there, if not, once again more investigation is
needed.

-------------------------------------------------------------------------------------------

Now just because everything reported out like we expected (and demonstrated
above) we still are not out of the woods. How is this so, you ask? Do you use
Netmeeting? Do you get on IRC (Internet Relay Chat)? Or any other program
that makes use of the Internet. Have you every recieved an email with an
attachment that ended in .exe? The list goes on and on, basically anything
that you run could have become infected with a trojan. What this means, is
the program appears to do what you expect, but also does just a little more.
This little more could be blasting ebay.com or one of the other sites that
CNNlive was talking about.

What can you do? Well some anti-virus software will detect some trojans.
Another (tedious) thing is to start each of these "extra" Internet programs
one at a time and go through the last two steps above, looking at the routes
and connection the program uses. However, the tricky part will be figuring
out where to tracert to in order to find out if the addresses you see in
step 2 are "safe" or not. I should forewarn you, that running tracert after
tracert, after tracert might be considered "improper" by your ISP. The steps
outlined above may not work exactly as I have stated depending upon your ISP,
but with a true ISP it should work. Finally, this advise comes with NO
warranty and by following my "hints' you implicitly release me from ANY and
ALL liability which you may incur.


Other options

Display protocol statistics and current TCP/IP network connections.
Netstat [-a] [-e] [-n] [-s] [-p proto] [-r] [intervals]

-a.. Display all connections and listening ports.
-e.. Display Ethernet statistics. This may be combined with the -s option.
-n.. Diplays address and port numbers in the numerical form.
-p proto..Shows connections for the protocol specified by proto; proto may be
TCP or UDP. If used with the -s option to display per-protocol statistics,
proto may be TCP, UDP, of IP.
-r.. Display the routing table.
-s.. Display per-protocol statistics. By default, statistics are shown for TCP
UDP and IP; the -p option may be used to specify a subset of the default
interval..Redisplay selected statistics, pausing intervals seconds between each
display. If omitted. netstat will print the current configuration information
once

INTRODUCTION:
Dos is a disk operating system with a set of programs that act as a translator between the user
and the computer in order to perform the task of the user. Ms-Dos is a popular operating system on Micro-Computers.
Related systems include MS-DOS, PC DOS, DR-DOS, Free DOS, PTS-DOS, ROM-DOS, JM-OS, and several others.This is the first program that is installed when an OS get installed. There are many version ranging from v2.0 to v7.0 .

Dos commands are of two types:

Internal Commands:
Cls : This command is used to clear the screen.

Ver : This helps us to know the later version of dos.

Vol : This command shows the label of the current drive & and its serial number.

Date : This command display the current date. Also called as the system date.

Time.
: This command display the current time and also the message to enter the new time

Dir : This command display the list of files and directory in the mentioned directory or drive.

Dir/P : This command show all the files pagewise. Once the screen is full of filename a message saying “press any key to continue” is displayed, he user can take his/ her own time o view the files & its details.

Dir/w : This command is used to display the content of disk i.e files width wise i.e:- five filenames perline.

Wild Characters : There are 2 wild characters.
?: denoted any one single characters.
* : denotes any no of characters.

Type : This command is used to see the content of a specific file on the screen.

Rename or Ren : This command is used to change the filename.

Del (Deleting) : This command is used to erase the file from the disk.

Copy : This commands is used to duplicate the content of one file in to another file.

Directories : A directories is a separate area on the disk to store some files.
Md
Rd

Edit : is a Dos Editor. It is an internal command.

External Commands :
External commands are ones which requires certain special Dos files for their execution.

Tree : This command display path and optionally list the content of each directory and sub directory on the specified drive.

Sort : The sort filter reads input ,sorts the data and then writes the sorted data screen or to a file or another device.

Find : Locates all the lines which contain a specific string of text in a file or files.

Print : This command used to print to content of the files.

Chkdsk: This command is used to display the report regarding the status of the disk.

Diskcopy: This command is used to copy the content of one disk to another.

Attrib : Each and every file has some attributes stored for it.

Backup: The hardisk can sometimes suffer a head crash. In such occasion all data on the disk is lost and irrecoverable.

Format : To make a floppy or hardisk capable of storage.

Del tree: It is used to delete all files or directories from the drive or directory from drive or directory.

DOS Shell

DOS shell, which first appeared with DOS 4 is a program that attempts to provide an easier interface to DOS. DOS shell provides a graphical front end to DOS commands allowing most of them to be executed using the mouse, with minimal keyboard input. Note that DOS shell was not provided with MS-DOS version 6.

To run the DOS shell program type DOSSHELL

Opening Screen Display

Once DOSSHELL is launched the first screen displays a menu bar to the top, directly beneath it a list of drives which can be accessed, and then three small windows. The windows are the Directory Tree window (in which you select a directory on the currently highlighted drive), the Files window (displaying the contents of the selected directory), and a Main window giving access to the DOS command prompt, editor, DOS Q-Basic and some disk utilities.

Help from within DOS Shell

You can get help on using the DOS shell environment in the following ways –

By using the Mouse - clicking on the Help option in the menu bar

By using the keyboard - by pressing Alt+H

In both cases a pull down menu appears and you select from the menu by moving the selection bar to one of the options with either the mouse or the andarrow keys and then clicking on your chosen option or pressing to activate it. Once you have done this a dialogue box will appears corresponding to the selection made.Another way of obtaining help is by simply highlighting the item you need help on using the mouse, and then pressing the F1 key. This has the effect of displaying a dialogue box whose content relates directly the item which was highlighted.

Basic Keys for using the Menus

Alt Activates the Menu Bar
← → Selects a menu
Activates selected menu

↓↑Selects a menu option
Activates the option

Esc Leaves the menu bar

Basic Keys for using the windows

Tab Moves between Drives, Directories, Files and Main windows
Arrow Keys Selects option within window

Activates option

Quitting DOS Shell

There are several ways of quitting from the DOS shell environment

Press Alt+F4
Press F3

From the menu select File and choose Exit