Two-Factor authentication is pretty hard, but might be doable. The issue is you need to get the code from the phone to the desktop. The only option I can think of is as follows:
- login to citrix up to the point a code is sent to the mobile phone
- connect the phone to the same desktop, and install a remote viewer app, like TeamViewer or some other.
- add a delay to make sure the text message gets there
- next steps could be done with ComputerVision or (I guess) Mobile automation
- you’ll need to find a way to “open” the phone, like pressing the home button. I think the mobile remote app should have some way of triggering those hardware buttons.
- using CV or Mobile automation unlock the phone by entering the PIN# (should be easier if the phone authentication is with a PIN than with the swipy thing android has)
- go to text messages
- go to the contact that sent the Citrix auth code
- scrape the area of the screen that contains the message
- do some string manipulation on it to get only the code
- enter that code in Citrix
If you encounter difficulties, post here