3d secure (both SecureCode and Verified By Visa) must be done in a web browser, and more specifically in an iFrame.
The content of the iFrame is dynamically loaded by the card scheme to present a page hosted by the card issuer (to allow it to display the secret phrase). Checking of the password is also performed by card issuer, without any intervention by you.
There is no way to perform the 3d secure check outside of a web browser.