-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
712 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data/css/* linguist-vendored | ||
lib/* linguist-vendored=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:80", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
<?php | ||
// |====================================================| | ||
// | download.php | | ||
// | Copyright (c) 2018 Belikhun. | | ||
// | This file is licensed under MIT license. | | ||
// |====================================================| | ||
|
||
require_once $_SERVER["DOCUMENT_ROOT"]."/lib/api_ecatch.php"; | ||
require_once $_SERVER["DOCUMENT_ROOT"]."/lib/ratelimit.php"; | ||
require_once $_SERVER["DOCUMENT_ROOT"]."/lib/belipack.php"; | ||
require_once $_SERVER["DOCUMENT_ROOT"]."/config.php"; | ||
|
||
if (!islogedin()) | ||
stop(9, "Bạn chưa đăng nhập.", 403); | ||
|
||
if (!isset($_GET["f"])) | ||
stop(21, "Missing GET parameter f.", 400); | ||
|
||
$file = $_GET["f"]; | ||
$file = str_replace("\"", "", $file); | ||
$file = str_replace("/", "", $file); | ||
|
||
$username = $_SESSION["username"]; | ||
|
||
if ((strpos($file, "[". $username ."]") > 0) && ($publish == 1)) { | ||
header("Content-type: text/plain"); | ||
header("Content-Disposition: attachment; filename=\"". $file ."\""); | ||
readfile($logsDir ."\\". $file); | ||
die(); | ||
} else | ||
stop(8, "Lỗi không xác định...", 500); | ||
?> | ||
<?php | ||
// |====================================================| | ||
// | getlog.php | | ||
// | Copyright (c) 2018 Belikhun. | | ||
// | This file is licensed under MIT license. | | ||
// |====================================================| | ||
|
||
require_once $_SERVER["DOCUMENT_ROOT"]."/lib/api_ecatch.php"; | ||
require_once $_SERVER["DOCUMENT_ROOT"]."/lib/ratelimit.php"; | ||
require_once $_SERVER["DOCUMENT_ROOT"]."/lib/belipack.php"; | ||
require_once $_SERVER["DOCUMENT_ROOT"]."/config.php"; | ||
|
||
if (!islogedin()) | ||
stop(9, "Bạn chưa đăng nhập.", 403); | ||
|
||
if (!isset($_GET["f"])) | ||
stop(21, "Missing GET parameter f.", 400); | ||
|
||
$file = $_GET["f"]; | ||
$file = str_replace("\"", "", $file); | ||
$file = str_replace("/", "", $file); | ||
|
||
$username = $_SESSION["username"]; | ||
|
||
if (!(strpos($file, "[". $username ."]") > 0) || $publish == false) | ||
stop(8, "Lỗi không xác định...", 400); | ||
|
||
$line = Array(); | ||
|
||
$logf = fopen($logsDir ."/". $file, "r"); | ||
while (($l = fgets($logf)) !== false) | ||
array_push($line, str_replace(PHP_EOL, "", $l)); | ||
|
||
stop(0, "Success!", 200, $line); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.