Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added macOS support #12

Merged
merged 4 commits into from
Feb 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions SocialFish.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from os import system, path
import multiprocessing
from urllib import urlopen
from platform import architecture
from platform import system as systemos, architecture
from wget import download

RED, WHITE, CYAN, GREEN, END = '\033[91m', '\33[46m', '\033[36m', '\033[1;32m', '\033[0m'
Expand All @@ -32,10 +32,11 @@ def connected(host='http://duckduckgo.com'):
def checkNgrok():
if path.isfile('Server/ngrok') == False:
print '[*] Downloading Ngrok...'
ostype = systemos().lower()
if architecture()[0] == '64bit':
filename = 'ngrok-stable-linux-amd64.zip'
filename = 'ngrok-stable-{0}-amd64.zip'.format(ostype)
else:
filename = 'ngrok-stable-linux-386.zip'
filename = 'ngrok-stable-{0}-386.zip'.format(ostype)
url = 'https://bin.equinox.io/c/4VmDzA7iaHb/' + filename
download(url)
system('unzip ' + filename)
Expand Down Expand Up @@ -176,7 +177,7 @@ def runPEnv():
def runNgrok():
system('./Server/ngrok http 80 > /dev/null &')
sleep(10)
system('curl -s http://127.0.0.1:4040/status | grep -P "https://.*?ngrok.io" -oh > ngrok.url')
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}' + url.readlines()[0] + '{1}').format(CYAN, END, GREEN)
url.close()
Expand Down