Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
318 richard 1
<?php
2
/*
3
 * firewall Eyes
4
 * Copyright (C) 2004 Creabilis
5
 * 
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 2 of the License, or (at
9
 * your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful, but
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
 *
20
 */
21
include("configuration.php");
22
include("include.php");
23
 
24
// authentification check
25
authenticationCheck();
26
 
27
// Date in the past
28
header("Expires: Mon, 26 Jul 2009 00:00:00 GMT");
29
 
30
// always modified
31
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
32
 
33
// HTTP/1.1
34
header("Cache-Control: no-store, no-cache, must-revalidate");
35
header("Cache-Control: post-check=0, pre-check=0", false);
36
 
37
// HTTP/1.0
38
header("Pragma: no-cache");
39
 
40
set_time_limit (120);
41
 
42
// GET INPUT
43
$type=stripslashes($_GET["type"]);
44
$p1=stripslashes($_GET["p1"]);
45
 
46
$tool=stripslashes($_GET["tool"]);
47
 
48
$toolsArray=$tools[$type];
49
 
50
 
51
$maxWidth=0;
52
for($i=0; $i<count($logFields); $i++) {
53
	$maxWidth+=$logFields[$i][2];
54
}
55
?>
56
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
57
<html>
58
	<head>
59
		<title>informations</title>
60
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
61
		<link href="log.css" rel="stylesheet" type="text/css"/>
62
	</head>
63
 
64
	<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
65
<div align="left" style="padding-left:18px">
66
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
67
<tr>
68
	<td class="toolBox">
69
		<form method="GET" action="info.php">
70
			<br/>
71
			<b>Informations on </b>
72
			<input type="text" name="p1" class="inputText" maxlength="100" value="<?=htmlentities(stripslashes($p1))?>">
73
			<input type="hidden" name="type" value="<?=htmlentities(stripslashes($type))?>">
74
			<br/><br/>&nbsp;
75
			<?php
76
			foreach($toolsArray as $toolName=>$toolInfos) {
77
				?>
78
				<input class="toolbutton" type="submit" name="tool" value="<?=htmlentities($toolName)?>">&nbsp;&nbsp;
79
				<?php
80
			}
81
			?>
82
		</form>
83
	</td>
84
</tr>
85
</table>
86
<?php
87
flush();
88
if($tool) {
89
	if($toolsArray[$tool]["type"]=="command") {
90
		$myCommand=$toolsArray[$tool]["value"];
91
		$myparam=$p1;
92
		if($toolsArray[$tool]["precompute"]=="extractdomain") {
93
			if (preg_match("/\d+\.\d+\.\d+\.\d+/", $p1)) { // it's an ip address
94
				$myparam=$p1;
95
			} else {
96
				$myparam=substr(strstr($p1,"."),1); // remove first part of canonical name
97
			}
98
		}
99
		$myCommand=str_replace("%p1%",$myparam,$myCommand);
100
	}
101
	if($toolsArray[$tool]["type"]=="url") {
102
		$myCommand=$toolsArray[$tool]["value"];
103
		$myCommand=str_replace("%p1%",urlencode($p1),$myCommand);
104
 
105
	}
106
?>
107
<br/>
108
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
109
<tr>
110
	<td class="toolCommandBoxHeader">
111
	 <?php
112
		if($toolsArray[$tool]["type"]=="url") {
113
	 	?>
114
	 		<a style="color: #FFFFFF" href="<?=$myCommand?>" target="q"><?=$myCommand?></a>
115
	 	<?php
116
		} else {
117
			echo($myCommand);
118
		}
119
 
120
		?>
121
 
122
	</td>
123
</tr>
124
</table>
125
<?php
126
flush();
127
?>
128
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>">
129
<tr>
130
	<td class="toolCommandBox">
131
		<?php
132
	if($toolsArray[$tool]["type"]=="command") {
133
		echo("<pre>");
134
		passthru(escapeshellcmd($myCommand));
135
		echo("</pre>");
136
	}
137
	if($toolsArray[$tool]["type"]=="url") {
138
		?>
139
		<iframe name="window_recherche_affaire_resultat" src="<?=$myCommand?>" width="<?=$maxWidth+5?>" height="750"  FRAMEBORDER=0>
140
		Your browser doesn't support iframe, unable to get url.
141
		</iframe>
142
		<?php
143
	}
144
		?>
145
	</td>
146
</tr>
147
</table>
148
<?php
149
}
150
?>
151
<br>
152
<table border="0" cellpadding="0" cellspacing="0" width="<?=$maxWidth?>" class="footer">
153
  <tr>
154
	<td align="center">
155
	<A HREF="http://www.creabilis.com" target="creabilis">Firewall Eyes</A> - <A HREF="http://www.gnu.org/licenses/gpl.html">GPL</A> - Creabilis © 2004 - Web site : <A HREF="http://firewalleyes.creabilis.com">http://firewalleyes.creabilis.com</A>
156
	</td>
157
  </tr>
158
</table>
159
</div>
160
</body>
161
</html>