Exemple #1
0
    def dashboard(self):
        """
        Heimdall, find!
        """
        Color.pl("{+} User-Agent: %s" % self._user_agent['User-Agent'])

        """
        Format the target URL as simple.
        Select the output directory.
        """
        url_simple = Config.target_simple(self._url)
        path_out = os.path.realpath(f"output/{url_simple}/{date_now}/")

        """
        Create the output directory.
        """
        os.makedirs(path_out)
        Color.pl("{+} Output: '%s'" % path_out)

        """
        Creates the "info.txt" file to 
        write the attack specifications.
        """
        output_info = open(os.path.realpath(f"{path_out}/info.txt"), 'w')
        output_info.writelines(f"[+] URL (Target): {self._url}\n"
                               f"[+] Proxy: {self._proxy}\n"
                               f"[+] User-Agent: {self._user_agent}\n"
                               f"[+] Output: {path_out}\n\n"
                               f"[+] Wordlist: {self._wordlist}")
        output_info.close()

        """
        Starts the request loop to the target.
        """
        Color.pl("\n{+} {G}Heimdall, find the dashboard!{W}\n")
        for link in self._wordlist:
            target = self._url + link.rstrip("\n")
            request = get(target, proxies=self._proxy, headers=self._user_agent)
            if request.status_code == 200:
                """
                Create the file "sites-found.txt" to
                write the possible directories found.
                """
                output_sites_found = open(os.path.realpath(f"{path_out}/sites-found.txt"), 'a')
                output_sites_found.writelines("\n" + target)
                output_sites_found.close()
                Color.pl("{+} {G}%s{W}" % target)
            else:
                """
                Creates the file "sites-not-found.txt" to
                write the directories not found.
                """
                output_sites_not_found = open(os.path.realpath(f"{path_out}/sites-not-found.txt"), 'a')
                output_sites_not_found.write("\n" + target)
                output_sites_not_found.close()
                Color.pl("{-} %s" % target)
Exemple #2
0
 def banner_description(self):
     """
     Print design and
     author specifications.
     """
     print(f"""\n               Version: {self._config['Version']}
 Author: {self._config['Author']} (Security Researcher)
     GitHub: {self._config['GitHub']}
     Twitter: {self._config['Twitter']}""")
     Color.pl("{O}__________________________________________________{W}\n")
Exemple #3
0
 def banner():
     """
     Print the pure colored
     Heimdall banner.
     """
     Color.pl(r"""{O}__________________________________________________
             _               _       _ _ 
   /\  /\___(_)_ __ ___   __| | __ _| | |
  / /_/ / _ \ | '_ ` _ \ / _` |/ _` | | |
 / __  /  __/ | | | | | | (_| | (_| | | |
 \/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_|{W}""")
Exemple #4
0
    def wordlist(self):
        """
        Opens the text files containing the wordlist.
        """
        if self._wordlist == "1":
            wordlist_text = open(os.path.realpath("extra/wordlists/small.txt"),
                                 'r')
            Color.pl("{+} Wordlist Small: 'extra/wordlists/small.txt'")
        elif self._wordlist == "2":
            wordlist_text = open(
                os.path.realpath("extra/wordlists/medium.txt"), 'r')
            Color.pl("{+} Wordlist Medium: 'extra/wordlists/medium.txt'")
        elif self._wordlist == "3":
            wordlist_text = open(os.path.realpath("extra/wordlists/big.txt"),
                                 'r')
            Color.pl("{+} Wordlist Big: 'extra/wordlists/big.txt'")
        else:
            Color.pl("{+} Wordlist Alternative: %s" % self.wordlist())
            wordlist_text = open(self._wordlist, 'r')

        wordlist = wordlist_text.readlines()
        wordlist_text.close()
        """
        Returns the selected wordlist.
        """
        return wordlist
Exemple #5
0
 def upgrade(self):
     """
     Updates Heimdall to the
     most current version available.
     """
     try:
         Color.pl("{+} Updating...")
         os.system(f"git pull {self._updates['repository']}")
         Color.pl("{+} Heimdall was successfully updated.")
     except Exception as ex:
         Color.pl("{!} Could not update.")
         Color.pl("{!} %s" % ex)
Exemple #6
0
 def proxy(self):
     """
     Formats the selected proxy accordingly.
     """
     if self._proxy is not None:
         if self._proxy[:7] == "http://":
             self._proxy = {'http://': self._proxy}
             Color.pl("{+} Proxy: %s" % self._proxy['http://'])
         elif self._proxy[:8] == "https://":
             self._proxy = {'https://': self._proxy}
             Color.pl("{+} Proxy: %s" % self._proxy['https://'])
         elif self._proxy[:3] == "ftp":
             self._proxy = {'ftp': self._proxy}
             Color.pl("{+} Proxy: %s" % self._proxy['ftp'])
         else:
             self._proxy = ""
         return self._proxy
Exemple #7
0
 def verify(self):
     """
     Checks for updates to
     update versions.
     """
     request = get(self._updates['api_repository']).json()
     if request[0]['name'] != self._configs['Version']:
         Color.pl("{+} New version available: {G}%s{W}" % request[0]['name'])
         option = input(Color.s("{+} Do you want to upgrade to the latest version? [Y/n] "))
         if option == "Y" or option == "y" or option == "":
             return True
         elif option == "N" or option == "n":
             Color.pl("{!} Update aborted.\n")
             return False
         else:
             Color.pl("{!} Command not found!\n")
     return False
Exemple #8
0
Configuration = Config(
    "Ygor Simões",  # Author
    "v4.1-stable",  # Version
    "https://github.com/CR3DN3",  # GitHub
    "https://twitter.com/CR3DN3 ")  # Twitter

configs = Configuration.get_configs()
updates = Configuration.updates()
"""
Try to import libraries.
"""
try:
    from requests import get
except ModuleNotFoundError as ex:
    Color.pl(
        "{!} %s Please install requirements: {R}pip3 install -r requirements.txt{W}"
        % ex)
"""
Capture all passed 
command line arguments.
"""
parser = argparse.ArgumentParser(add_help=False)

parser.add_argument("-h",
                    "--help",
                    action="store_true",
                    help="Show this help message and exit")

parser.add_argument("-u",
                    "--url",
                    action="store",