Desktop OTP display using Yubico Authenticator and Apex Flex

HOW TO MAKE BOTH YUBIKEYS AND APEX WORK IN THE SAME APP

Note: Sins will be committed.

If anyone wants to make this better by maybe catching specific exceptions or any other method of making things less suck, be my guest. I are not good at python.

The below edits look complicated and annoying, do I have another option?

Yeah, just download this:
https://www.dropbox.com/s/2lv6up3ttmgsv3d/pymodules.7z?dl=1

and extract those two folders in that archive to
C:\Program Files\Yubico\Yubico Authenticator\pymodules
overwriting existing files.

But like, for the love of god, do your own diff or something. I could be putting anything into those.

STEPS TO EDIT AUTHENTICATOR FILES MANUALLY

pymodules\yubikit\core\__init__.py

Add line: OATH_APEX = bytes.fromhex("a0000007470061FC54D5") in class AID under line OATH = bytes.fromhex("a0000005272101")

(Modified final file is on the left.)

pymodules\yubikit\oath.py

Add
try:
self._version, self._salt, self._challenge = _parse_select(self.protocol.select(AID.OATH)) # Original
except:
self._version, self._salt, self._challenge = _parse_select(self.protocol.select(AID.OATH_APEX))

in init function

Add
try:
_, self._salt, self._challenge = _parse_select(self.protocol.select(AID.OATH)) # Original
except:
_, self._salt, self._challenge = _parse_select(self.protocol.select(AID.OATH_APEX))

in reset function

(Modified final file is on the left. Note that what’s in yellow on the right are lines we’re deleting and replacing with the lines on the left.)

pymodules\ykman\device.py

In SCAN_APPLETS =

Add line on bottom:
AID.OATH_APEX: CAPABILITY.OATH

(Modified finished file is on left.)

6 Likes