watt32s-2.2-dev.10
所属分类:网络编程
开发工具:Visual C++
文件大小:2312KB
下载次数:17
上传日期:2008-09-24 12:46:58
上 传 者:
zhuqiangcn
说明: watt32 Dos下的抓包,实现防火墙,tcp重建
(under watt32 Dos capture, realize the firewall, tcp reconstruction)
文件列表:
bin\ppp.cfg (3903, 2004-08-05)
bin\pppoe.cfg (584, 2003-09-28)
bin\rpc (5462, 2000-04-11)
bin\rpc.cfg (358, 2000-05-04)
bin\slip.cfg (229, 2004-08-05)
bin\smb.cfg (1685, 2003-06-24)
bin\wattcp.cfg (40309, 2006-01-13)
changes (144027, 2006-01-13)
inc\arpa\ftp.h (4856, 2005-01-13)
inc\arpa\inet.h (3527, 2004-07-19)
inc\arpa\nameser.h (13582, 2004-07-26)
inc\arpa\telnet.h (13586, 2004-07-19)
inc\arpa\tftp.h (3921, 2004-07-05)
inc\copying.bsd (1765, 2000-04-11)
inc\err.h (136, 2003-11-28)
inc\netdb.h (12393, 2004-07-19)
inc\netinet6\ah.h (3923, 2003-01-23)
inc\netinet6\ah6.h (2365, 2003-01-23)
inc\netinet6\esp.h (4937, 2003-01-23)
inc\netinet6\esp6.h (2193, 2003-01-23)
inc\netinet6\esp_rijn.h (2183, 2003-01-23)
inc\netinet6\in6.h (24760, 2003-01-23)
inc\netinet6\in6_gif.h (2124, 2003-01-23)
inc\netinet6\in6_ifat.h (2359, 2003-01-23)
inc\netinet6\in6_pcb.h (5694, 2003-01-23)
inc\netinet6\in6_pref.h (3592, 2003-01-23)
inc\netinet6\in6_var.h (23855, 2003-01-23)
inc\netinet6\ip6.h (275, 2003-01-23)
inc\netinet6\ip6proto.h (6702, 2004-08-22)
inc\netinet6\ip6_ecn.h (2082, 2003-01-23)
inc\netinet6\ip6_fw.h (8929, 2003-01-23)
inc\netinet6\ip6_mrou.h (10240, 2003-01-23)
inc\netinet6\ip6_var.h (14680, 2003-01-23)
inc\netinet6\ipcomp.h (2907, 2003-01-23)
inc\netinet6\ipcomp6.h (2136, 2003-01-23)
inc\netinet6\ipsec.h (12312, 2003-01-23)
inc\netinet6\ipsec6.h (3412, 2003-01-23)
inc\netinet6\mld6_var.h (2313, 2003-01-23)
inc\netinet6\nd6.h (14073, 2003-01-23)
inc\netinet6\pim6.h (2794, 2003-01-23)
... ...
Waterloo TCP
Installation Notes
by Erick Engelke
Introduction
TCP/IP is not a program, it is a set of protocols which have
been implemented on many machines. All machines running an
implementation of TCP/IP and connected to the world wide
Internet are capable of communicating with each other.
There are several popular non-commercial TCP/IP
implementations for MS-DOS computers. Each offers special
features but with varied drawbacks. I don't believe there
is a clear choice of one implementation for all needs, but
users are free to pick the best or most useful applications
from each offering.
These notes describe the various applications available
today. Please remember that the applications are free
software, you may use them and pass them on to others, but
there is no warranty and the support is very limited. You
also may not sell the included programs.
Installation
Waterloo TCP only works if you have a packet driver, a
special program which allows your network interface card to
talk with the Waterloo TCP applications.
Thanks to some very generous people, particularly Russell
Nelson, you probably will not have to buy a packet driver.
If you are using Ethernet hardware you can probably find
free packet drivers for your cards via anonymous ftp to
sun.soe.clarkson.edu in the pub/drivers subdirectory.
Waterloo TCP supports Class 1 (DIX-Ethernet), class 6 (SLIP),
class 18 (PPP) drivers. Class 3 (Token-ring) is untested.
Other types of networks have drivers which make them emulate
Ethernet hardware. For example, any Novell system using IPX
or any IBM compatible Token Ring network can be made to act
like Ethernet.
To start using Waterloo TCP software you will need to get it
configured. There are three options, using BOOTP, DHCP or a
configuration file.
If you think you may have a BOOTP or DHCP server on your
local subnet, copy the file TCPINFO.EXE into a new sub-
directory and run the command TCPINFO. It may take a few
seconds. After a maximum of 30 seconds, TCPINFO should tell
you if it could get configured via BOOTP or DHCP. If it
could not, or BOOTP/DHCP is too slow, you will have to use a
configuration file.
You will probably want a configuration file anyways, as it
allows some extra things which are not inherent in BOOTP.
Waterloo TCP lets you use a config file, and pick up extra
things from BOOTP or DHCP.
If you're unsure what you are doing, continue on with this
section and make a config file or modify the skeleton file
WATTCP.CFG distributed with Waterloo.
First you will need some important information from you
local TCP/IP guru. Do not merely guess, these values must
be correct or you may do some damage and get yourself on the
death threat list from your local network people.
IP address (eg. 129.97.128.123)
my_ip = ______.______.______.______
local subnet mask (eg. 255.255.0.0, never 255.255.255.255)
netmask = ______.______.______.______
local gateway (eg. 129.97.128.2)
gateway = ______.______.______.______
primary name server (eg. 129.97.128.1)
nameserver = ______.______.______.______
alternate name servers (up to 9 more if so desired)
just keep repeating this line with new addresses.
nameserver = ______.______.______.______
name domains list, (eg. UWaterloo.ca or edu)
domainlist = ___________________________
These values must be placed in a file called WATTCP.CFG.
Below is a sample copy, remember, do not use my values, get
the correct ones!
print = "using sample configuration" # sample comment
print = "contact local network guru for more details"
my_ip = 129.97.176.99
netmask = 255.255.0.0 # sample comment
nameserver = 129.97.128.24 ; sample comment
nameserver = 129.97.128.196 # alt nameserver
nameserver = 129.97.128.1 # 3rd nameserver
gateway = 129.97.128.2
domainlist = "uwaterloo.ca"
The rules are simple, directive = value. Directive and value
(except strings inside quotes) are NOT case-sensitive.
If quotes are not used in the value field, the value will be
terminated by the start of a comment or by a newline, and
all white space (spaces and tabs) are removed.
If you specify quotes around the value, only a second set of
quotes or a newline will end the value field and comments
must be preceded by an end quote mark. Whitespace is
preserved inside quotes.
The value can also be taken from an environment variable.
E.g. If you specify:
my_ip = $(myip)
or
my_ip = $(MYIP)
this will be expanded to the value of %myip%. E.g. if you
specify:
set myip=129.97.176.99
in your AUTOEXEC.BAT, the expansion in WATTCP.CFG will
become:
my_ip=129.97.176.99
In this way the same WATTCP.CFG file can be used throughout
the local network. This trick is also handy if you are using
DOS-PPP by Antonio Molero . DOS-PPP will
write the variable MYIP to the environment after it loads.
NOTE: There can be only 1 environment variable per line.
Specifying e.g. "ETHIP = $(GW_ETH), $(GW_IP)" will
not work as intended.
Place the WATTCP.CFG file in the same subdirectory as the
TCP application programs. If the file is not found there
the programs automatically look for the file in the current
subdirectory of the current disk. Failing that, a message
will be displayed but the program will not necessarily
abort.
You may override the above directory choices by explicitly
setting the path in an environment variable.
eg. set wattcp.cfg=c:\internet
The environment variable is checked first, and if it is
defined, then that config file is used. This is particularly
useful on installations where the software is located on a
fileserver, but individual workstations will need separate
configuration files.
Testing
First, to ensure that you entered all the parameters
correctly, run TCPINFO. It will list all system constants.
If one or more of them seem incorrect, check your spelling
in the WATTCP.CFG file.
Next we will test the PING command to see that everything
works and asks another computer if it is up. The first
argument to PING is the name of the other computer. The
'-c' argument is the number of ping's to perform. Since your
guru supplied the ip address of a nameserver, we will first
try that.
ping -c5 129.97.128.1 don't use 129.97.128.1,
use your gateway's IP
address
This will generate five attempts. You should have more than
0 % success. Otherwise your gateway is down or your ip
address or gateway is wrong.
If you had success, try pinging the ip address of your
nameserver.
eg. ping 129.97.128.196 5
Now check your nameserver by trying to resolve the name of a
local machine. Near me is a machine named 'cupid'.
ping cupid 5
If that did not work, your various nameserver entries are
incorrect, your gateway or network mask is incorrect, your
nameservers did not want to provide name service, or you did
not specify a valid name.
These tests will help your guru figure out what might be
wrong.
Applications
TCPINFO
Displays the current Ethernet/TCP configuration. It is
useful for testing spelling and contents of files and
for determining ethernet addresses.
PING
PING [-vdfst] [-c count] [-w wait] [-p pattern]
hostname
You have already seen PING described briefly in the
installation section. PING will not generate more than
one request per second, it also attempts to block
broadcast attempts.
PING can be used in a debugging mode (-d or /d).
eg. PING -d 129.97.128.1
If you do not specify the number of attempts to be
made, only one attempt will be made.
eg. PING 129.97.128.196
Specifying '-s' will ping the other machine once per
second for a very long time.
eg. PING -s 129.97.128.196
Run PING -? for explanation of other options
COOKIE
COOKIE [-da] [-s host]
eg. COOKIE
COOKIE -s conehead.uwaterloo.ca
Print a witty saying from one of the cookie servers.
DAYTIME
Print the time of day using TCP
DAYTIME host [-d]
eg. DAYTIME 129.97.128.1
DAYTIME watmath.uwaterloo.ca
If the host supports TCP based DAYTIME text services,
the time of day will be displayed as a text string.
See also NTIME
FINGER
Determine user or system information
FINGER [-vdD] [user]@host
eg. FINGER erick@sunee.uwaterloo.ca
FINGER @sunee.uwaterloo.ca
Finger returns the remote computer's information on a
particular user.
If no user is specified, FINGER will return the names
of currently logged users on that machine.
LPR
Spool print jobs
LPQ
Query the print queue
Run these commands with no arguments for the exact
syntax. Check to see that the appropriate host
privileges are extended to the pc.
An explanation beyond this is beyond the scope of
this brief document, see your local UNIX guru with
HOSTS.LPR or whatever s/he feels is
appropriate.
NTIME
Set DOS time from the Network.
NTIME host [-dDv] [-a addminutes]
NTIME contacts the host and requests the current time.
Computers are supposed to respond with the number of
seconds since Jan 1, 1900 GMT. Many simply return the
current time adjusted to the daylight savings time and
time zone. I allow you to use option 'a' to specify
addminutes if you need to add or subtract a certain
number of minutes to the returned time. Option 'd' sets
TCP-debugging to level 1. Option 'D' sets debugging to
level 2. Option 'v' prints version with which NTIME was
compiled and the compilation date.
I was considering using a DST conversion algorithm but
have not yet done so.
TCPPORT
Treat the serial port as a TCP connection
TCPPORT host port "program options"
Host is the name or ip address of the remote computer
and port is the TCP port number on that computer.
You may specify the terminal emulation desired by
setting the environment variable
set tcpterm=termtype
eg. set tcpterm=vt102
See the section on TCPPORT below
REXEC
Execute the following command on a remote host
REXEC host [user [pass]] cmd
The "cmd" command will be executed on the remote
computer. If you fail to specify either the password
or the userid, you will be prompted for them.
eg. rexec hq.iraq "ls -l"
rexec hq.iraq saddam "ls -l"
rexec hq.iraq saddam white_flag_of_victory "ls"
REXEC does not do terminal interpretation, you may wish
to have NANSI.SYS loaded to provide the necessary
emulation. Waterloo TCP REXEC is good when you wish to
redirect output to a file.
Other WATTCP Programs
The above programs are relatively simple demonstrations of
the capabilities of the WATTCP TCP/IP kernal. Advanced
programs are usually distributed separately as they tend to
be updated in a different schedule from the kernal
libraries.
MSKERMIT 3.11
One of the first popular uses for WATTCP was its
ability to make communication programs such as MSKERMIT
act like TELNET facilities. So overwhelming was the
number of requests that MSKERMIT 3.11 now includes a
derivative of the WATTCP kernal and the TCPPORT
application.
TELNETD
The next most popular use is easily TELNETD, a program
which allows you to TELNET into your pc and control it
using any TELNET program on any computer platform.
TELNETD can be found via anonymous ftp to
sunee.uwaterloo.ca in pub/wattcp/telnetd.zip.
Using Communications Programs with TCPPORT
You may wish to use a terminal communication program rather
than TELNET. Waterloo TCP makes this very easy to do with
its TCPPORT program. Now that TCPPORT is built into
MSKermit I don't really have a good example, but here goes:
Start by creating a configuration file which tells your com
program to use the BIOS ports rather than hardware. Then
create a batch file which looks like:
TNCOMM.BAT
echo off
tcpport %1 23 "c:\comm"
Here I was assuming you kept comm.exe in the root of C: and
tcpport could be found somewhere in the path. Now you can
easily TELNET to any host by typing:
TNCOMM host
eg. TNCOMM 129.97.128.1
or TNCOMM watmath.uwaterloo.ca
After you log off, Waterloo TCP returns the characters
forming [??Host closed connection??] or some similar
message. You simply need to exit your com program. Exiting
kermit without logging off will simply close the connection
and typically log you off.
You may select a specific terminal emulation which TCPPORT
should try to run by setting the tcpterm environment
variable before running tcpterm:
eg. set tcpterm=vt102
Advanced WATTCP.CFG Options
This section is useful once you have determined that
Waterloo TCP actually works for you.
Including Sub-Config Files
You may wish to use a combination of generic WATTCP.CFG
file and a smaller sub-config file which will be
located on the user's private subdirectory. Any
command which can be placed in the main config file may
also be placed (or replaced) in the sub-command file.
eg.
include = c:\local.cfg
After the subcommand file is parsed, Wattcp returns to
the main config file. The depth of this system is
limited by the number of file handles and the stack
size.
If the subcommand file cannot be found, an error
message will be printed. To allow for the possible,
but not-essential existance of a file (i.e., include it
if it is there, but don't complain otherwise) you may
simply prepend the filename with a question mark.
eg.
include = ?c:\local.cfg
IP Addresses
Most network administrators would prefer to not have
many copies of the configuration file, but rather a
single file from which everyone can be easily
configured.
As demonstrated above, Waterloo TCP normally accepts
the ip number from within the WATTCP.CFG file.
BOOTP
Many sites prefer to use BOOTP, a standard protocol
which requests the user's ip address and other
information from a BOOTP server.
To use BOOTP, you must specify the name 'bootp':
my_ip = bootp
in the config file. This will broadcast the request on
the local subnet. You may specify a specific BOOTP
server which need not be on the same subnet, by using:
bootp = host
eg. bootp = 129.97.128.1
The default timeout value is 30 seconds. You may
change that by using:
bootpto = seconds
eg. bootpto = 50
If no WATTCP.CFG file is found, Waterloo TCP programs
always resort to BOOTP.
DHCP
A modern replacement for BOOTP is DHCP (Dynamic Host
Configuration Protocol). Specify use of DHCP by:
my_ip = dhcp
in the config file. See readme.3rd for other DHCP
options
ETHERNET to IP Table
Another option currently exists, I allow multiple IP
numbers in WATTCP.CFG with each one being tied to a
particular Ethernet address. If y ... ...
近期下载者:
相关文件:
收藏者: