From dr146992@sac.sfbay.sun.com Tue Nov 4 03:46:18 2008 Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234]) by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id mA4BkIGi012117 for ; Tue, 4 Nov 2008 03:46:18 -0800 (PST) Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74]) by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id mA4BkDN4009875; Tue, 4 Nov 2008 03:46:13 -0800 (PST) Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by nwk-avmta-1.sfbay.Sun.COM (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005)) id <0K9T00D0R4OZYY00@nwk-avmta-1.sfbay.Sun.COM>; Tue, 04 Nov 2008 03:46:11 -0800 (PST) Received: from dm-sfbay-02.sfbay.sun.com ([129.146.11.31]) by nwk-avmta-1.sfbay.Sun.COM (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005)) with ESMTP id <0K9T00JKN4OYQQB0@nwk-avmta-1.sfbay.Sun.COM>; Tue, 04 Nov 2008 03:46:10 -0800 (PST) Received: from sac.sfbay.sun.com (new-sac.SFBay.Sun.COM [129.146.175.65]) by dm-sfbay-02.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id mA4Bk8aG001831; Tue, 04 Nov 2008 03:46:08 -0800 (PST) Received: from sac.sfbay.sun.com (localhost [127.0.0.1]) by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id mA4BjkUu012112; Tue, 04 Nov 2008 03:45:46 -0800 (PST) Received: (from dr146992@localhost) by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id mA4BjQBD012108; Tue, 04 Nov 2008 03:45:26 -0800 (PST) Date: Tue, 04 Nov 2008 03:45:26 -0800 (PST) From: Darren Reed Subject: Allow complex port list specificition for nc(1) [PSARC/2008/680 Self Review] To: PSARC-ext@sun.com Cc: Vladimir.Kotal@sun.com, erik.trauschke@freenet.de Message-id: <200811041145.mA4BjQBD012108@sac.sfbay.sun.com> Content-transfer-encoding: 7BIT X-PMX-Version: 5.4.1.325704 Status: RO Content-Length: 2838 This case is being submitted on behalf of an external contributor, Erik Trauschke and is considered to be a small, self contained change, that qualifies for automatic approval. This seeks patch binding, although there are no current plans to port this change back. Template Version: @(#)sac_nextcase %I% %G% SMI This information is Copyright 2008 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: Allow complex port list specificition for nc(1) 1.2. Name of Document Author/Supplier: Author: Erik Trauschke 1.3 Date of This Document: 04 November, 2008 4. Technical Description The current implementation of nc(1) only supports a single port or one port range what makes working with multiple ports not belonging to a certain range inconvenient. Therefore nc(1) should accept a list of single ports and port ranges as a parameter to avoid multiple calls to nc(1) for each port or port range. old interface: +-------------------------------------------+-----------------+ |Interfaces: | Comments: | +-------------------------------------------+-----------------+ port_low-port_high | single_port port_range spec new interfaces: +-------------------------------------------+-----------------+ |Interfaces: | Comments: | +-------------------------------------------+-----------------+ port_range1[,port_range2,port_range2,...] port_list spec port_low-port_high | single_port port_range spec Stability level of all interfaces above is changed to Committed. This case is a follow up to PSARC 2007/389 (Netcat in Solaris) --- old/./nc.txt 2008-10-01 18:13:54.809743196 +0200 +++ new/./nc.txt 2008-10-01 18:13:54.801974565 +0200 @@ -314,11 +314,11 @@ port Specify port. port_list - port_list can be specified as single integers - or ranges. Specify ranges in the form of nn-mm. - The port_list must have at least one member, - but can have multiple members separated by - spaces or ranges. + port_list can be specified as single integers, + ranges or combinations of both. Specify ranges + in the form of nn-mm. The port_list must have + at least one member, but can have multiple + ports/ranges separated by commas. In general, a destination port must be @@ -651,6 +651,13 @@ + Using a list of ports and port ranges for a port scan on various ports + + + $ nc -z host.example.com 21-25,53,80,110-120,443 + + + SunOS 5.11 Last change: 6 Dec 2007 10 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: Automatic 6.6. ARC Exposure: open From carlsonj@phorcys.east.sun.com Wed Nov 5 07:52:02 2008 Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245]) by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id mA5Fq2mw012233 for ; Wed, 5 Nov 2008 07:52:02 -0800 (PST) Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74]) by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id mA5FpwXk064931; Wed, 5 Nov 2008 08:52:00 -0700 (MST) Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by nwk-avmta-1.sfbay.Sun.COM (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005)) id <0K9V0092XAQMKM00@nwk-avmta-1.sfbay.Sun.COM>; Wed, 05 Nov 2008 07:51:59 -0800 (PST) Received: from phorcys.east.sun.com ([129.148.174.143]) by nwk-avmta-1.sfbay.Sun.COM (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005)) with ESMTP id <0K9V00MUSAQLT9A0@nwk-avmta-1.sfbay.Sun.COM>; Wed, 05 Nov 2008 07:51:57 -0800 (PST) Received: from phorcys.east.sun.com (localhost [127.0.0.1]) by phorcys.east.sun.com (8.14.3+Sun/8.14.3) with ESMTP id mA5FID7p011432; Wed, 05 Nov 2008 10:18:13 -0500 (EST) Received: (from carlsonj@localhost) by phorcys.east.sun.com (8.14.3+Sun/8.14.3/Submit) id mA5FIDN6011429; Wed, 05 Nov 2008 10:18:13 -0500 (EST) Date: Wed, 05 Nov 2008 10:18:13 -0500 From: James Carlson Subject: Re: Allow complex port list specificition for nc(1) [PSARC/2008/680 Self Review] In-reply-to: <200811041145.mA4BjQBD012108@sac.sfbay.sun.com> To: Darren Reed Cc: PSARC-ext@sun.com, Vladimir.Kotal@sun.com, erik.trauschke@freenet.de Message-id: <18705.47413.202396.495486@gargle.gargle.HOWL> MIME-version: 1.0 X-Mailer: VM 7.01 under Emacs 21.3.1 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-PMX-Version: 5.4.1.325704 References: <200811041145.mA4BjQBD012108@sac.sfbay.sun.com> Status: RO Content-Length: 625 Darren Reed writes: > new interfaces: > > +-------------------------------------------+-----------------+ > |Interfaces: | Comments: | > +-------------------------------------------+-----------------+ > port_range1[,port_range2,port_range2,...] port_list spec > port_low-port_high | single_port port_range spec +1. Extremely obvious. -- James Carlson, Solaris Networking Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677