Example #1
0
    def decrypt_revelation_file(self, thedata):

        pwd = getpass.getpass()
        handler = detect_handler(thedata)
        dafi = DataFile(handler)
        thepasswords = dafi.load(self.revelationfile, password=pwd)
        return thepasswords
Example #2
0
 def read_revelation_file(self):
     """ Decrypt the content of the revelation database.
     """
     LOG.debug('Read the content of the database.')
     self.handler = detect_handler(self.dbdata)
     dafi = DataFile(self.handler)
     password = getpass.getpass()
     content = dafi.load(self.dbfile, password=password)
     return content
Example #3
0
 def read_revelation_file(self):
     """ Decrypt the content of the revelation database.
     """
     LOG.debug('Read the content of the database.')
     self.handler = detect_handler(self.dbdata)
     dafi = DataFile(self.handler)
     password = getpass.getpass()
     content = dafi.load(self.dbfile, password=password)
     return content
Example #4
0
 def do_save(self, params):
     """ Save the current database.
     :arg filename to which the database will be saved, if not
     specified it will save the current file or will take it the
     default from the configuration file."""
     if not params and not self.filename:
         print 'Please specify a filename to which save the database.'
     else:
         password = getpass.getpass()
         if self.filename and not params:
             io = DataFile(self.handler)
             io.save(self.passwords, self.filename, password=password)
             print "Saved"
             self.modified = False
         elif params:
             filename = os.path.expanduser(params)
             if filename == params:
                 filename = os.path.join(os.getcwd(), filename)
             io = DataFile(self.handler)
             print filename
             io.save(self.passwords, filename, password=password)
             print "Saved"
             self.modified = False
Example #5
0
 def do_save(self, params):
     """ Save the current database.
     :arg filename to which the database will be saved, if not
     specified it will save the current file or will take it the
     default from the configuration file."""
     if not params and not self.filename:
         print 'Please specify a filename to which save the database.'
     else:
         password = getpass.getpass()
         if self.filename and not params:
             io = DataFile(self.handler)
             io.save(self.passwords, self.filename, password=password)
             print "Saved"
             self.modified = False
         elif params:
             filename = os.path.expanduser(params)
             if filename == params:
                 filename = os.path.join(os.getcwd(), filename)
             io = DataFile(self.handler)
             print filename
             io.save(self.passwords, filename, password=password)
             print "Saved"
             self.modified = False