mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
Permissions Check
New - Permissions exeption Created because of error when users try to run HiddenEye from BlackArch repository.
This commit is contained in:
commit
70f0e30bb1
|
@ -1,11 +1,14 @@
|
|||
#Checks functions
|
||||
|
||||
from urllib.request import urlopen
|
||||
from os import path, system
|
||||
from os import *
|
||||
from subprocess import check_output
|
||||
from platform import system as systemos, architecture
|
||||
from wget import download
|
||||
from Defs.Languages import *
|
||||
import os
|
||||
import ctypes
|
||||
|
||||
RED, GREEN, DEFAULT = '\033[91m', '\033[1;32m', '\033[0m'
|
||||
|
||||
installGetText()
|
||||
|
@ -47,3 +50,17 @@ def checkNgrok(): #Ngrok check
|
|||
system('mv ngrok Server/ngrok')
|
||||
system('rm -Rf ' + filename)
|
||||
system('clear')
|
||||
|
||||
def checkPermissions():
|
||||
if systemos() == 'Linux':
|
||||
if os.getuid() == 0:
|
||||
print("{0}Permissions granted!".format(GREEN))
|
||||
else:
|
||||
raise PermissionError("{0}Permissions denied! Please run as '{1}sudo{0}'".format(RED, GREEN))
|
||||
elif systemos() == 'Windows':
|
||||
if ctypes.windll.shell32.IsUserAnAdmin() != 0:
|
||||
print("{0}Permissions granted!".format(GREEN))
|
||||
else:
|
||||
raise PermissionError("{0}Permissions denied! Please run as Administrator".format(RED))
|
||||
else:
|
||||
raise PermissionError("{0}Permissions denied! Unexpected platform".format(RED))
|
||||
|
|
|
@ -11,7 +11,7 @@ from Defs.Actions import *
|
|||
from Defs.Languages import *
|
||||
|
||||
RED, WHITE, CYAN, GREEN, DEFAULT = '\033[91m', '\033[46m', '\033[36m', '\033[1;32m', '\033[0m'
|
||||
|
||||
checkPermissions()
|
||||
installGetText()
|
||||
languageSelector()
|
||||
checkConnection()
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
## HOW TO INSTALL
|
||||
|
||||
### BlackArch official repository
|
||||
```
|
||||
sudo pacman -S hidden-eye
|
||||
```
|
||||
to run just use
|
||||
```
|
||||
sudo hidden-eye
|
||||
```
|
||||
### CLONE
|
||||
```
|
||||
git clone https://github.com/DarkSecDevelopers/HiddenEye.git
|
||||
```
|
||||
|
||||
### RUNNING (In Linux)
|
||||
|
||||
```
|
||||
cd HiddenEye
|
||||
```
|
||||
|
@ -28,13 +34,12 @@ python3 HiddenEye.py
|
|||
|
||||
```
|
||||
OR
|
||||
|
||||
|
||||
```
|
||||
./HiddenEye.py
|
||||
|
||||
```
|
||||
### RUNNING (If distro based on Arch Linux)
|
||||
|
||||
### RUNNING (Arch Linux or Manjaro)
|
||||
```
|
||||
cd HiddenEye
|
||||
```
|
||||
|
@ -55,13 +60,13 @@ chmod 777 HiddenEye.py
|
|||
```
|
||||
|
||||
```
|
||||
python3 HiddenEye.py
|
||||
sudo python3 HiddenEye.py
|
||||
|
||||
```
|
||||
OR
|
||||
|
||||
|
||||
```
|
||||
./HiddenEye.py
|
||||
sudo ./HiddenEye.py
|
||||
|
||||
```
|
||||
|
||||
|
@ -98,11 +103,11 @@ chmod 777 HiddenEye.py
|
|||
|
||||
```
|
||||
```
|
||||
python HiddenEye.py
|
||||
sudo python HiddenEye.py
|
||||
|
||||
or
|
||||
|
||||
./HiddenEye.py
|
||||
sudo ./HiddenEye.py
|
||||
|
||||
```
|
||||
### Running (One Code installation in Termux)
|
||||
|
|
Loading…
Reference in New Issue
Block a user