Skip to content

Commit

Permalink
Merge pull request #12 from adiranas/master
Browse files Browse the repository at this point in the history
Added macOS support
  • Loading branch information
A1S0N committed Feb 8, 2018
2 parents b7ea113 + 837b2bc commit 48bfcea
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 48bfcea

Please sign in to comment.