📄 index.pl
字号:
#!/usr/bin/perl
@imageNames = (
'totalAccess',
'totalAlerts',
'usedMemory',
'runningThread',
'uniqueIp',
'maxAccess',
'getRequests',
'postRequests',
'otherMethodRequest',
'10XResponses',
'20XResponses',
'30XResponses',
'4XXResponses',
'50XResponses'
);
@names = (
'Total Access',
'Total Alerts',
'Used Memory',
'Running Threads',
'Unique IP Addresses',
'Max Access',
'GET Requests',
'POST Requests',
'non GET/POST Requests',
'10X Responses',
'20X Responses',
'30X Responses',
'4XX Responses',
'50X Responses'
);
$index = $ARGV[ 0 ];
$next = $index + 1;
if( $next == @names )
{
$next = "index";
}
print << "_EOD_";
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META HTTP-EQUIV="Refresh" CONTENT="300">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" content="no-cache">
<title>Guardian\@JUMPERZ.NET - Console</title>
<style>
<!--
html {
margin: 0px;
padding: 0px;
}
BODY {
font-family : verdana;
font-size : 12px;
color : black;
background-color: white;
}
.text {
font-family : verdana;
font-size : 12px;
color : black;
}
.item {
font-family : verdana;
font-size : 10px;
}
A:link {
text-decoration : underline;
color : #000000;
}
A:visited {
text-decoration : underline;
color : #000000;
}
A:active {
text-decoration : underline;
color : red;
}
-->
</style>
</head>
<body>
<table class="text" border="0" width="100%">
<tr height="400">
<td width="20"></td>
<td valign="top">
<table class="text" width="100%" cellpadding="4" border="0">
<tr>
<td colspan="7">
<img src="logo.gif">
</td>
<td>
</td>
</tr>
<tr>
</td>
<td width="16%">
</td>
</tr>
</table>
<hr size="1">
<table class="text" width="100%" cellpadding="4" border="0">
<tr>
<td width="500">
<table class="text" border="0" width="100%" cellpadding="4">
<tr>
<td width="400"><h2>$names[ $index ]</h2></td>
<td align="left"><a href="$next.html">>>Next</a></td>
</tr>
</table>
<img src="$imageNames[ $index ]1.png"><br><br>
<img src="$imageNames[ $index ]2.png"><br><br>
<img src="$imageNames[ $index ]3.png"><br><br>
</td>
<td valign="top" width="140">
<table class="text" border="0" cellpadding="4" width="100%">
<tr bgcolor="#dddddd" width="12%" align="center">
<td align="left">
<a href="index.html">View1</a>
</td>
</tr>
<tr bgcolor="#dddddd" width="12%" align="center">
<td align="left">
<a href="v2.html">View2</a>
</td>
</tr>
<tr bgcolor="#dddddd" width="12%" align="center">
<td align="left">
<a href="v3.html">View3</a>
</td>
</tr>
<tr bgcolor="#dddddd" width="12%" align="center">
<td align="left">
<a href="v4.html">View4</a>
</td>
</tr>
</table>
<br>
<table class="text" border="0" cellpadding="4">
_EOD_
$count = @names;
for( $i = 0; $i < $count; $i++ )
{
if( $i == $index )
{
print '<tr bgcolor="#ffcc66" width="12%" align="center"><td align="left">'; print "\n";
print $names[ $i ]; print "\n";
print '</td></tr>'; print "\n";
}
else
{
print '<tr bgcolor="#dddddd" width="12%" align="center"><td align="left">'; print "\n";
print '<a href="' . $i . '.html">' . $names[ $i ] . '</a>'; print "\n";
print '</td></tr>'; print "\n";
}
}
print << "_EOD_";
</table>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr size="1">
</body>
</html>
_EOD_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -