Example #1
0
 def preprocess(self, **k):
     self.entropy = self.APPLE_ENTROPY
     with open(k["aoskit"], "rb") as f:
         plist = CFPropertyList.CFPropertyList(f)
         plist.load()
         plist_values = CFPropertyList.native_types(plist.value)
         self.account = plist_values.keys()[0]
         plist_data_dict = plist_values[self.account]
         self.dpapiblob = blob.DPAPIBlob(plist_data_dict['data'])
Example #2
0
 def preprocess(self, **k):
     self.entropy = self.APPLE_ENTROPY
     with open(k["aoskit"], "rb") as f:
         plist = CFPropertyList.CFPropertyList(f)
         plist.load()
         plist_values = CFPropertyList.native_types(plist.value)
         self.account = plist_values.keys()[0]
         plist_data_dict = plist_values[self.account]
         self.dpapiblob = blob.DPAPIBlob(plist_data_dict["data"])
Example #3
0
def load(filename):
 """Reads a binary or XML plist from the given file name and returns its value."""
 cfplist = CFPropertyList.CFPropertyList(filename)
 cfplist.load()
 if cfplist.value != None:
  return CFPropertyList.native_types(cfplist.value)
 else:
  try:
   return plistlib.readPlist(filename)
  except ExpatError:
   raise PropertyListError(filename + " is not a valid binary or XML property"
                           " list file")
    def main(self, history):
        placeValues = {}
        formValues = {}

        places = cfp.CFPropertyList(history)
        places.load()
        places = cfp.native_types(places.value)
        i = 0
        for place in places.get('WebHistoryDates', []):
            i += 1
            placeValues['place%d' % i] = {'url':place[''], 'title':place['title'],
                'count':place['visitCount'], 'date':place['lastVisitedDate'],
                'domain':format(place[''])}

        return {self.__class__.__name__:{'places':placeValues, 'forms':formValues}}
    def main(self, history):
        placeValues = {}
        formValues = {}

        places = cfp.CFPropertyList(history)
        places.load()
        places = cfp.native_types(places.value)
        i = 0
        for place in places.get('WebHistoryDates', []):
            i += 1
            placeValues['place%d' % i] = {
                'url': place[''],
                'title': place['title'],
                'count': place['visitCount'],
                'date': place['lastVisitedDate'],
                'domain': format(place[''])
            }

        return {
            self.__class__.__name__: {
                'places': placeValues,
                'forms': formValues
            }
        }
Example #6
0
 def test_file(self):
     with open('reference/array.plist','r') as f:
         plist = CFPropertyList.CFPropertyList(f)
         plist.load()
         values = CFPropertyList.native_types(plist.value)
         self.assertEqual(["object"], values)
Example #7
0
def parsed_binary(filename):
    plist = CFPropertyList.CFPropertyList('reference/%s.plist' % filename)
    plist.load()
    return CFPropertyList.native_types(plist.value)
Example #8
0
def parsed_binary(filename):
    plist = CFPropertyList.CFPropertyList('reference/%s.plist' % filename)
    plist.load()
    return CFPropertyList.native_types(plist.value)
Example #9
0
 def preprocess(self, **k):
     plist = CFPropertyList.CFPropertyList(k['keychain'])
     plist.load()
     self.entries = CFPropertyList.native_types(plist.value).get('version1')