|
Posted by Krustov on 03/28/07 18:40
I wrote this a while ago and found it comes in very handy at times .
For example , If you want to know what webpages use a certain stylesheet
its just a matter of typing in the stylesheet name and searching for it
..
If found , It will display the *****.php filename and the line number
the stylesheet was found on .
Obviously you can search for any string or variable etc .
aaasearch.php so its always at the top of the folder .
<?php
$skunk=$_SERVER['REMOTE_ADDR']; $rambo=str_replace(".","_",$skunk);
$pass=1;
if ($rambo<>"127_0_0_1") {$pass=0;}
if ($pass==0) {print " online search not allowed
online"; exit;}
?>
Personally i dont upload the file to the webspace - but if you do then
you could add something like the above if wanted .
<html>
<head>
<title>null</title>
</head>
<body text="#FF0000" link="#FF0000" vlink="#FF0000" alink="#FF0000"
class="ta_background">
<br>
<table width="950" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td>
<a href="aaasearch.php" class="bbb">Search</a>
</td>
</tr>
</table>
<br>
<?php
$zentry=$_REQUEST['entry'];
if ($zentry=="") {$zentry="nowt";}
?>
<?php
$batman=0;
$dir=".";
$joker=opendir($dir);
while (false!==($boywonder=readdir($joker)))
{
$files[]=$boywonder;
$batman=$batman+1;
}
$temp=0; $loopy=1;
while ($temp<$batman)
{
$demo=$files[$temp];
$pace=strlen($demo);
$junk=substr($demo,$pace-4,4);
if ($junk==".php") {$kk[$loopy]=$demo; $loopy=$loopy+1;}
$temp=$temp+1;
}
?>
<br>
<table border="0" cellspacing="2" cellpadding="0" align="center">
<form action="aaasearch.php" method="post">
<tr>
<td><input type="text" name="entry" value="<?php print $zentry; ?>"
size="77" class="ta_delivery_form_06"></td>
<td class="bba"> </td>
<td><input type="submit" name="Submit" value="SEARCH PHP FILES"
class="ta_form_button"></td>
</tr>
<input type="hidden" name="user" value="<?php print $uzi; ?>">
</form>
</table>
<br>
<table width="950" border="0" cellspacing="1" cellpadding="0"
align="center">
<tr>
<td>
<?php
$jazz=1;
while ($jazz<$loopy)
{
$rocky=0;
$demo=$kk[$jazz];
$filename="$demo"; $fp=fopen($filename,"r");
while (!feof($fp))
{
$qaz=fgets($fp); $wsx=trim($qaz); $edc=stripslashes($wsx);
$hod[$rocky]=$edc;
$rocky=$rocky+1;
}
fclose($fp);
$rocky=$rocky-1;
$zentry=strtolower($zentry);
$lainey=1;
while ($lainey<$rocky)
{
$hod[$lainey]=strtolower($hod[$lainey]);
$rip=" $hod[$lainey] ";
$witt=strpos($rip,$zentry);
$grab=$lainey+1;
if ($witt==true) {print "<span class=bbb><b>$demo ... $grab <br></b>
</span>";}
$lainey=$lainey+1;
}
$jazz=$jazz+1;
}
?>
</td>
</tr>
</table>
<br><br>
</BODY>
</HTML>
Navigation:
[Reply to this message]
|