Online Status

We have 3 guests online

Portal Organisasi

Indonesia-Globegmnisumedang.or.id

NETCAT: How to install netcat from Package and Source


Installing Netcat as a Package

Most distributions have Netcat pre-compiled as a package. Some may even have more than one version, or different implementations with different functionality. Note, as we did above, that these packages are not likely to have the execute option enabled (and generally for good reason). For example, to install Netcat from a pre-compiled package on a Debian system, type apt-get install netcat (see Figure).

tools - netcat1

The figure shows the simple Netcat package installation process. Notice that in this case, Netcat has no dependencies, even on this minimalist install of Debian. Also notice the package name netcat_1.10-32_i386.deb. The key here is 1.10, which is the version information. This confirms that this package is in fact compiled from the original UNIX Netcat as opposed to GNU Netcat. Furthermore, nc –h reveals that this package has been pre-compiled with the all-powerful –e option.

 

Installing Netcat from Source

If you want to compile it from source code, you have two options, which are more or less the same thing, with one important exception. First is the original UNIX Netcat, which can be found at www.vulnwatch.org/netcat. Your second option is GNU Netcat, which is located at netcat.sourceforge.net. The key difference between these two versions of Netcat is that the original Netcat requires manual configuration to compile with the –e option, while GNU Netcat does it automatically. This manual configuration is not complicated, but can be tricky if you’re not used to looking at source code.

If you’re relatively new to Linux and compiling a program from the source code seems daunting, rest easy. The entire installation process is simple and easy, and takes all of a few minutes. For the sake of this installation, and so we can install Netcat without having to manually configure the –e option, we’ll download, configure, and compile the GNU version of Netcat:

wget http://osdn.dl.sourceforge.net/sourceforge/netcat/netcat-0.7.1.tar.gz
tar –xzf netcat-0.7.1.tar.gz
cd netcat-0.7.1
./configure
make
make install

Your first step toward installation is to download the source. You can choose to use the simple wget command-line utility, as shown in Figure 1.3, or download via a Web browser or other means.

tools - netcat2

Next, un-tar the archive and change into the newly created Netcat directory. Then, configure Netcat (see figure below). The configure script creates a configuration file called Makefile.

tools - netcat3

The make command builds the binary (Netcat executable file) from the Makefile created in the previous step. The make install command installs Netcat to your system. Note that running make install does require root privileges. That’s it! You’ll find that, more often than not, this is a fairly common set of procedures for installing programs to Linux from source code.

Depending upon the version of Netcat that you install, the executable binary may be nc or netcat. For the sake of conformity throughout this chapter, we’ll use nc.



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! TwitThis Joomla Free PHP
Hits: 669
Comments (2)Add Comment

Write comment

busy