mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-05 18:25:58 +03:00
updated patch
added text file
This commit is contained in:
parent
a4625c7d48
commit
8cfdb4cd01
@ -14,10 +14,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
import sys
|
||||
import struct
|
||||
|
||||
# smartcard module
|
||||
from smartcard.System import readers
|
||||
from smartcard.Exceptions import (CardConnectionException,
|
||||
NoCardException, SmartcardException)
|
||||
|
||||
|
||||
READER_PATTERN = re.compile('.*Yubikey NEO.*', re.I)
|
||||
@ -84,25 +87,27 @@ def open_key(name=None):
|
||||
|
||||
# Returns a reference to the YkneoYubiOath object.
|
||||
# """
|
||||
# test=[]
|
||||
# print "LISTING ALL READERS:"
|
||||
|
||||
# for reader in readers():
|
||||
# print reader
|
||||
# test.append(reader)
|
||||
# print test
|
||||
|
||||
# for reader in readers():
|
||||
# print "testing reader %s" % reader
|
||||
# try:
|
||||
# conn = reader.createConnection()
|
||||
# conn.connect()
|
||||
# print "i am after conn.connect"
|
||||
# data, status = _cmd2(reader, 0, 0xa4, 0x04, 0x00, 'a0000005272101'.decode('hex'))
|
||||
# print data
|
||||
# print status
|
||||
# if (status) != 0x9000:
|
||||
# print "unable to select the applet on reader %s" % reader
|
||||
# else:
|
||||
# return YkneoYubiOath(conn)
|
||||
# except:
|
||||
# continue
|
||||
|
||||
# try:
|
||||
# conn = test[1].createConnection()
|
||||
# conn.connect()
|
||||
# print "i am after conn.connect"
|
||||
# data, status = _cmd2(conn, 0, 0xa4, 0x04, 0x00, 'a0000005272101'.decode('hex'))
|
||||
# print data
|
||||
# print status
|
||||
# if (status) != 0x9000:
|
||||
# print "unable to select the applet on reader %s" % reader
|
||||
# else:
|
||||
# return YkneoYubiOath(conn)
|
||||
# except Exception, e:
|
||||
# print e
|
||||
|
||||
# raise Exception('No smartcard reader found with YubiOath applet')
|
||||
|
||||
|
@ -1,2 +1,20 @@
|
||||
#!/bin/sh
|
||||
/usr/bin/patch -d/ -p0 < libccid-yubikey.diff
|
||||
#!/bin/sh
|
||||
|
||||
#exit on error
|
||||
set -e
|
||||
|
||||
#define file
|
||||
FILE="/usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist"
|
||||
|
||||
if [ -f $FILE ];
|
||||
then
|
||||
if grep -Fxqi "$FILE" Yubikey
|
||||
then
|
||||
echo "already patched"
|
||||
else
|
||||
/usr/bin/patch -d/ -p0 < libccid-yubikey.diff
|
||||
fi
|
||||
|
||||
else
|
||||
echo "File $FILE does not exist."
|
||||
fi
|
40
yubicoauthenticator/text.py
Normal file
40
yubicoauthenticator/text.py
Normal file
@ -0,0 +1,40 @@
|
||||
from __init__ import __version__ as version
|
||||
|
||||
|
||||
copyright = """
|
||||
|
||||
|
||||
<b><center><font color="#8cc041">Yubico Authenticator</font> Version %s </center></b>
|
||||
|
||||
<br>
|
||||
<p>Copyright (c) 2013-2014 Yubico AB</p>
|
||||
|
||||
<p>This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.</p>
|
||||
|
||||
<p>This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.</p>
|
||||
|
||||
<p>You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.</p>""" % version
|
||||
|
||||
|
||||
instructions = """
|
||||
|
||||
This application generates TOTP & HOTP codes. Currently does not support adding HOTP accounts.
|
||||
|
||||
How to use it:
|
||||
|
||||
Plug in your Yubikey NEO in one of the USB port available on your computer. Be sure that you have the Yubico Authenticator applet installed on the Yubikey NEO!
|
||||
|
||||
1) Right click on the Yubico icon (Y) in the task bar
|
||||
|
||||
2) Select "Show codes"
|
||||
|
||||
3) Click once on the displayed values to copy text to the clipboard. Double click to copy text and minimize the window.
|
||||
|
||||
4) To quit the application right click on the Yubico icon (Y) in the taskbar and select Exit (or you can use ctrl + q)"""
|
@ -15,6 +15,7 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import text
|
||||
import time
|
||||
import signal
|
||||
import ui_main as gl
|
||||
@ -28,7 +29,6 @@ from PySide import QtGui
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
|
||||
YUBICO_ICON = "yubioath-48.png"
|
||||
VERSION = "0.0.5"
|
||||
|
||||
#FIX FOR PYINSTALLER
|
||||
if getattr(sys, 'frozen', False):
|
||||
@ -124,7 +124,7 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
else:
|
||||
#time.sleep(0.5)
|
||||
self.myapp = Window()
|
||||
self.myapp.setWindowTitle("Authenticator V. (%s)" % VERSION)
|
||||
self.myapp.setWindowTitle("Authenticator Authenticator")
|
||||
self.myapp.setWindowIcon(QtGui.QIcon(os.path.join(basedir, YUBICO_ICON)))
|
||||
self.myapp.show()
|
||||
self.myapp.activateWindow()
|
||||
@ -136,40 +136,11 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon):
|
||||
|
||||
|
||||
def appShowAbout(self):
|
||||
QtGui.QMessageBox.information(QtGui.QWidget(), self.tr("Yubico Authenticator"), self.tr("""
|
||||
|
||||
Copyright (c) 2013-2014 Yubico AB
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>."""))
|
||||
QtGui.QMessageBox.information(QtGui.QWidget(), self.tr("Yubico Authenticator"), self.tr(text.copyright))
|
||||
|
||||
|
||||
def appInstructions(self):
|
||||
QtGui.QMessageBox.information(QtGui.QWidget(), self.tr("Yubico Authenticator"), self.tr("""
|
||||
|
||||
This application generates TOTP & HOTP codes. Currently does not support adding HOTP accounts.
|
||||
|
||||
How to use it:
|
||||
|
||||
Plug in your Yubikey NEO in one of the USB port available on your computer. Be sure that you have the Yubico Authenticator applet installed on the Yubikey NEO!
|
||||
|
||||
1) Right click on the Yubico icon (Y) in the task bar
|
||||
|
||||
2) Select "Show codes"
|
||||
|
||||
3) Click once on the displayed values to copy text to the clipboard. Double click to copy text and minimize the window.
|
||||
|
||||
4) To quit the application right click on the Yubico icon (Y) in the taskbar and select Exit."""))
|
||||
QtGui.QMessageBox.information(QtGui.QWidget(), self.tr("Yubico Authenticator"), self.tr(text.instructions))
|
||||
|
||||
def appExit(self):
|
||||
sys.exit(0)
|
||||
|
Loading…
Reference in New Issue
Block a user