📄 checklog.cgi
字号:
#!/usr/bin/perl
#############################################################
# Ikonboard v2.1
# Copyright 2000 Ikondiscussion.com - All Rights Reserved
# Ikondiscussion is a trademark of Ikondiscussion.com
#
# Software Distributed by: Ikondiscussion.com
# Visit us online at http://www.ikondiscussion.com
# Email us on boards@ikondiscussion.com
#
# All files written by Matthew Mecham
#############################################################
#use CGI::Carp "fatalsToBrowser"; # Output errors to browser
use CGI qw(:standard); # Saves loads of work
$CGI::POST_MAX=1024 * 150; # limit post data
$CGI::DISABLE_UPLOADS = 1; # Disable uploads
eval {
($0 =~ m,(.*)/[^/]+,) and unshift (@INC, "$1");
($0 =~ m,(.*)\\[^\\]+,) and unshift (@INC, "$1");
require "ikon.lib"; # Require ikonboard ()
require "ikonadmin.lib"; # Require Admin func()
require "data/progs.cgi"; # Require prog names
require "data/boardinfo.cgi";# Require board info
require "data/styles.cgi"; # Require styles info
};
if ($@) {
print header(-charset=>"gb2312"); print start_html(-title=>"ib2000 出错!");
print "不能够找到文件:$@\n如果您使用的是 Windows 类操作系统,请在每一个程序中更改 require 的设置,填入绝对路径!";
print end_html; exit;
}
$|++; # Unbuffer the output
#################--- Begin the program ---###################
$thisprog = "checklog.cgi";
$query = new CGI;
$boardurltemp =$boardurl;
$boardurltemp =~ s/http\:\/\/(\S+?)\/(.*)/\/$2/;
$cookiepath = $boardurltemp;
$cookiepath =~ s/$thisprog//sg;
$wordarray = $query -> param('wordarray');
$action = $query -> param("action");
$action = &cleaninput("$action");
$inmembername = cookie("adminname");
$inpassword = cookie("adminpass");
print header(-charset=>"gb2312");
&admintitle;
&getmember("$inmembername");
# &adminlogin if ($userregistered eq "no");
if (($membercode eq "ad") && ($inpassword eq $password) && ($inmembername eq $membername)) {
if ($action eq "delete") {
$filetotrash = "$ikondir" . "data/hacklog.cgi";
unlink $filetotrash;
print qq(
<tr><td bgcolor=#333333" colspan=2><font face=宋体 color=#FFFFFF>
<b>欢迎来到 ib2000 论坛管理中心 / 检测 hack 日志</b>
</td></tr>
<tr>
<td bgcolor=#EEEEEE valign=middle align=center colspan=2>
<font face=宋体 color=#333333><b>Hack 日志</b>
</td></tr>
<tr>
<td bgcolor=#FFFFFF valign=middle colspan=2>
<font face=宋体 color=#000000>
<b>hack 已经被全部删除</b>
</font></td>
</tr>
<tr>
<td bgcolor=#FFFFFF valign=middle colspan=2>
<font face=宋体 color=#000000>
<br>);
}
else {
print qq(
<tr><td bgcolor=#333333" colspan=2><font face=宋体 color=#FFFFFF>
<b>欢迎来到 ib2000 论坛管理中心 / 检测 hack 日志</b>
</td></tr>
<tr>
<td bgcolor=#EEEEEE valign=middle align=center colspan=2>
<font face=宋体 color=#333333><b>Hack 日志</b>
</td></tr>
<tr>
<td bgcolor=#FFFFFF valign=middle colspan=2>
<font face=宋体 color=#000000>
<b>请注意:</b><br><br>
这个 hack 日志信息仅供参考。它并不是说明有 hack 攻击过这里。这些信息请务必保密!
</font></td>
</tr>
<tr>
<td bgcolor=#FFFFFF valign=middle colspan=2>
<font face=宋体 color=#000000>
<br>);
$filetoopen = "$ikondir" . "data/hacklog.cgi";
if (-e $filetoopen) {
open (LOG, "$filetoopen");
local $/ = undef;
$raw_data = <LOG>;
close (LOG);
@hackdata = split(/\------Log Entry------/,$raw_data);
print @hackdata;
print qq~<br><br>End of report - <a href="$thisprog?action=delete">删除所有的日志</a>~;
}
else {
print "Hack 日志为空";
}
} # end show log
}
else {
&adminlogin;
}
print qq~</td></tr></table></body></html>~;
exit;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -