コード例 #1
0
ファイル: session.py プロジェクト: Andlab/andsploit
 def __load_variables(self):
     """
     Load extra variables, specified in the .andsploit_config file.
     """
     
     for key in Configuration.get_all_keys("vars"):
         self.variables[key] = Configuration.get("vars", key)
コード例 #2
0
ファイル: provider.py プロジェクト: hellok/andsploit
    def ca_path(self, skip_default=False):
        """
        Get the path to the CA Key Material, as defined by the configuration file.
        """

        ca_path = Configuration.get("ssl", "ca_path")

        if ca_path == None and skip_default == False:
            ca_path = os.path.join(os.path.dirname(__file__), "embedded_ca")

        return ca_path
コード例 #3
0
ファイル: remotes.py プロジェクト: Andlab/andsploit
 def get(cls, url):
     """
     Get an instance of Remote, initialised with the remote settings.
     """
     
     url = Configuration.get('remotes', url)
     
     if url != None:
         return cls(url)
     else:
         return None
コード例 #4
0
ファイル: provider.py プロジェクト: hellok/andsploit
    def trusted_certificate_for(self, peer):
        """
        Fetches the trusted certificate for a peer.
        """

        return Configuration.get("ssl-known-hosts", "%s|%d" % peer)