C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RFI5QEM\modules\ipbans\admin.php


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
<?php
require("code.php");
if(
$code != $xcode) {
exit;
}
if(
$online == 1) {
if(
$u_rank >= $rank_required['mod_admin']) {
echo 
"<center><b>Admin : IP Bans</b></center><hr noshade>";
if(
$do == "add_ip") {
if(
$HTTP_POST_VARS['n_ip'] != "") {
$n_ip strip_dir_illegals($HTTP_POST_VARS['n_ip']);
wf($admin_root."/ipbans/".$n_ip.".php","w","*");
dmsg("IP ".$n_ip." has been added to IP Ban list.");
}
if(
$HTTP_POST_VARS['ipb_user'] != "") {
if(
file_exists($root."/users/".strtolower($HTTP_POST_VARS['ipb_user']).".php")) {
require(
$root."/users/".strtolower($HTTP_POST_VARS['ipb_user']).".php");
wf($admin_root."/ipbans/".$remote_ip.".php","w","*");
dmsg("IP ".$HTTP_POST_VARS['ipb_user']." has been added to IP Ban list.");
}
else { 
derr("Invalid user."); }
}
}
if(
$do == "del_ip") {
$ipaddr strip_dir_illegals($ipaddr);
if(
file_exists($admin_root."/ipbans/".$ipaddr.".php")) {
unlink($admin_root."/ipbans/".$ipaddr.".php");
dmsg("IP $ipaddr has been deleted from IP Ban list.");
}
else { 
derr("IP $ipaddr not found."); }
}
echo <<<HTML

<b>Ban IP:</b><br>
<form action="
$admin_url&do=add_ip" method="POST">
IP Address: <input type="text" name="n_ip"><br>
or<br>
User: <select name="ipb_user">
<option value="">Select a User</option>
<option value="">-------------</option>
HTML;
$list = array();
$dir $root."/users";
$handle opendir($dir);
while(
$file readdir($handle)) {
if(!
is_dir($file)) {
if((
$file != ".") && ($file != "..") && ($file != "index.html")) {
require(
$dir."/".$file);
array_push($list,$username);
}
}
}
natcasesort($list);
foreach(
$list as $single) {
echo 
"<option value=\"".$single."\">".$single."</option>\n";
}
echo <<<HTML

</select><br>
<br>
<input type="submit" value="Add IP Ban">
</form><hr>
<table width="100%" border="1" bordercolor="#000000" style="border-collapse: collapse;">
<tr><td colspan="2" align="center"><b>IP Bans</b></td></tr>
<tr><td width="90%"><b>IP</b></td><td width="10%" align="center"><b>Action</b></td></tr>
HTML;
$dir $admin_root."/ipbans";
$handle opendir($dir);
while(
$file readdir($handle)) {
if(!
is_dir($file)) {
if((
$file != ".") && ($file != "..") && ($file != "index.html")) {
$name str_replace(".php","",$file);
echo 
"<tr><td>$name</td><td align=\"center\"><a href=\"$admin_url&do=del_ip&ipaddr=$name\">[Delete]</a></td></tr>";
}
}
}
echo 
"</table><br>";
}
else { 
$viv "Not_Enough_Access"; }
}
else { 
$viv "Not_Logged_In"; }
?>