Created
August 3, 2016 20:41
-
-
Save linuxkidd/27e40aca598d7234d3c23e97ac4ae8c5 to your computer and use it in GitHub Desktop.
Patch to the wari hotp.py file to output PIN or Secret+PIN to stdout -- useful for piping into programs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/lib/python2.7/site-packages/wari-0.0.1-py2.7.egg/wari/hotp.py.orig 2016-08-03 13:38:00.601784735 -0700 | |
+++ /usr/lib/python2.7/site-packages/wari-0.0.1-py2.7.egg/wari/hotp.py 2016-08-03 13:38:30.758031752 -0700 | |
@@ -105,11 +105,13 @@ | |
pin = otp.get_hotp(b32, intervals_no=step) | |
password = "%s%s" % (document['secret'], pin) | |
if 'pin' in items: | |
- pyperclip.copy(pin) | |
- logger.info('pin copied to the clipboard') | |
+ print str(pin) | |
+ pyperclip.copy(str(pin)) | |
+ #logger.info('pin copied to the clipboard') | |
else: | |
+ print password | |
pyperclip.copy(password) | |
- logger.info('secret with generated pin has been copied to the clipboard') | |
+ #logger.info('secret with generated pin has been copied to the clipboard') | |
document['step'] = step + 1 | |
db.collection.update(document) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment