0% found this document useful (0 votes)
29 views3 pages

NC Command

Netcat is a utility that can be used to establish TCP or UDP connections between computers on the same network. It allows sending and receiving arbitrary text messages without encryption. The document provides an example of using netcat to send a text message between two computers on a local network by starting netcat in listening mode on one computer on port 5000, and connecting to it from the other computer using the hostname and port number. Anything typed on either computer will show up on the other in real-time.

Uploaded by

Pavani N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

NC Command

Netcat is a utility that can be used to establish TCP or UDP connections between computers on the same network. It allows sending and receiving arbitrary text messages without encryption. The document provides an example of using netcat to send a text message between two computers on a local network by starting netcat in listening mode on one computer on port 5000, and connecting to it from the other computer using the hostname and port number. Anything typed on either computer will show up on the other in real-time.

Uploaded by

Pavani N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

S.V.

COLLEGE OF ENGINEERING, TIRUPATI


Exp. No Page No.
Date

Aim
To Send text (mesoge) between two Computers on the Same

network

Desciption:
Tt is quite Simple to build a very basic clentt/.Server model
wing netcat" inshovt "nc
"nc"

netcat:

netcat a utility used for just about anything


Inveluing TCP Or UDP

t t can epen TCP Connections send UDP packets


sten n arbitary TCP and ODP poyts

Unlike telnet nc Seripts nicely and Sepera tes

eroy mesago

nc reguires host name and pot number to establsh


nc

Connection between Sender & he ceiver.

Host name can be numerncal P addregs or a Symbodd

hostnarme

A n general a hostname s giver, unles the-


option s given Cin which the Local host fs wsed)
Page No.
Exp. No.
Date

fovt can be Single integer or angek

In general destination port must be Specitied


2n
Commands

COmputes
O n e ceiving
nc
nc - <port number>

On Sending Computevs

ABET
nc host name> port number

Example
O n eceiving computes
SVCOLLECES
nc -L 5000

On Sendinq computes

nc I72.168.1.102 5000

Now just Start typinq and text wfll Show up m

Once
On other Cormptter you pres Enter

You can use any pot number between 1025 &

65535.
S.V. COLLEGE OF ENGINEERING, TIRUPATI
Exp. No. Page No.

Date

nc fs now LEstenimg m port 5000 fov a connectian

On Second Computer being s tened on 5000

There b Connection between the ports

will
Anything typed on Second computer Console

be Comcatenated to tirst& vice versa ater the


Comnection

nc doesnt
has

Care
been

ohich
Setup
s
BE.TrTETER
being used Server å

which being sed asclient

Connection Can be terrminatedby wmttin9 ctl +C


by
Renember that this not encaypted.

Other Safe methods to Share


There are many

i'nformation between computem over Same netwok

Result
Hence Succenhully Sent ece? ved text Cmess age

tuwo Computer m Same netwok.


between

You might also like