Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-23-2016, 06:08 PM
1ne 1ne is offline
Registered User
 
Join Date: Jul 2009
Posts: 13
interact to the an external application

Hello,

Sorry if this has been asked. I am very new to scripting.

I have a soft token similar to SecureID that is installed on my machine. Is it possible to log on the a router/switch then called an external application such as SecureID, copy the password out to a clipboard and pasted into SecureCRT.

I am using version 7.3.6

Thank you
Reply With Quote
  #2  
Old 02-23-2016, 06:45 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,039
I'm not aware of any way to accomplish this feat.

There would have to be some sort of COM interface available for SecureCRT to access the token on the SecurID card, and I'm not aware of this being available. It may exist... I just don't have knowledge of it.

If you have the ability to copy the token to the clipboard SecureCRT scripting can access the clipboard through the crt.Clipboard.Text property.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #3  
Old 02-23-2016, 07:16 PM
1ne 1ne is offline
Registered User
 
Join Date: Jul 2009
Posts: 13
Thanks Jake. I have the SecureCRT and the soft token installed on my machine locally.

I do see a copy button on my token but how would I get SecureCRT to use/press/copy that button?
Reply With Quote
  #4  
Old 02-24-2016, 12:42 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,039
Quote:
Originally Posted by 1ne View Post
I have the SecureCRT and the soft token installed on my machine locally. I do see a copy button on my token but how would I get SecureCRT to use/press/copy that button?
That depends... SecureCRT itself doesn't know about the other app/window, but you may be able to drive the process with other scripting methods depending on the OS you're on and the scripting language you're running.

What OS are you running the machine you have SecureCRT?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
  #5  
Old 02-26-2016, 01:29 PM
1ne 1ne is offline
Registered User
 
Join Date: Jul 2009
Posts: 13
Thanks Jake,

I am on Windows 7
Reply With Quote
  #6  
Old 02-26-2016, 01:51 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,039
If you know the title of the window the token shows up in, you might be able to activate it with VBScript's built-in AppActivate() method. For example, if the window is named "My Window Title" it could look like this:
PHP Code:
Set objShell CreateObject("WScript.Shell")
bSuccess objShell.AppActivate("My Window Title"
Then, if AppActivate() was successful, and you have available to you the ability to "press" a keyboard shortcut to copy the token to the clipboard, you might be able to get that accomplished with SendKeys(). For example, if Ctrl+C is something what will copy the token to the clipboard:
PHP Code:
If bSuccess Then
    objShell
.SendKeys("^c")
    
crt.Sleep(100)
    
MsgBox("Here's what's in the clipboard: " crt.Clipboard.Text)
End If 
If that doesn't work, you're stuck with hoping that someone comes out with an eye-brain-keyboard interface that will allow you to speed things up externally. Don't hold your breath .

Actually, you might also consider if using AutoIT might be a solution for driving the keyboard, too. But that's far outside the scope of this forum. You can get all sorts of info by web-searching other resources, though.

Regardless, what you're now faced with is that driving the keyboard and activating windows can be risky... what if the window activation doesn't work? What if Ctrl+C means something else to another app and it's simulation is "pressed" by the script when another app has focus and causes you grief. You'd have to decide if the potential grief is worth the potential time savings.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:02 PM.