Welcome to the official GNU Netcat project homepage
The GNU Netcat project

Source of: /source.php


/* this is an easier version tracking tool */
include "reserved/VERSIONS.inc";

/* common functions and defines needed by this page */
include "reserved/misc.inc";

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <title>The GNU Netcat -- Official homepage -- Website source</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="keywords" content="nc, netcat, network, networking, connect, listen, tunnel, tcp, udp, ipv6">
  <meta name="Author" content="Giovanni Giacobbi">
  <link rel="stylesheet" type="text/css" href="/netcat.css">
  <link rel="shortcut icon" href="/favicon.ico">
  <link rel="icon" type="image/png" href="/favicon.ico">

<body bgcolor="#ffffff">


// No file param specified
if (!isset($_GET['url'])) {
"<h1>No page URL specified</h1>\n";

/* include the common parts of the web site */
include "reserved/header.inc";

//include "reserved/navbar.inc"; exit();

<!-- Main Body -->

    <div align="center"><h1>Source of: <?= htmlentities($_GET['url']) ?></h1></div>

    <table border="1" cellspacing="0" cellpadding="3" style="margin-right: 3px;">
<!-- Reset indent, backup=3 -->


// Get dirname of the specified URL part
$dir = dirname($_GET['url']);

// Fix SourceForge environment

// Some dir was present in the filename
if (!empty($dir) && !preg_match("!^(\\.|/)$!", $dir)) {

// Check if the specified dir is valid
$legal_dirs = array(
"/reserved"  => 1
  if ((isset(
$legal_dirs[$dir])) && strpos($dir, "..") === FALSE) {
$page_name = $_SERVER['DOCUMENT_ROOT'] . $_GET['url'];
  } else {
$page_name = FALSE; }
} else {
$page_name = $_SERVER['DOCUMENT_ROOT'] . '/' . basename($_GET['url']);

// Provide some feedback based on the file found
if (!$page_name || @is_dir($page_name)) {
"<p>Invalid file or folder specified</p>\n";
} elseif (
file_exists($page_name)) {
highlight_php(join("", file($page_name)));
} else {
"<p>This file does not exist.</p>\n";


<!-- Restore indent, backup=0 -->


    <table border="0" cellpadding="0" cellspacing="0" width="500">
      <td width="10"></td>
      <td width="470" colspan="2" class="simpletext">You may also be interested in
        the following files, which complete the Netcat website:<br>
          <li><a href="/source.php?url=/reserved/header.inc">header.inc</a><br>
          <li><a href="/source.php?url=/reserved/navbar.inc">navbar.inc</a><br>
          <li><a href="/source.php?url=/reserved/misc.inc">misc.inc</a><br>
          <li><a href="/source.php?url=/reserved/VERSIONS.inc">VERSIONS.inc</a><br>
          <li><a href="/source.php?url=/reserved/NEWS.inc">NEWS.inc</a><br>

      <hr width="70%" align="center">

      <td width="10"></td>


/* include the navigation bar with the latest release info */
include "reserved/navbar.inc";



You may also be interested in the following files, which complete the Netcat website:

Giovanni Giacobbi
E-Mail: My email address
This page was last updated on January, 23rd 2004

Main Menu

Project Summary
Report bugs
Browse SVN Repository

Show this page's source

Releases Status

Current Version:
Netcat 0.7.1

Released on:
11 Jan 2004

Supporters of Netcat

Network Administration Tools