forked from mjac/Solar-Empire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti_check.php
More file actions
45 lines (34 loc) · 1.24 KB
/
multi_check.php
File metadata and controls
45 lines (34 loc) · 1.24 KB
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
<?php
require_once('inc/user.inc.php');
/*if($user['login_id'] != ADMIN_ID) {
print_page('Access Denied','Admin Only!!!!');
}*/
$text = <<<END
<h1>Multi-Scanner</h1>
<p>This Multi Scanner does not tell you whether or not these players are guilty.
The purpose of this scanner is simply to present the facts. The scanner will
find players with the same IP address.</p>
<h2>IP address</h2>
END;
$ipList = mysql_query("SELECT DISTINCT `last_ip` FROM `{$db_name}_users` ORDER BY `last_ip`");
while(list($ip) = mysql_fetch_row($ipList)) {
$associated = mysql_query("SELECT `login_id` FROM `{$db_name}_users` WHERE `last_ip`='$ip' ORDER BY `login_name`");
if (mysql_num_rows($associated) <= 1) {
continue;
}
$badGuy = array();
while (list($id) = mysql_fetch_row($associated)) {
$badGuy[] = array('login_id' => $id);
}
$host = gethostbyaddr($ip);
$text .= "\n<h3><a href=\"ip_search.php?ip=$ip\" title=\"$ip\">" .
($host === $ip ? $ip : $host) . "</a> (" . count($badGuy) .
" players)</h3>\n<ul>";
foreach ($badGuy as $info) {
$text .= "\n\t<li><a href=\"player_info.php?target={$info['login_id']}\">" .
print_name($info) . "</a></li>";
}
$text .= "\n</ul>";
}
print_page('Multi Scanner',$text);
?>