How do I update NetCat?

Discussion in 'OS X Mavericks (10.9)' started by MacMan988, Oct 31, 2013.

  1. MacMan988 macrumors 6502a

    Joined:
    Jul 7, 2012
    #1
    Hi, how do I check which version of NetCat is installed with OS X and how do I update it if it is not a recent release?
     
  2. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #2
    In the Terminal.app.

    Code:
    MacUser2525:~$ netcat
    -bash: netcat: command not found
    
    So it is not installed though if you were to install MacPorts or most likely similar options like Fink or Homebrew you can get it.

    Code:
    MacUser2525:~$ locate netcat
    /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/gnetcat
    /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/gnetcat/Portfile
    /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/netcat
    /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/netcat/Portfile
    
     
  3. ElectricSheep macrumors 6502

    ElectricSheep

    Joined:
    Feb 18, 2004
    Location:
    Wilmington, DE
    #3
    The command for netcat is nc, not netcat. It should be in /usr/bin/.

    There are many clones of netcat around; you can probably find some via homebrew or macports, or build them yourself from sources.
     
  4. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #4
    And so it is.

    Code:
    MacUser2525:~$ nc --version
    nc: illegal option -- -
    usage: nc [-46AcCDdFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval] [-p source_port]
    	  [-s source_ip_address] [-w timeout] [-X proxy_version]
    	  [-x proxy_address[:port]] [hostname] [port[s]]
    
    Don't want to tell you its version for some reason.
     
  5. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #5
    What does a "man nc" do? (On the iPad right now, but that's what I would do, generally the man pages are pretty okay)
     
  6. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #6
    Not much no version number there page last updated June 25, 2001 so its been a while.
     
  7. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #7
    With Homebrew, I got version 0.7.1

    Code:
    $ brew install netcat
    ==> Downloading http://downloads.sourceforge.net/sourceforge/netcat/netcat-0.7.1.tar.bz2
    This fetches the GNU version:
    Code:
    $ netcat --version
    netcat (The GNU Netcat) 0.7.1
    
     
  8. MacMan988 thread starter macrumors 6502a

    Joined:
    Jul 7, 2012
    #8
    Thans for all replies and sorry for the delayed response as I've been having some issues with my computer. I will try the homebrew method. Btw, once its installed through home-brew, which installation comes up when you type "which nc" in terminal?
     
  9. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #9
    That would depend on how your path is set when using homebrew with MacPorts and rsync I get.

    Code:
    MacUser2525:~$ which rsync
    /opt/local/bin/rsync
    
    Whatever shows up in the path first is the program that will be used.
     
  10. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #10
    Code:
    $ which nc
    /usr/bin/nc
    $ which netcat
    /usr/local/bin/netcat
    
    Apparently, brew installs the GNU version, which has "netcat", and not "nc" as the binary name:

    Code:
    $ netcat --version
    netcat (The GNU Netcat) 0.7.1
     

Share This Page