Example #1
0
 def doPasteKey(self, arg):
     src = misc.getClipboardText()
     try:
         lines = src.split('\n')
         idurl = lines[0]
         keysrc = '\n'.join(lines[1:])
         if idurl != nameurl.FilenameUrl(nameurl.UrlFilename(idurl)):
             idurl = ''
             keysrc = src
     except:
         lg.exc()
         idurl = ''
         keysrc = src
     if self.state not in self.output:
         self.output[self.state] = {'data': [('', 'black')]}
     self.output[self.state]['idurl'] = idurl
     self.output[self.state]['keysrc'] = keysrc
     if 'RECOVER' not in self.output:
         self.output['RECOVER'] = {'data': [('', 'black')]}
     if keysrc and idurl:
         self.output['RECOVER']['data'].append(
             ('private key and IDURL was loaded', 'green'))
     elif not idurl and keysrc:
         self.output['RECOVER']['data'].append(
             ('private key was loaded, provide correct IDURL now', 'blue'))
Example #2
0
 def doPasteKey(self, arg):
     src = misc.getClipboardText()
     try:
         lines = src.split('\n')
         idurl = lines[0]
         keysrc = '\n'.join(lines[1:])
         if idurl != nameurl.FilenameUrl(nameurl.UrlFilename(idurl)):
             idurl = ''
             keysrc = src
     except:
         dhnio.DprintException()
         idurl = ''
         keysrc = src
     if not self.output.has_key(self.state):
         self.output[self.state] = {'data': [('', 'black')]}
     self.output[self.state]['idurl'] = idurl
Example #3
0
 def doPasteKey(self, arg):
     src = misc.getClipboardText()
     try:
         lines = src.split('\n')
         idurl = lines[0]
         keysrc = '\n'.join(lines[1:])
         if idurl != nameurl.FilenameUrl(nameurl.UrlFilename(idurl)):
             idurl = ''
             keysrc = src
     except:
         lg.exc()
         idurl = ''
         keysrc = src
     if self.state not in self.output:
         self.output[self.state] = {'data': [('', 'black')]}
     self.output[self.state]['idurl'] = idurl
     self.output[self.state]['keysrc'] = keysrc
     if 'RECOVER' not in self.output:
         self.output['RECOVER'] = {'data': [('', 'black')]}
     if keysrc and idurl:
         self.output['RECOVER']['data'].append(('private key and IDURL was loaded', 'green'))
     elif not idurl and keysrc:
         self.output['RECOVER']['data'].append(('private key was loaded, provide correct IDURL now', 'blue'))