mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
Improved platform detection code
This commit is contained in:
parent
444ae10e2a
commit
fee7c05d71
|
@ -194,15 +194,23 @@ def verify_connection(host='https://dark-sec-official.com'): # Connection check
|
||||||
|
|
||||||
def check_permissions():
|
def check_permissions():
|
||||||
|
|
||||||
if platform_os() != "Windows":
|
# if platform_os() != "Windows":
|
||||||
|
# if getuid() == 0:
|
||||||
|
# print(localization.lang_check_permissions["permissions_granted"])
|
||||||
|
# else:
|
||||||
|
# print(localization.lang_check_permissions["permissions_denied"])
|
||||||
|
# exit()
|
||||||
|
# else:
|
||||||
|
# print(localization.lang_check_permissions["windows_warning"])
|
||||||
|
# exit()
|
||||||
|
## Everything above will be replaced ##
|
||||||
|
|
||||||
|
if check_platform("system") == "Linux":
|
||||||
if getuid() == 0:
|
if getuid() == 0:
|
||||||
print(localization.lang_check_permissions["permissions_granted"])
|
print(localization.lang_check_permissions["permissions_granted"])
|
||||||
else:
|
else:
|
||||||
print(localization.lang_check_permissions["permissions_denied"])
|
print(localization.lang_check_permissions["permissions_denied"])
|
||||||
exit()
|
exit()
|
||||||
else:
|
|
||||||
print(localization.lang_check_permissions["windows_warning"])
|
|
||||||
exit()
|
|
||||||
|
|
||||||
def check_php():
|
def check_php():
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user