aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2018-08-26 13:41:51 +0000
committercassio <cassiopc@gmail.com>2018-08-26 13:41:51 +0000
commita06d189deec9da695a6c4c3a40c8fbcc9c013d89 (patch)
tree9b0c4b3a8d3b8975e2e34640536e26c1503b7dcd /src
parent557b6f0da2721f4ed359e6d91faf8e43dedd1162 (diff)
downloadboca-a06d189deec9da695a6c4c3a40c8fbcc9c013d89.tar.gz
boca-a06d189deec9da695a6c4c3a40c8fbcc9c013d89.zip
increased logs from users of the linux
Diffstat (limited to 'src')
-rw-r--r--src/logexternal.php29
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;