diff options
| author | cassio <cassiopc@gmail.com> | 2018-08-26 13:41:51 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2018-08-26 13:41:51 +0000 |
| commit | a06d189deec9da695a6c4c3a40c8fbcc9c013d89 (patch) | |
| tree | 9b0c4b3a8d3b8975e2e34640536e26c1503b7dcd /src/logexternal.php | |
| parent | 557b6f0da2721f4ed359e6d91faf8e43dedd1162 (diff) | |
| download | boca-a06d189deec9da695a6c4c3a40c8fbcc9c013d89.tar.gz boca-a06d189deec9da695a6c4c3a40c8fbcc9c013d89.zip | |
increased logs from users of the linux
Diffstat (limited to 'src/logexternal.php')
| -rw-r--r-- | src/logexternal.php | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/logexternal.php b/src/logexternal.php index b85aaef..34b2810 100644 --- a/src/logexternal.php +++ b/src/logexternal.php @@ -17,17 +17,17 @@ ob_end_flush(); function sanitizeFilename($text) { - $text = str_replace("*", "", $text); - $text = str_replace("$", "", $text); - $text = str_replace(")", "", $text); - $text = str_replace("(", "", $text); - $text = str_replace(";", "", $text); - $text = str_replace("&", "", $text); - $text = str_replace("<", "", $text); - $text = str_replace(">", "", $text); - $text = str_replace("\"", "", $text); - $text = str_replace("'", "", $text); - $text = str_replace("`", "", $text); + $text = str_replace("*", "_", $text); + $text = str_replace("$", "_", $text); + $text = str_replace(")", "_", $text); + $text = str_replace("(", "_", $text); + $text = str_replace(";", "_", $text); + $text = str_replace("&", "_", $text); + $text = str_replace("<", "_", $text); + $text = str_replace(">", "_", $text); + $text = str_replace("\"", "_", $text); + $text = str_replace("'", "_", $text); + $text = str_replace("`", "_", $text); $text = addslashes($text); return $text; } @@ -45,7 +45,12 @@ if(isset($_POST["comp"]) && $_POST["comp"] != "" ) { $p = myhash($secret[2] . session_id()); if($p == $password) { @mkdir('/var/www/boca/src/private/logexternal/',0770,true); - @file_put_contents("/var/www/boca/src/private/logexternal/" . $secret[0] . '.' . $name, '\nbegin ' . time() . ' ' . base64_decode($_POST['data']), LOCK_EX | FILE_APPEND); + if(isset($_POST['logsession'])) + @file_put_contents("/var/www/boca/src/private/logexternal/" . $secret[0] . '.' . $name . '.logsession', '\nbegin ' . time() . ' ' . base64_decode($_POST['logsession']), LOCK_EX | FILE_APPEND); + if(isset($_POST['logfs'])) + @file_put_contents("/var/www/boca/src/private/logexternal/" . $secret[0] . '.' . $name . '.logfs', '\nbegin ' . time() . ' ' . base64_decode($_POST['logfs']), LOCK_EX | FILE_APPEND); + if(isset($_POST['logkeys'])) + @file_put_contents("/var/www/boca/src/private/logexternal/" . $secret[0] . '.' . $name . '.logkeys', '\nbegin ' . time() . ' ' . base64_decode($_POST['logkeys']), LOCK_EX | FILE_APPEND); @file_put_contents("/var/www/boca/src/private/logexternal/logexternal.log", $name . "|" . $secret[0] . '|' . date(DATE_RFC2822) . "\n", LOCK_EX | FILE_APPEND); echo "ok\n"; exit; |