Ejemplo n.º 1
0
    def __init__(self, socket, connection, wspaceFolder):
        self.socket = socket
        self.connection = connection
        self.wspaceFolder = wspaceFolder
        self.newCreds = []
        self.newUsers = []
        self.newEndpoints = []
        self.newConnections = []

        self.keysHash = {}
        for c in Creds.findAll():
            if c.credsType != "privkey":
                continue
            path = c.obj.keypath
            p = subprocess.run(["sha1sum", path], stdout=subprocess.PIPE)
            out = p.stdout.decode("utf-8")
            h = out.split(" ", 1)[0]
            self.keysHash[h] = path
Ejemplo n.º 2
0
 def getBaseObjects(self,scope=None):
     return Endpoint.findAll(scope=scope) + Creds.findAll(scope=scope) + User.findAll(scope=scope) + Host.findAll(scope=scope)
Ejemplo n.º 3
0
 def getCreds(self,scope=None):
     return Creds.findAll(scope=scope)