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)
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
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
def trusted_certificate_for(self, peer): """ Fetches the trusted certificate for a peer. """ return Configuration.get("ssl-known-hosts", "%s|%d" % peer)