GitLab Changes Pushed

This commit is contained in:
AnonUD4Y 2020-05-02 17:49:04 +05:30 committed by GitHub
parent aacce835ea
commit 58c8009af1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,12 +19,10 @@ def checkConnection(host='https://google.com'): # Connection check
try: try:
req = requests.get(host, timeout=10) req = requests.get(host, timeout=10)
if req.status_code == 200: if req.status_code == 200:
print("{0}HURRAY!! Internet is available.. We can Continue{1}".format( print("\n{1}[{0}>{1}] {0}INTERNET {0}- {2}[CONNECTED]".format(GREEN, RED,DEFAULT))
GREEN, DEFAULT))
print("\n\n{0}Wait! Checking for Neccesary Packages{1}...\n ".format(
GREEN, DEFAULT))
return True return True
except: except:
print("\n{1}[{0}>{1}] {0}INTERNET {0}- {1}[NOT-CONNECTED]".format(GREEN, RED))
return False return False
@ -38,10 +36,9 @@ if checkConnection() == False:
'''.format(RED, DEFAULT)) '''.format(RED, DEFAULT))
exit() exit()
def verCheck(): def verCheck(): #Version Check For Latest Updates.
system('clear') print("\n{1}[{0}>{1}] {0}Checking For Updates{2}...".format(GREEN, RED, DEFAULT ))
print("{1}[{0}>{1}] {0}Checking For Updates{2}...".format(GREEN, RED, DEFAULT )) ver_url = 'https://gitlab.com/An0nUD4Y/hiddeneye/-/raw/master/version.txt'
ver_url = 'https://raw.githubusercontent.com/darksecdevelopers/hiddeneye/master/version.txt'
ver_rqst = requests.get(ver_url) ver_rqst = requests.get(ver_url)
ver_sc = ver_rqst.status_code ver_sc = ver_rqst.status_code
if ver_sc == 200: if ver_sc == 200:
@ -66,21 +63,20 @@ def verCheck():
sleep(5) sleep(5)
system("clear") system("clear")
else: else:
print('{1}[{0}^{1}] {0}Failed To Get Update [Status:{1}{3}{0}]\n'.format(GREEN, RED, DEFAULT)) print('{1}[{0}^{1}] {0}Failed To Get Update [Status:{1}ErrorCodeReturn{0}]\n'.format(GREEN, RED, DEFAULT))
def checkPHP(): # PHP installation Check def checkPHP(): # PHP installation Check
if 256 != system('which php > /dev/null'): # Checking if user have PHP if 256 != system('which php > /dev/null'):
print(" {2}* {0}PHP INSTALLATION FOUND".format(GREEN, DEFAULT, RED)) print("\n{1}[{0}>{1}] {0}PHP {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
else:
print("{0}**{2} PHP NOT FOUND\n {0}** {2} Installing PHP... ".format(RED, GREEN, DEFAULT))
system('apt-get install php > /dev/null')
else:
print("{1}[{0}>{1}] {0}PHP {0}- {1}[NOT-INSTALLED]\n{1}[{0}>{1}] {0}Installing PHP... ".format(GREEN, RED, DEFAULT))
system('apt-get install php > /dev/null 2>&1')
checkPHP()
def checkNgrok(): # Ngrok check def checkNgrok(): # Ngrok check
if path.isfile('Server/ngrok') == False: # Is Ngrok downloaded? if path.isfile('Server/ngrok') == False: # Is Ngrok downloaded?
print('[*] Ngrok Not Found !!') print("{1}[{0}>{1}] {0}NGROK {0}- {1}[NOT-INSTALLED]".format(GREEN, RED))
print('[*] Downloading Ngrok...') print("{1}[{0}>{1}] {0}Installing NGROK...".format(GREEN, RED))
if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))): if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))):
filename = 'ngrok-stable-linux-arm.zip' filename = 'ngrok-stable-linux-arm.zip'
else: else:
@ -90,18 +86,21 @@ def checkNgrok(): # Ngrok check
else: else:
filename = 'ngrok-stable-{0}-386.zip'.format(ostype) filename = 'ngrok-stable-{0}-386.zip'.format(ostype)
url = 'https://bin.equinox.io/c/4VmDzA7iaHb/' + filename url = 'https://bin.equinox.io/c/4VmDzA7iaHb/' + filename
req = requests.get(url , verify= False) req = requests.get(url , verify=False)
with open(filename, "wb") as file_obj: with open(filename, "wb") as file_obj:
file_obj.write(req.content) file_obj.write(req.content)
system('unzip ' + filename) system('unzip ' + filename + '> /dev/null 2>&1')
system('mv ngrok Server/ngrok') system('mv ngrok Server/ngrok > /dev/null 2>&1')
system('rm ' + filename) system('rm ' + filename + '> /dev/null 2>&1')
system('clear') print("{1}[{0}>{1}] {0}NGROK {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
elif path.isfile('Server/ngrok') == True:
print("{1}[{0}>{1}] {0}NGROK {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
def checkOpenport(): # Openport Check def checkOpenport(): # Openport Check
if 256 == system('which openport > /dev/null'): if 256 == system('which openport > /dev/null'):
print('[*] Openport not Installed !!') print("{1}[{0}>{1}] {0}OPENPORT {0}- {1}[NOT-INSTALLED]".format(GREEN, RED))
print("[*] Installing Openport...") print("{1}[{0}>{1}] {0}Installing OPENPORT...".format(GREEN, RED))
if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))): if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))):
filename = 'arm/latest.deb' filename = 'arm/latest.deb'
else: else:
@ -111,42 +110,37 @@ def checkOpenport(): # Openport Check
else: else:
filename = 'debian32/latest.deb'.format(ostype) filename = 'debian32/latest.deb'.format(ostype)
url = 'https://openport.io/download/' + filename url = 'https://openport.io/download/' + filename
req = requests.get(url , verify= False) req = requests.get(url , verify=False)
filename2 = 'openport.deb' filename2 = 'openport.deb'
with open(filename2, "wb") as file_obj: with open(filename2, "wb") as file_obj:
file_obj.write(req.content) file_obj.write(req.content)
system('chmod 777 openport* && dpkg -i openport* > /dev/null && rm openport.deb && clear') system('chmod 777 openport* > /dev/null 2>&1 && dpkg -i openport* > /dev/null 2>&1 && rm openport.deb > /dev/null 2>&1')
checkOpenportinstall() checkOpenportinstall()
def checkOpenportinstall(): # Check If installed properly def checkOpenportinstall(): # Check If installed properly
if 256 == system('which openport > /dev/null'): if 256 == system('which openport > /dev/null'):
print('[*] Openport not Installed correctly, Try installing it manually !!') print("{1}[{0}>{1}] {0}Openport Not Installed Properly, Try installing Manually.\n{1}[{0}>{1}] {0}Check Here::( https://openport.io/download)".format(GREEN, RED))
print('[*] Check Here ... https://openport.io/download') sleep(6)
input('\n Press Enter To Continue') else:
else: print("{1}[{0}>{1}] {0}OPENPORT {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
print('[*] Openport Installation Success !!') sleep(1)
sleep(1)
def checkPagekite(): # Check Pagekite def checkPagekite(): # Check Pagekite
if path.isfile('Server/pagekite.py') == False: if path.isfile('Server/pagekite.py') == False:
print('[*] Pagekite Not Found !!') print("{1}[{0}>{1}] {0}PAGEKITE {0}- {1}[NOT-INSTALLED]".format(GREEN, RED))
print('[*] Downloading Pagekite...') print("{1}[{0}>{1}] {0}Installing PAGEKITE...".format(GREEN, RED))
url = 'https://pagekite.net/pk/pagekite.py' url = 'https://pagekite.net/pk/pagekite.py'
req = requests.get(url , verify= False) req = requests.get(url , verify=False)
filename = 'pagekite.py' filename = 'pagekite.py'
with open(filename, "wb") as file_obj: with open(filename, "wb") as file_obj:
file_obj.write(req.content) file_obj.write(req.content)
system('chmod 777 pagekite.py && mv pagekite.py Server/pagekite.py') system('chmod 777 pagekite.py && mv pagekite.py Server/pagekite.py && cd Server && chmod 777 * -R')
print('\n[*] Pagekite install Success !!') print("{1}[{0}>{1}] {0}PAGEKITE {0}- {2}[INSTALLED] ({1}Pagekite only works with python2{0})".format(GREEN, RED, DEFAULT))
print('\n[!] Remember: Pagekite Supports only Python2, Not Supports Python3')
print('[!] So Make Sure You Have installed Python2 as well, if Wants To use Pagekite Tunnel.')
system('cd Server && chmod 777 * -R')
input('\n Press Enter To Continue')
def checkLocalxpose(): # Localxpose check def checkLocalxpose(): # Localxpose check
if path.isfile('Server/loclx') == False: # Is Localxpose downloaded? if path.isfile('Server/loclx') == False: # Is Localxpose downloaded?
print('[*] Localxpose Not Found !!') print("{1}[{0}>{1}] {0}LOCALXPOSE {0}- {1}[NOT-INSTALLED]".format(GREEN, RED))
print('[*] Downloading Localxpose...') print("{1}[{0}>{1}] {0}Installing LOCALXPOSE...".format(GREEN, RED))
if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))): if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))):
filename = 'loclx-linux-arm.zip' filename = 'loclx-linux-arm.zip'
else: else:
@ -156,52 +150,34 @@ def checkLocalxpose(): # Localxpose check
else: else:
filename = 'loclx-linux-386.zip'.format(ostype) filename = 'loclx-linux-386.zip'.format(ostype)
url = 'https://lxpdownloads.sgp1.digitaloceanspaces.com/cli/'+filename url = 'https://lxpdownloads.sgp1.digitaloceanspaces.com/cli/'+filename
req = requests.get(url , verify= False) req = requests.get(url , verify=False)
with open("loclx-linux-download.zip", "wb") as file_obj: with open("loclx-linux-download.zip", "wb") as file_obj:
file_obj.write(req.content) file_obj.write(req.content)
system('unzip loclx-linux-download.zip && rm loclx-linux-download.zip') system('unzip loclx-linux-download.zip > /dev/null 2>&1 && rm loclx-linux-download.zip > /dev/null 2>&1')
system('mv loclx-linux-* loclx && mv loclx Server/') system('mv loclx-linux-* loclx > /dev/null 2>&1 && mv loclx Server/ > /dev/null 2>&1')
system('clear') print("{1}[{0}>{1}] {0}LOCALXPOSE {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
elif path.isfile('Server/loclx') == True:
print("{1}[{0}>{1}] {0}LOCALXPOSE {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
def checkbinaryLT(): # LocalTunnel Binary File check.
if path.isfile('Server/lt') == False: # Is LocalTunnel downloaded?
print('[*] LocalTunnel Binary File Not Found !!')
print('[*] Downloading LocalTunnel...')
url = "https://www.wa4e.com/downloads/lt-linux.zip"
req = requests.get(url , verify= False)
with open("lt-linux.zip", "wb") as file_obj:
file_obj.write(req.content)
system("unzip lt-linux.zip && rm lt-linux.zip")
system("mv lt* lt && mv lt Server/lt ")
system('clear')
def checkLT(): # Ask to install npm,node.js,localtunnel(packages). def checkLT(): # Ask to install npm,node.js,localtunnel(packages).
system('cd Server && chmod 777 * -R')
if 256 == system('which lt > /dev/null'): if 256 == system('which lt > /dev/null'):
system('clear') print("{1}[{0}>{1}] {0}LOCALTUNNEL {0}- {1}[NOT-INSTALLED]".format(GREEN, RED))
print("{0}[{1}?{0}] Do You Want To Install LOCALTUNNEL(Tunneling Service) Packages.\n{0}[{1}*{0}]{1} May take time , Skip if not wants to use LocalTunnel(Package Version).".format(RED, GREEN, DEFAULT)) choice = input("\n{0}[{1}?{0}] {1}Do You Want To install LocalTunnel({0}Y{1}/{0}N{1}): {2}".format(RED, GREEN, DEFAULT)).upper()
choice = input(
" \n({1}Y{2}/{2}(N)>> {2}".format(RED, GREEN, DEFAULT)).upper()
if choice == 'Y': if choice == 'Y':
system('clear') print('')
installLT() installLT()
elif choice == 'N': elif choice == 'N':
print("\n{0}[{1}!{0}]{0} You can not use LocalTunnel(Package Version).\n{0}[{1}!{0}]{0} But still You Can Use LocalTunnel(Binary Version).\n\n\n".format( print("{1}[{0}>{1}] {0}LOCALTUNNEL {0}- {1}[ABORTED]".format(GREEN, RED))
RED, GREEN, DEFAULT)) sleep(4)
input('Press Enter To Continue')
system('clear')
else: else:
return checkLT() return checkLT()
else: else:
print("[*] LocalTunnel Packages Found !!") print("{1}[{0}>{1}] {0}LOCALTUNNEL {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
sleep(2) sleep(2)
system('clear')
def installLT(): # Localtunnel check def installLT(): # Localtunnel check
print('[*] Installing LocalTunnel...') print("{1}[{0}>{1}] {0}Installing LOCALTUNNEL ... {1}(Takes About 10 min.)".format(GREEN, RED))
if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))): if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))):
system("apt-get -y update;apt -y install nodejs npm;npm cache clean -f;npm i -g n;n stable;npm i -g localtunnel-termux;clear") system("apt-get -y update;apt -y install nodejs npm;npm cache clean -f;npm i -g n;n stable;npm i -g localtunnel-termux;clear")
checkagainLT() checkagainLT()
@ -212,14 +188,11 @@ def installLT(): # Localtunnel check
def checkagainLT(): # Check if Localtunnel installed correctly or not. def checkagainLT(): # Check if Localtunnel installed correctly or not.
if 256 == system('which lt > /dev/null'): if 256 == system('which lt > /dev/null'):
system('clear') print("{1}[{0}>{1}] {0}LOCALTUNNEL {0}- {1}[FAILED]".format(GREEN, RED))
print('{1}[ERROR]: LocalTunnel packages haven\'t been installed correctly...{0}'.format( input("{1}[{0}>{1}] {0}Trying Again To Install Localtunnel (Press Enter)".format(GREEN, RED))
DEFAULT, RED))
print('')
input('[^] Press Enter To Go Back To installation..')
checkLT() checkLT()
else: else:
print('{1}[SUCCESS] LocalTunnel Installed.{0}'.format(DEFAULT, GREEN)) print("{1}[{0}>{1}] {0}LOCALTUNNEL {0}- {2}[INSTALLED]".format(GREEN, RED, DEFAULT))
sleep(2) sleep(2)