• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Anyone know of any good netcat tutorials?

Son Goku

No lover of dogma
Umm, OK, I'm a bit lost here. Today's assignment includes

create a script using NC to create a server and client that uses a port not presently registere that logs in and gives you a shell
I'm currently trying to find a tutorial that describes the use of netcat, but don't seem to be finding something via google that's all too good in describing this for someone totally unfamiliar with the netcat command. Anyone know of any kind of tutorial or something, that can get me started in figuring out how to use this so I can then script it? There doesn't seem to be any man pages on it either...

thx in advance...


Political User
That's easy. Not much too it. Some simple shell scripting, and you are on your way. Since this is a homework assignment, i will complete the work required in exactly 1 week from now, or now at an onetime charge of $120.

You don't need a tutorial at all for this.

I'll give you a hint:

man nc

Incase you don't have the man page local, here it is on the web: http://www.freebsd.org/cgi/man.cgi?...ath=FreeBSD+5.3-RELEASE+and+Ports&format=html


Political User
Like i had said, i'd give it to you in a week:

mkfifo in; nc -l 5000 < in | bash > in 2>&1
The 2>&1 causes all errors that bash reports, to be put into the pipe in as well, so that if you type in a bad command it will tell you.

Do note: no promt is available, as bash is not running on a TTY.

nc localhost 5000
and talk shell. standard commands like ps auxww, and whatnot all work. Only thing to watch out for, when bash dies, nc does not know. So you'd need to script it to check wether bash is dead or not, also, only one client at a time, but you never specified you need multiple. Otherwise it's still an easy fix, just a bit more scripting needed.

Son Goku

No lover of dogma
OK, thx

Actually a chat client is what the whole class was getting first...as the students started messaging each other in class :D

The teacher mentioned 2 lines...I'm gathering you incorporated both into a single command line...

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member