PluginProbe ʕ •ᴥ•ʔ
Anti-Malware Security and Brute-Force Firewall / 4.23.73
Anti-Malware Security and Brute-Force Firewall v4.23.73
4.23.90 trunk 1.2.03.23 1.3.02.15 3.07.06 4.14.47 4.15.16 4.16.17 4.17.28 4.17.29 4.17.44 4.17.57 4.17.58 4.17.68 4.17.69 4.18.52 4.18.62 4.18.63 4.18.69 4.18.71 4.18.74 4.18.76 4.19.44 4.19.50 4.19.68 4.19.69 4.20.59 4.20.72 4.20.92 4.20.93 4.20.94 4.20.95 4.20.96 4.21.74 4.21.83 4.21.84 4.21.85 4.21.86 4.21.87 4.21.88 4.21.89 4.21.90 4.21.91 4.21.92 4.21.93 4.21.94 4.21.95 4.21.96 4.23.56 4.23.57 4.23.67 4.23.68 4.23.69 4.23.71 4.23.73 4.23.77 4.23.81 4.23.83 4.23.85 4.23.87 4.23.88 4.23.89
gotmls / safe-load / session.php
gotmls / safe-load Last commit date
.htaccess 11 years ago index.php 1 year ago session.php 1 year ago trace.php 1 year ago wp-login.php 1 year ago wp-settings.php 1 year ago
session.php
78 lines
1 <?php
2 /**
3 * GOTMLS SESSION Start
4 * @package GOTMLS
5 * @since 4.23.73
6 */
7
8 require_once(dirname(__FILE__)."/trace.php");
9
10 if (!defined("GOTMLS_SESSION_TIME")) {
11 define("GOTMLS_SESSION_TIME", microtime(true));
12
13 function GOTMLS_session_start($ID_sess = false) {
14 if (!session_id())
15 GOTMLS_define("SESS_TEST", @session_start());
16 if (!($GOTMLS_LOGIN_KEY = session_id()))
17 GOTMLS_define("SESS_FILE", $GOTMLS_LOGIN_KEY = GOTMLS_session_file());
18 if (isset($_SESSION["GOTMLS_SESSION_TIME"]))
19 $_SESSION["GOTMLS_SESSION_LAST"] = $_SESSION["GOTMLS_SESSION_TIME"];
20 else
21 $_SESSION["GOTMLS_SESSION_LAST"] = 0;
22 $_SESSION["GOTMLS_SESSION_TIME"] = GOTMLS_SESSION_TIME;
23 return md5($GOTMLS_LOGIN_KEY.GOTMLS_SESSION_TIME.serialize($_SERVER));
24 }
25
26 function GOTMLS_session_close() {
27 if (defined("SESS_FILE"))
28 GOTMLS_session_file($_SESSION["GOTMLS_server_time"]);
29 if (session_id())
30 session_write_close();
31 }
32
33 function GOTMLS_session_die($output, $header = "Content-type: text/javascript") {
34 if ($header)
35 @header($header);
36 GOTMLS_session_close();
37 die($output);
38 }
39
40 function GOTMLS_session_init($GOTMLS_server_times = array()) {
41 if (!(isset($_SESSION["GOTMLS_server_time"]) && is_array($_SESSION["GOTMLS_server_time"])))
42 $_SESSION["GOTMLS_server_time"] = array();
43 if (defined("GOTMLS_SESSION_TIME") && !(isset($_SESSION["GOTMLS_server_time"]["time_START"]) && is_numeric($_SESSION["GOTMLS_server_time"]["time_START"])))
44 $_SESSION["GOTMLS_server_time"]["time_START"] = GOTMLS_SESSION_TIME;
45 if (defined("GOTMLS_LOGIN_PROTECTION") && !(isset($_SESSION["GOTMLS_server_time"]["sess_ID"]) && strlen($_SESSION["GOTMLS_server_time"]["sess_ID"]) == 32))
46 $_SESSION["GOTMLS_server_time"]["sess_ID"] = GOTMLS_LOGIN_PROTECTION;
47 if (is_array($GOTMLS_server_times) && count($GOTMLS_server_times))
48 $_SESSION["GOTMLS_server_time"] = array_replace_recursive($_SESSION["GOTMLS_server_time"], $GOTMLS_server_times);
49 }
50
51 function GOTMLS_session_file($GOTMLS_server_times = array()) {
52 if (defined("GOTMLS_INSTALL_TIME") && defined("GOTMLS_SESSION_FILE")) {
53 GOTMLS_session_init();
54 $GOTMLS_server_times["GOTMLS_LOGIN_ARRAY"] = array("ADDR" => GOTMLS_REMOTEADDR, "AGENT" => (isset($_SERVER["HTTP_USER_AGENT"])?$_SERVER["HTTP_USER_AGENT"]:"HTTP_USER_AGENT"), "TIME"=>GOTMLS_INSTALL_TIME);
55 $GOTMLS_LOGIN_KEY = md5(serialize($GOTMLS_server_times["GOTMLS_LOGIN_ARRAY"]));
56 $LAST_HOUR = GOTMLS_encode_njG(intval(GOTMLS_SESSION_TIME) - 3600);
57 $THIS_HOUR = GOTMLS_encode_njG(intval(GOTMLS_SESSION_TIME));
58 if (!defined("GOTMLS_LOG_FILE"))
59 define("GOTMLS_LOG_FILE", dirname(GOTMLS_SESSION_FILE)."/gotmls_$THIS_HOUR.$GOTMLS_LOGIN_KEY.php");
60 if (is_file(GOTMLS_LOG_FILE))
61 include(GOTMLS_LOG_FILE);
62 elseif (is_file($LOG_FILE = dirname(GOTMLS_SESSION_FILE)."/gotmls_$LAST_HOUR.$GOTMLS_LOGIN_KEY.php"))
63 include($LOG_FILE);
64 if (is_array($GOTMLS_server_times) && count($GOTMLS_server_times))
65 $_SESSION["GOTMLS_server_time"] = array_replace_recursive($_SESSION["GOTMLS_server_time"], $GOTMLS_server_times);
66 if (GOTMLS_save_contents(GOTMLS_LOG_FILE, '<?php $_SESSION["GOTMLS_server_time"] = array_replace_recursive($_SESSION["GOTMLS_server_time"], GOTMLS_uckserialize(GOTMLS_decode("'.GOTMLS_encode(serialize($_SESSION["GOTMLS_server_time"]), "D").'")));')) {
67 if (is_array($sess_files = scandir(dirname(GOTMLS_SESSION_FILE))))
68 foreach ($sess_files as $sess_file)
69 if (is_file(dirname(GOTMLS_SESSION_FILE)."/$sess_file") && preg_match('/^gotmls_(?!'.$LAST_HOUR.')(?!'.$THIS_HOUR.')\w{3}\.[a-f\d]{32}\.php$/i', $sess_file))
70 @unlink(dirname(GOTMLS_SESSION_FILE)."/$sess_file");
71 return $GOTMLS_LOGIN_KEY;
72 } else
73 return 0;
74 } else
75 return false;
76 }
77 }
78