|
|
@@ -6,6 +6,10 @@ import ctypes
|
|
|
from route.tool.func import *
|
|
|
from route import *
|
|
|
|
|
|
+if platform.system() == 'Linux':
|
|
|
+ for for_a in os.listdir("route_go"):
|
|
|
+ os.system('chmod -x ./route_go/' + for_a)
|
|
|
+
|
|
|
# Init-Version
|
|
|
with open('version.json', encoding = 'utf8') as file_data:
|
|
|
version_list = json.loads(file_data.read())
|
|
|
@@ -641,18 +645,26 @@ app.route('/easter_egg')(main_func_easter_egg)
|
|
|
|
|
|
def main_easter_egg_go():
|
|
|
with get_db_connect() as conn:
|
|
|
- lib = ctypes.cdll.LoadLibrary('./route_go/main_easter_egg.so')
|
|
|
- lib.Do.restype = ctypes.c_char_p
|
|
|
+ print(platform.machine())
|
|
|
+ if platform.system() == 'Linux':
|
|
|
+ if platform.machine() == 'AMD64':
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "main_easter_egg.amd64.bin")).read()
|
|
|
+ else:
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "main_easter_egg.arm64.bin")).read()
|
|
|
+ else:
|
|
|
+ if platform.machine() == 'AMD64':
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "main_easter_egg.amd64.exe")).read()
|
|
|
+ else:
|
|
|
+ data = os.popen(os.path.join(".", "route_go", "main_easter_egg.arm64.exe")).read()
|
|
|
|
|
|
return easy_minify(flask.render_template(skin_check(),
|
|
|
imp = ['Easter Egg', wiki_set(), wiki_custom(), wiki_css([0, 0])],
|
|
|
- data = str(lib.Do(), 'utf-8'),
|
|
|
+ data = data,
|
|
|
menu = 0
|
|
|
))
|
|
|
|
|
|
app.route('/easter_egg_go')(main_easter_egg_go)
|
|
|
|
|
|
-
|
|
|
# views -> view
|
|
|
app.route('/view/<path:name>')(main_view)
|
|
|
app.route('/views/<path:name>')(main_view)
|