|
1 | | -# Copyright (c) Local Encrypted Transfer by Loxy0dev |
| 1 | +# Copyright (c) Local Encrypted Transfer by Loxy0devlp |
| 2 | +# Licensed under the MIT License. |
| 3 | +# See LICENSE file in the project root for full license text. |
2 | 4 |
|
3 | 5 | from flask import Flask, request, render_template_string, send_from_directory, send_file |
4 | 6 | import os, socket, colorama, sys, ctypes, json |
5 | 7 |
|
6 | 8 | credits = { |
7 | 9 | "tool_name" : "Local Encrypted Transfer", |
8 | 10 | "tool_version" : "1.0", |
9 | | - "developer" : "loxy0dev", |
10 | | - "github" : "github.com/loxy0devlp/Local-Encrypted-Transfer", |
| 11 | + "tool_license" : "MIT License", |
| 12 | + "tool_github" : "github.com/loxy0devlp/Local-Encrypted-Transfer", |
| 13 | + "developer" : "loxy0devlp", |
11 | 14 | "gunslol" : "guns.lol/loxy0dev" |
12 | 15 | } |
13 | 16 |
|
| 17 | +colorama.init() |
14 | 18 | color = colorama.Fore |
15 | 19 | white = color.WHITE |
16 | 20 | reset = color.RESET |
|
33 | 37 | | |__( <_> ) \___ / __ \| |__ | | | | \// __ \| | \\___ \ | | \ ___/| | \/ |
34 | 38 | |________\____/ \_____>______/____/ |____| |__| (______/___|__/______> |__| \_____>__| |
35 | 39 | |
36 | | - {white + credits['github']} |
| 40 | + {white + credits["tool_github"]} |
37 | 41 | """ |
38 | 42 |
|
39 | 43 | path_tool = os.path.dirname(os.path.abspath(__file__)) |
|
49 | 53 | with open(path_file_config, "r", encoding="utf-8") as file: data_config = json.load(file) |
50 | 54 | with open(path_file_css, "r", encoding="utf-8") as file: content_css = file.read() |
51 | 55 | with open(path_file_javascript, "r", encoding="utf-8") as file: content_javascript = file.read() |
52 | | -with open(path_file_html, "r", encoding="utf-8") as file: content_html = file.read().replace("/*%CSS%*/", content_css).replace("/*%JAVASCRIPT%*/", content_javascript).replace("/*%TITLE1%*/", f"{credits["tool_name"]} v{credits["tool_version"]} (by {credits["developer"]})").replace("/*%TITLE2%*/", credits["tool_name"]).replace(r"/*%GITHUB%*/", credits["github"]).replace(r"/*%DEVELOPER%*/", credits["developer"]) |
| 56 | +with open(path_file_html, "r", encoding="utf-8") as file: content_html = file.read().replace("/*%CSS%*/", content_css).replace("/*%JAVASCRIPT%*/", content_javascript).replace("/*%TITLE1%*/", f"{credits["tool_name"]} v{credits["tool_version"]} (by {credits["developer"]})").replace("/*%TITLE2%*/", credits["tool_name"]).replace(r"/*%GITHUB%*/", credits["tool_github"]).replace(r"/*%DEVELOPER%*/", credits["developer"]) |
53 | 57 |
|
54 | 58 | HOST = data_config["host"] |
55 | 59 | PORT = data_config["port"] |
@@ -85,7 +89,6 @@ def SaveFilesJson(data): |
85 | 89 | with open(path_file_logs, "w", encoding="utf-8") as file: json.dump(data, file, indent=2) |
86 | 90 |
|
87 | 91 | def Start(): |
88 | | - colorama.init() |
89 | 92 | Title() |
90 | 93 | CreateFolderAndFile() |
91 | 94 | app = Flask(__name__) |
|
0 commit comments