示例#1
0
文件: provider.py 项目: 0xr0ot/drozer
 def trust(self, certificate, peer):
     """
     Add the certificate to the SSL Known Hosts in the Configuration file, so we will
     always trust this host in future.
     """
     
     Configuration.set("ssl-known-hosts", "%s|%d" % peer, self.digest(certificate))
示例#2
0
    def trust(self, certificate, peer):
        """
        Add the certificate to the SSL Known Hosts in the Configuration file, so we will
        always trust this host in future.
        """

        Configuration.set("ssl-known-hosts", "%s|%d" % peer,
                          self.digest(certificate))
示例#3
0
    def enable(cls, path):
        """
        Re-add a drozer Module Repository to the collection, that was created manually
        or has previously been removed with #disable().
        """

        if cls.looks_like_repo(path):
            Configuration.set('repositories', path, path)
        else:
            raise UnknownRepository(path)
示例#4
0
 def enable(cls, path):
     """
     Re-add a drozer Module Repository to the collection, that was created manually
     or has previously been removed with #disable().
     """
     
     if cls.looks_like_repo(path):
         Configuration.set('repositories', path, path)
     else:
         raise UnknownRepository(path)
示例#5
0
文件: remotes.py 项目: 0xr0ot/drozer
 def create(cls, url):
     """
     Create a new drozer remote, with the specified URL.
     
     If the URL already exists, no remote will be created.
     """
     
     if cls.get(url) == None:
         Configuration.set('remotes', url, url)
         
         return True
     else:
         return False
示例#6
0
    def create(cls, url):
        """
        Create a new drozer remote, with the specified URL.
        
        If the URL already exists, no remote will be created.
        """

        if cls.get(url) == None:
            Configuration.set('remotes', url, url)

            return True
        else:
            return False
示例#7
0
文件: provider.py 项目: 0xr0ot/drozer
 def provision(self, path):
     """
     Provision new CA Key Material.
     
     This will overwrite any existing CA.
     """
     
     self.authority.create_ca()
     
     Configuration.set("ssl", "ca_path", path)
     
     fs.write(self.ca_certificate_path(), ca.CA.certificate_to_pem(self.authority.ca_cert))
     fs.write(self.__ca_key_path(), ca.CA.pkey_to_pem(self.authority.ca_key))
     
     return True
示例#8
0
    def provision(self, path):
        """
        Provision new CA Key Material.
        
        This will overwrite any existing CA.
        """

        self.authority.create_ca()

        Configuration.set("ssl", "ca_path", path)

        fs.write(self.ca_certificate_path(),
                 ca.CA.certificate_to_pem(self.authority.ca_cert))
        fs.write(self.__ca_key_path(),
                 ca.CA.pkey_to_pem(self.authority.ca_key))

        return True