You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: 3wifi.php
+21-30
Original file line number
Diff line number
Diff line change
@@ -5,21 +5,12 @@
5
5
Header('Location: /');
6
6
exit;
7
7
}
8
+
include'config.php';
8
9
require_once'user.class.php';
9
10
require_once'utils.php';
10
11
require_once'db.php';
11
12
require_once'quadkey.php';
12
13
13
-
$topPort = 30;
14
-
$topauth = 100;
15
-
$topname = 30;
16
-
$topbssid = 30;
17
-
$topessid = 30;
18
-
$topSecurity = 30;
19
-
$topWiFiKey = 30;
20
-
$topWPSPIN = 30;
21
-
$topDNS = 30;
22
-
$topSid = 10;
23
14
24
15
$action = $_GET['a'];
25
16
@@ -1127,7 +1118,7 @@ function highlightWords($text, array $words)
1127
1118
case'stdev':
1128
1119
set_time_limit(30);
1129
1120
$json['result'] = true;
1130
-
$json['stat']['top'] = $topname;
1121
+
$json['stat']['top'] = TOP_NAME;
1131
1122
if (!db_connect())
1132
1123
{
1133
1124
$json['result'] = false;
@@ -1140,7 +1131,7 @@ function highlightWords($text, array $words)
1140
1131
$json['stat']['total'] = (int)$row[0];
1141
1132
$res->close();
1142
1133
}
1143
-
if ($res = QuerySql("SELECT `name`, COUNT(name) FROM BASE_TABLE WHERE `name` != '' GROUP BY `name` ORDER BY COUNT(name) DESC LIMIT $topname"))
1134
+
if ($res = QuerySql("SELECT `name`, COUNT(name) FROM BASE_TABLE WHERE `name` != '' GROUP BY `name` ORDER BY COUNT(name) DESC LIMIT ".TOP_NAME))
1144
1135
{
1145
1136
$json['stat']['data'] = array();
1146
1137
while ($row = $res->fetch_row())
@@ -1159,7 +1150,7 @@ function highlightWords($text, array $words)
1159
1150
case'stport':
1160
1151
set_time_limit(30);
1161
1152
$json['result'] = true;
1162
-
$json['stat']['top'] = $topPort;
1153
+
$json['stat']['top'] = TOP_PORT;
1163
1154
if (!db_connect())
1164
1155
{
1165
1156
$json['result'] = false;
@@ -1172,7 +1163,7 @@ function highlightWords($text, array $words)
1172
1163
$json['stat']['total'] = (int)$row[0];
1173
1164
$res->close();
1174
1165
}
1175
-
if ($res = QuerySql("SELECT `Port`, COUNT(Port) FROM BASE_TABLE WHERE NOT(`Port` IS NULL) GROUP BY `Port` ORDER BY COUNT(Port) DESC LIMIT $topPort"))
1166
+
if ($res = QuerySql("SELECT `Port`, COUNT(Port) FROM BASE_TABLE WHERE NOT(`Port` IS NULL) GROUP BY `Port` ORDER BY COUNT(Port) DESC LIMIT ".TOP_PORT))
1176
1167
{
1177
1168
$json['stat']['data'] = array();
1178
1169
while ($row = $res->fetch_row())
@@ -1191,7 +1182,7 @@ function highlightWords($text, array $words)
1191
1182
case'stauth':
1192
1183
set_time_limit(30);
1193
1184
$json['result'] = true;
1194
-
$json['stat']['top'] = $topauth;
1185
+
$json['stat']['top'] = TOP_AUTH;
1195
1186
if (!db_connect())
1196
1187
{
1197
1188
$json['result'] = false;
@@ -1204,7 +1195,7 @@ function highlightWords($text, array $words)
1204
1195
$json['stat']['total'] = (int)$row[0];
1205
1196
$res->close();
1206
1197
}
1207
-
if ($res = QuerySql("SELECT `Authorization`, COUNT(Authorization) FROM BASE_TABLE WHERE `Authorization`!='' GROUP BY `Authorization` ORDER BY COUNT(Authorization) DESC LIMIT $topauth"))
1198
+
if ($res = QuerySql("SELECT `Authorization`, COUNT(Authorization) FROM BASE_TABLE WHERE `Authorization`!='' GROUP BY `Authorization` ORDER BY COUNT(Authorization) DESC LIMIT ".TOP_AUTH))
1208
1199
{
1209
1200
$json['stat']['data'] = array();
1210
1201
while ($row = $res->fetch_row())
@@ -1223,7 +1214,7 @@ function highlightWords($text, array $words)
1223
1214
case'stbss':
1224
1215
set_time_limit(30);
1225
1216
$json['result'] = true;
1226
-
$json['stat']['top'] = $topbssid;
1217
+
$json['stat']['top'] = TOP_BSSID;
1227
1218
if (!db_connect())
1228
1219
{
1229
1220
$json['result'] = false;
@@ -1236,7 +1227,7 @@ function highlightWords($text, array $words)
1236
1227
$json['stat']['total'] = (int)$row[0];
1237
1228
$res->close();
1238
1229
}
1239
-
if ($res = QuerySql("SELECT `BSSID`, COUNT(BSSID) FROM BASE_TABLE WHERE `NoBSSID`=0 GROUP BY `BSSID` ORDER BY COUNT(BSSID) DESC LIMIT $topbssid"))
1230
+
if ($res = QuerySql("SELECT `BSSID`, COUNT(BSSID) FROM BASE_TABLE WHERE `NoBSSID`=0 GROUP BY `BSSID` ORDER BY COUNT(BSSID) DESC LIMIT ".TOP_BSSID))
1240
1231
{
1241
1232
$json['stat']['data'] = array();
1242
1233
while ($row = $res->fetch_row())
@@ -1255,7 +1246,7 @@ function highlightWords($text, array $words)
1255
1246
case'stess':
1256
1247
set_time_limit(30);
1257
1248
$json['result'] = true;
1258
-
$json['stat']['top'] = $topessid;
1249
+
$json['stat']['top'] = TOP_ESSID;
1259
1250
if (!db_connect())
1260
1251
{
1261
1252
$json['result'] = false;
@@ -1268,7 +1259,7 @@ function highlightWords($text, array $words)
1268
1259
$json['stat']['total'] = (int)$row[0];
1269
1260
$res->close();
1270
1261
}
1271
-
if ($res = QuerySql('SELECT `ESSID`, COUNT(ESSID) FROM BASE_TABLE GROUP BY `ESSID` ORDER BY COUNT(ESSID) DESC LIMIT '.$topessid))
1262
+
if ($res = QuerySql('SELECT `ESSID`, COUNT(ESSID) FROM BASE_TABLE GROUP BY `ESSID` ORDER BY COUNT(ESSID) DESC LIMIT '.TOP_ESSID))
1272
1263
{
1273
1264
$json['stat']['data'] = array();
1274
1265
while ($row = $res->fetch_row())
@@ -1287,7 +1278,7 @@ function highlightWords($text, array $words)
1287
1278
case'stsec':
1288
1279
set_time_limit(30);
1289
1280
$json['result'] = true;
1290
-
$json['stat']['top'] = $topSecurity;
1281
+
$json['stat']['top'] = TOP_SECURITY;
1291
1282
if (!db_connect())
1292
1283
{
1293
1284
$json['result'] = false;
@@ -1300,7 +1291,7 @@ function highlightWords($text, array $words)
1300
1291
$json['stat']['total'] = (int)$row[0];
1301
1292
$res->close();
1302
1293
}
1303
-
if ($res = QuerySql('SELECT `Security`, COUNT(Security) FROM BASE_TABLE GROUP BY `Security` ORDER BY COUNT(Security) DESC LIMIT '.$topSecurity))
1294
+
if ($res = QuerySql('SELECT `Security`, COUNT(Security) FROM BASE_TABLE GROUP BY `Security` ORDER BY COUNT(Security) DESC LIMIT '.TOP_SECURITY))
1304
1295
{
1305
1296
$json['stat']['data'] = array();
1306
1297
while ($row = $res->fetch_row())
@@ -1319,7 +1310,7 @@ function highlightWords($text, array $words)
1319
1310
case'stkey':
1320
1311
set_time_limit(30);
1321
1312
$json['result'] = true;
1322
-
$json['stat']['top'] = $topWiFiKey;
1313
+
$json['stat']['top'] = TOP_WIFI_KEY;
1323
1314
if (!db_connect())
1324
1315
{
1325
1316
$json['result'] = false;
@@ -1332,7 +1323,7 @@ function highlightWords($text, array $words)
1332
1323
$json['stat']['total'] = (int)$row[0];
1333
1324
$res->close();
1334
1325
}
1335
-
if ($res = QuerySql('SELECT `WiFiKey`, COUNT(WiFiKey) FROM BASE_TABLE GROUP BY `WiFiKey` ORDER BY COUNT(WiFiKey) DESC LIMIT '.$topWiFiKey))
1326
+
if ($res = QuerySql('SELECT `WiFiKey`, COUNT(WiFiKey) FROM BASE_TABLE GROUP BY `WiFiKey` ORDER BY COUNT(WiFiKey) DESC LIMIT '.TOP_WIFI_KEY))
1336
1327
{
1337
1328
$json['stat']['data'] = array();
1338
1329
while ($row = $res->fetch_row())
@@ -1351,7 +1342,7 @@ function highlightWords($text, array $words)
1351
1342
case'stwps':
1352
1343
set_time_limit(30);
1353
1344
$json['result'] = true;
1354
-
$json['stat']['top'] = $topWPSPIN;
1345
+
$json['stat']['top'] = TOP_WPS_PIN;
1355
1346
if (!db_connect())
1356
1347
{
1357
1348
$json['result'] = false;
@@ -1364,7 +1355,7 @@ function highlightWords($text, array $words)
1364
1355
$json['stat']['total'] = (int)$row[0];
1365
1356
$res->close();
1366
1357
}
1367
-
if ($res = QuerySql('SELECT `WPSPIN`, COUNT(WPSPIN) FROM BASE_TABLE WHERE `WPSPIN` != 1 GROUP BY `WPSPIN` ORDER BY COUNT(WPSPIN) DESC LIMIT '.$topWPSPIN))
1358
+
if ($res = QuerySql('SELECT `WPSPIN`, COUNT(WPSPIN) FROM BASE_TABLE WHERE `WPSPIN` != 1 GROUP BY `WPSPIN` ORDER BY COUNT(WPSPIN) DESC LIMIT '.TOP_WPS_PIN))
1368
1359
{
1369
1360
$json['stat']['data'] = array();
1370
1361
while ($row = $res->fetch_row())
@@ -1383,7 +1374,7 @@ function highlightWords($text, array $words)
1383
1374
case'stdns':
1384
1375
set_time_limit(30);
1385
1376
$json['result'] = true;
1386
-
$json['stat']['top'] = $topDNS;
1377
+
$json['stat']['top'] = TOP_DNS;
1387
1378
if (!db_connect())
1388
1379
{
1389
1380
$json['result'] = false;
@@ -1407,7 +1398,7 @@ function highlightWords($text, array $words)
1407
1398
SELECT DNS2 AS DNS FROM BASE_TABLE WHERE DNS2 != 0
1408
1399
UNION ALL
1409
1400
SELECT DNS3 AS DNS FROM BASE_TABLE WHERE DNS3 != 0) DNSTable
1410
-
GROUP BY DNS ORDER BY COUNT(DNS) DESC LIMIT $topDNS"))
1401
+
GROUP BY DNS ORDER BY COUNT(DNS) DESC LIMIT ".TOP_DNS))
1411
1402
{
1412
1403
$json['stat']['data'] = array();
1413
1404
while ($row = $res->fetch_row())
@@ -1426,7 +1417,7 @@ function highlightWords($text, array $words)
1426
1417
case'stsid':
1427
1418
set_time_limit(30);
1428
1419
$json['result'] = true;
1429
-
$json['stat']['top'] = $topSid;
1420
+
$json['stat']['top'] = TOP_SSID;
1430
1421
1431
1422
if (!db_connect())
1432
1423
{
@@ -1442,7 +1433,7 @@ function highlightWords($text, array $words)
1442
1433
$res->close();
1443
1434
}
1444
1435
1445
-
if ($res = $db->query('SELECT nick, COUNT(id) FROM uploads LEFT JOIN users USING(uid) GROUP BY uploads.uid ORDER BY COUNT(id) DESC LIMIT '.$topSid))
1436
+
if ($res = $db->query('SELECT nick, COUNT(id) FROM uploads LEFT JOIN users USING(uid) GROUP BY uploads.uid ORDER BY COUNT(id) DESC LIMIT '.TOP_SSID))
0 commit comments