예제 #1
0
 def do_open(self, args):
     ids = self.get_ids(args)
     if not args:
         self.help_open()
         return
     if len(ids) > 1:
         print ("Can open only 1 link at a time ...")
         return None
     try:
         node = self._db.getnodes(ids)
         url = node[0].url
         tools.open_url(url)
     except Exception as e:
         self.error(e)
예제 #2
0
파일: baseui.py 프로젝트: the-cc-dev/pwman3
    def do_open(self, args):  # pragma: no cover
        ids = self._get_ids(args)
        if not args:
            self.help_open()
            return

        nodes = self._db.getnodes(ids)
        ce = CryptoEngine.get()
        for node in nodes:
            url = ce.decrypt(node[3]).decode()
            if not url.startswith(("http://", "https://")):
                url = "https://" + url
            if url:
                mask = os.umask(22)
                tools.open_url(url)
                os.umask(mask)
예제 #3
0
파일: baseui.py 프로젝트: pwman3/pwman3
    def do_open(self, args):  # pragma: no cover
        ids = self._get_ids(args)
        if not args:
            self.help_open()
            return

        nodes = self._db.getnodes(ids)
        ce = CryptoEngine.get()
        for node in nodes:
            url = ce.decrypt(node[3]).decode()
            if not url.startswith(("http://", "https://")):
                url = "https://" + url
            if url:
                mask = os.umask(22)
                tools.open_url(url)
                os.umask(mask)
예제 #4
0
파일: mac.py 프로젝트: pwman3/pwman3
    def do_open(self, args):
        ids = self._get_ids(args)
        if not args:
            self.help_open()
            return
        if len(ids) > 1:
            print("Can open only 1 link at a time ...")
            return None

        ce = CryptoEngine.get()
        nodes = self._db.getnodes(ids)

        for node in nodes:
            url = ce.decrypt(node[3])
            if not url.startswith(("http://", "https://")):
                url = "https://" + url
            tools.open_url(url, macosx=True)
예제 #5
0
파일: baseui.py 프로젝트: donnm/pwman3
    def do_open(self, args):  # pragma: no cover
        ids = self._get_ids(args)
        if not args:
            self.help_open()
            return

        nodes = self._db.getnodes(ids)
        ce = CryptoEngine.get()

        for node in nodes:
            url = ce.decrypt(node[3])
            if not url.startswith(("http://", "https://")):
                url = "https://" + url
            os.umask(22)
            tools.open_url(url)

            umask = self.config.get_value("Global", "umask")
            if re.search(r'^\d{4}$', umask):
                os.umask(int(umask))
예제 #6
0
파일: baseui.py 프로젝트: gadeleon/pwman3
    def do_open(self, args):  # pragma: no cover
        ids = self._get_ids(args)
        if not args:
            self.help_open()
            return

        nodes = self._db.getnodes(ids)
        ce = CryptoEngine.get()

        for node in nodes:
            url = ce.decrypt(node[3])
            if not url.startswith(("http://", "https://")):
                url = "https://" + url
            os.umask(22)
            tools.open_url(url)

            umask = self.config.get_value("Global", "umask")
            if re.search(r'^\d{4}$', umask):
                os.umask(int(umask))