This file is indexed.

/usr/share/htcheck/php/showlink.php is in htcheck-php 1:2.0.0~rc1-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?php

//    showlink.php
//    Shows the info regarding a link
//
//    Part of the ht://Check package
//
//    Copyright (c) 1999-2004 Comune di Prato - Prato - Italy
//    Author: Gabriele Bartolini - Prato - Italy <angusgb@users.sourceforge.net>
//
//    For copyright details, see the file COPYING in your distribution
//    or the GNU General Public License version 2 or later 
//    <http://www.gnu.org/copyleft/gpl.html>
//
//    $Id: showlink.php,v 1.26 2003/12/30 09:39:23 angusgb Exp $

///////
   //    Global settings
///////

include ("./include/global.inc.php");


if (!isset($dbname))
{
   // Error
   DisplayErrMsg($strErrorNoDBSelected);
   echo "<a href=\"index.php\">" . $strMainPage . "</A>";
   die;
}
else
{
   eval("\$strhome = \"$strDBHome \";");
   if (!isset($IDUrl) || !isset($TagPosition) || !isset($AttrPosition))
   {
      // Error
      DisplayErrMsg($strMissingInfo);
      echo "<a href=\"index.php?dbname=". $dbname . "\">". $strhome."</A>";
      die;
   }

   $strSQL = "Select Schedule.Url as DestUrl, SrcUrl.Url as SourceUrl," .
      " Schedule.Status, Link.IDUrlSrc, Link.IDUrlDest," .
      " Link.LinkType, LinkResult, LinkDomain, Link.Anchor, " .
      " Url.Url, Url.StatusCode, Url.ReasonPhrase, Url.ContentType," . 
      " HtmlStatement.Statement, HtmlStatement.Row," .
      " HtmlAttribute.Attribute, HtmlAttribute.Content" .
      " from Url AS SrcUrl, Schedule, Link, HtmlStatement, HtmlAttribute" .
      " LEFT JOIN Url ON Url.IDUrl=Link.IDUrlDest " .
      " WHERE Link.IDUrlSrc=" . $IDUrl . " AND " .
      " Link.TagPosition=" . $TagPosition . " AND " .
      " Link.AttrPosition=" . $AttrPosition . " AND " .
      " SrcUrl.IDUrl=Link.IDUrlSrc AND " .
      " HtmlStatement.IDUrl=" . $IDUrl . " AND " .
      " HtmlAttribute.IDUrl=" . $IDUrl . " AND " .
      " HtmlStatement.TagPosition=Link.TagPosition AND " .
      " HtmlAttribute.TagPosition=Link.TagPosition AND " .
      " HtmlAttribute.AttrPosition=Link.AttrPosition AND " .
      " Schedule.IDUrl=Link.IDUrlDest";

      $result=$MyDB->Query($dbname, $strSQL);
   
   if ($result)
   {
      DisplayErrMsg($MyDB->errmsg);
      die;
   }
   
   if (! $num=$MyDB->NumRows())
   {
      DisplayErrMsg($strNoOccurrencies);
      die;
   }

   // Information retrieved
   $link = $MyDB->FetchArray();
   $URLName = $link["SourceUrl"];
   $DestLink = $link["DestUrl"];
   $ShowURLName = GetURL($URLName);
   $ShowDestLink = GetURL($DestLink);

   if (strlen($link["Anchor"]))
   {
      $DestLink .= "#" . $link["Anchor"];
      $ShowDestLink .= "#" . $link["Anchor"];
   }

   $pagetitle = "Database: $dbname - " . $strShowLink . ": " . $URLName;
   $linkbar = "<a href=\"index.php?dbname=". $dbname . "\">". $strhome ."</A>";
   $linkbar = $linkbar . " | " .
      "<a href=\"javascript:history.go(-1)\">" . $strBack . "</A>";

      
?>
<?php include ("./include/header.inc.php"); ?>
<?php

   // A database and a URL have been selected

?>
<div class="header">
<h4><?php echo $strShowLink; ?>:</h4>
</div>

<div class="content">
 <strong><?php echo $strReferencingUrl; ?></strong>: <a href="showurl.php?dbname=<?php echo $dbname; ?>&IDUrl=<?php echo $link["IDUrlSrc"]; ?>"><?php echo $ShowURLName; ?></A><br>
 <strong><?php echo $strReferencedUrl; ?></strong>: <a href="showurl.php?dbname=<?php echo $dbname; ?>&IDUrl=<?php echo $link["IDUrlDest"]; ?>"><?php echo $ShowDestLink; ?></A><br>
<?php
  if ($link["Anchor"])
  {
?>
 <strong><?php echo $strAnchor; ?></strong>: <?php echo WriteHTML($link["Anchor"]); ?><br>
<?php  
  }
?>
 <strong><?php echo $strRetrievingFlag; ?></strong>: <?php echo WriteHTML($link["Status"]); ?><br>
 <strong><?php echo $strLinkType; ?></strong>: <?php echo GetTextString($link["LinkType"]) ; ?><br>
 <strong><?php echo $strLinkResult; ?></strong>: <?php
   echo GetTextString($link["LinkResult"]); // Show text anyway

   if ($ShowIcons)
   {
?>
<IMG src="img/<?php echo $link["LinkResult"]; ?>.png" alt="<?php
   echo GetTextString($link["LinkResult"]); ?>"
   width="40" height="35" border=1" bordercolor="black"
   align="middle" hspace="5">
<?php
   }

?><br>
 <strong><?php echo $strLinkDomain; ?></strong>: <?php echo GetTextString($link["LinkDomain"]) ; ?><br>
</div>

<div class="header">
<h4><?php echo $strRetrievingInfo; ?></h4>
</div>

<div class="content">
<?php
   if ($link["StatusCode"])
   {
?>
 <strong><?php echo $strStatusCode; ?></strong>: <?php echo WriteHTML($link["StatusCode"]); ?> -
 <strong><?php echo $strReasonPhrase; ?></strong>: <?php echo WriteHTML($link["ReasonPhrase"]); ?> - 
 <strong><?php echo $strContentType; ?></strong>: <?php echo WriteHTML($link["ContentType"]); ?><br>
<?php
   }
   else
   {
?>
<strong><?php echo $strNotRetrieved; ?></strong><br>
<?php
   }

   $MyDB->Free();

   $strSQL = "Select IDUrl from Url WHERE IDUrl=" . $link['IDUrlSrc'] . ' AND Contents IS NOT NULL';

   $result=$MyDB->Query($dbname, $strSQL);
   
   if ($result)
   {
      DisplayErrMsg($MyDB->errmsg);
      die;
   }
   
   if ($num=$MyDB->NumRows())
      $DisplaySource = true;
   else
      $DisplaySource = false;

   $MyDB->Free();

?>
</div>

<div class="header">
<h4><?php echo $strLinkIssued; ?></h4>
</div>

<div class="content">
<strong><?php echo $strHTMLStatement; ?></strong>: &lt;<?php echo WriteHTML($link["Statement"]); ?>&gt;<br>
<strong><?php echo $strHTMLStatementRow; ?></strong>: <?php echo WriteHTML($link["Row"]); ?><br>
<strong><?php echo $strHTMLAttribute; ?></strong>: <?php echo WriteHTML($link["Attribute"]); ?>="<?php echo WriteHTML($link["Content"]); ?>"<br>
</div>

<div class="header">
<h4><?php echo $strOperations; ?></h4>
</div>

<div class="content">
<ul>
<li><a href="<?php echo $URLName; ?>" target="_blank"><?php echo $strOpenReferencingUrl; ?></A> (<?php echo $ShowURLName; ?>)</li>
<li><a href="<?php echo $DestLink; ?>" target="_blank"><?php echo $strOpenReferencedUrl; ?></A> (<?php echo $ShowDestLink; ?>)</li>
<?php
if ($DisplaySource)
{
?>
<li><a href="showsource.php?dbname=<?php echo $dbname; ?>&IDUrl=<?php echo $link["IDUrlSrc"]; ?>&RowNumber=<?php echo $link['Row']; ?>#<?php echo $link['Row']; ?>" target="_urlsource"><?php echo $strShowThisUrlSource; ?></A></li>
<?php
} 
?>
</ul>
</div>

<?php      

}

?>

<br>

<?php include ("./include/footer.inc.php"); ?>