This commit is contained in:
Usama Abdul Sattar 2018-10-29 07:04:32 +05:00 committed by GitHub
parent 38516b37eb
commit 66e97f6e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,6 +276,12 @@ def runPEnv(): #menu where user select what they wanna use
def runServeo(): def runServeo():
system('ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 80:localhost:1111 serveo.net > link.url 2> /dev/null &') system('ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 80:localhost:1111 serveo.net > link.url 2> /dev/null &')
sleep(7) sleep(7)
with open('link.url') as creds:
lines = creds.read().rstrip()
if len(lines) != 0:
pass
else:
runServeo()
output = check_output("grep -o 'https://[0-9a-z]*\.serveo.net' link.url", shell=True) output = check_output("grep -o 'https://[0-9a-z]*\.serveo.net' link.url", shell=True)
url = str(output).strip("b ' \ n") url = str(output).strip("b ' \ n")
print("\n {0}[{1}*{0}]{1} SERVEO URL: {2}".format(CYAN, DEFAULT, GREEN) + url + "{1}".format(CYAN, DEFAULT, GREEN)) print("\n {0}[{1}*{0}]{1} SERVEO URL: {2}".format(CYAN, DEFAULT, GREEN) + url + "{1}".format(CYAN, DEFAULT, GREEN))