예제 #1
0
파일: adium.py 프로젝트: duy/keysync
    def parse(settingsdir=None):
        if settingsdir == None:
            settingsdir = AdiumProperties.path

        kf = os.path.join(settingsdir, AdiumProperties.keyfile)
        if os.path.exists(kf):
            keydict = OtrPrivateKeys.parse(kf)
        else:
            keydict = dict()

        accounts = AdiumProperties._get_accounts_from_plist(settingsdir)
        newkeydict = dict()
        for adiumIndex, key in keydict.iteritems():
            for account in accounts:
                if account['ObjectID'] == key['name']:
                    name = account['UID']
                    key['name'] = name
                    newkeydict[name] = key
        keydict = newkeydict

        fpf = os.path.join(settingsdir, AdiumProperties.fingerprintfile)
        if os.path.exists(fpf):
            util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))

        return keydict
예제 #2
0
    def parse(settingsdir=None):
        if settingsdir == None:
            settingsdir = AdiumProperties.path

        kf = os.path.join(settingsdir, AdiumProperties.keyfile)
        if os.path.exists(kf):
            keydict = OtrPrivateKeys.parse(kf)
        else:
            keydict = dict()

        accounts = AdiumProperties._get_accounts_from_plist(settingsdir)
        newkeydict = dict()
        for adiumIndex, key in keydict.iteritems():
            for account in accounts:
                if account['ObjectID'] == key['name']:
                    name = account['UID']
                    key['name'] = name
                    newkeydict[name] = key
        keydict = newkeydict

        fpf = os.path.join(settingsdir, AdiumProperties.fingerprintfile)
        if os.path.exists(fpf):
            util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))

        return keydict
예제 #3
0
 def parse(settingsdir=None):
     if settingsdir == None:
         settingsdir = GajimProperties.path
     keydict = dict()
     for fpf in glob.glob(os.path.join(settingsdir, '*.fpr')):
         print('Reading in ' + fpf)
         util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))
     return keydict
예제 #4
0
    def parse(settingsdir=None):
        if settingsdir == None:
            settingsdir = IrssiProperties.path

        kf = os.path.join(settingsdir, IrssiProperties.keyfile)
        if os.path.exists(kf):
            keydict = OtrPrivateKeys.parse(kf)
        else:
            keydict = dict()

        fpf = os.path.join(settingsdir, IrssiProperties.fingerprintfile)
        if os.path.exists(fpf):
            util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))

        return keydict
예제 #5
0
    def parse(settingsdir=None):
        if settingsdir == None:
            settingsdir = IrssiProperties.path

        kf = os.path.join(settingsdir, IrssiProperties.keyfile)
        if os.path.exists(kf):
            keydict = OtrPrivateKeys.parse(kf)
        else:
            keydict = dict()

        fpf = os.path.join(settingsdir, IrssiProperties.fingerprintfile)
        if os.path.exists(fpf):
            util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))

        return keydict
예제 #6
0
파일: pidgin.py 프로젝트: duy/keysync
    def parse(settingsdir=None):
        if settingsdir == None:
            settingsdir = PidginProperties.path

        kf = os.path.join(settingsdir, PidginProperties.keyfile)
        if os.path.exists(kf):
            keydict = OtrPrivateKeys.parse(kf)
        else:
            keydict = dict()

        fpf = os.path.join(settingsdir, PidginProperties.fingerprintfile)
        if os.path.exists(fpf):
            util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))

        resources = PidginProperties._get_resources(settingsdir)
        for name, key in keydict.iteritems():
            if key['protocol'] == 'prpl-jabber' \
                    and 'x' in key.keys() \
                    and name in resources.keys():
                key['resource'] = resources[name]

        return keydict
예제 #7
0
    def parse(settingsdir=None):
        if settingsdir == None:
            settingsdir = PidginProperties.path

        kf = os.path.join(settingsdir, PidginProperties.keyfile)
        if os.path.exists(kf):
            keydict = OtrPrivateKeys.parse(kf)
        else:
            keydict = dict()

        fpf = os.path.join(settingsdir, PidginProperties.fingerprintfile)
        if os.path.exists(fpf):
            util.merge_keydicts(keydict, OtrFingerprints.parse(fpf))

        resources = PidginProperties._get_resources(settingsdir)
        for name, key in keydict.iteritems():
            if key['protocol'] == 'prpl-jabber' \
                    and 'x' in key.keys() \
                    and name in resources.keys():
                key['resource'] = resources[name]

        return keydict