Netcat in Solaris

CR 4664622 has been integrated into Nevada and will be part of build 80 (which means it will not be part of next SXDE release but I can live with that :)).

During the course of getting the process done I have stumbled upon several interesting obstacles. For example, during ingress Open Source Review I was asked by our open-source caretaker what will be the "support model" for Netcat once it is integrated. I was puzzled. Because, for Netcat, support is not really needed since it has been around for ages (ok, since 1996 according to wikipedia) and is pretty stable piece of code which is basically no longer developed. Nonetheless, this brings some interesting challenges with move to a community model where more and more projects are integrated by people outside Sun (e.g. ksh93 project).

The nc(1) man page will be delivered in build 81. In the meantime you can read Netcat review blog entry which contains the link to updated man page. The older version of the man page is contained in the mail communication for PSARC 2007/389.
Note: I have realized that the ARC case directory does not have to include most up-to-date man page at the time of integration. Only when something _architectural_ changes, then the man page has to be updated (which was not the case with Netcat since we only added new section describing how to setup nc(1) with RBAC). Thanks to Jim for the explanation.

I have some ideas how to make Netcat in Solaris even better and will work to get them done over time. In particular, there are following RFEs: 6515928, 6573202. However, this does not mean that there is only single person who can work on nc(1). Since it is now part of ONNV, anyone is free to hack it.

So, I'd like to invite everyone to participate - if you have an idea how to extend Netcat, what features to add, it is sitting in ONNV waiting for new RFEs (or bugs) and sponsor requests (be sure to read Jayakara Kini's explanation of how to contribute if you're not OpenSolaris contributor yet).

Also, if you're Netcat user and use Netcat in a cool way, I want to hear that !

Comments:

Which netcat? Hobbit's original or GNU's version?

I learned this trick from Hobbit to transfer files over SSH. You can connect to A and B from C, but A cannot connect to B.

A B
\\ /
C

ex:
a=51001
b=51002

On C connect to A and B:
ssh A -L $a:127.0.0.1:$a
ssh B -L $b:127.0.0.1:$b

On A (from):
nc -lvnp $a 127.0.0.1 < file
On B (to):
nc -lvnp $b 127.0.0.1 > file

On C (connect from | to ):
nc -v -w 2 127.0.0.1 $a | nc -v -w2 127.0.0.1 $b

GNU netcat doesn't allow -p and -l together like the Hobbit's version.

Posted by Tom on December 03, 2007 at 08:18 AM CET #

Actually neither :) See my previous Netcat post for details.

Nice usage scenario :)

We too don't do 'nc -lnvp port addr' but the same can be achieved by 'nc -lnv addr port'. Apart from that it should work flawlessly in Solaris using /usr/bin/nc.

Posted by Vladimir Kotal on December 03, 2007 at 11:44 AM CET #

Thank you ...!!!

Posted by uday naikwadi on January 20, 2008 at 01:08 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

blog about security and various tools in Solaris

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today