mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
Now running as sudo is not compulsory.
#182 , Now it will only show a print to suggest to run as admin. Then it will be continue even without sudo or admin ....
This commit is contained in:
parent
065070c1ee
commit
d003f27518
|
@ -56,11 +56,11 @@ def checkPermissions():
|
||||||
if os.getuid() == 0:
|
if os.getuid() == 0:
|
||||||
print("{0}Permissions granted!".format(GREEN))
|
print("{0}Permissions granted!".format(GREEN))
|
||||||
else:
|
else:
|
||||||
raise PermissionError("{0}Permissions denied! Please run as '{1}sudo{0}'".format(RED, GREEN))
|
print("{0}If possible!! Please run as sudo !!".format(RED))
|
||||||
elif systemos() == 'Windows':
|
elif systemos() == 'Windows':
|
||||||
if ctypes.windll.shell32.IsUserAnAdmin() != 0:
|
if ctypes.windll.shell32.IsUserAnAdmin() != 0:
|
||||||
print("{0}Permissions granted!".format(GREEN))
|
print("{0}Permissions granted!".format(GREEN))
|
||||||
else:
|
else:
|
||||||
raise PermissionError("{0}Permissions denied! Please run as Administrator".format(RED))
|
print("{0}If possible! Please run as administrator!".format(RED))
|
||||||
else:
|
else:
|
||||||
raise PermissionError("{0}Permissions denied! Unexpected platform".format(RED))
|
raise PermissionError("{0}Permissions denied! Unexpected platform".format(RED))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user