Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 11-21-2011, 07:36 AM
Luke H Luke H is offline
Registered User
 
Join Date: Nov 2011
Posts: 4
Arrow SecureCRT: can I use wildcards in the "automate logon" area?

Hi, I'm a licensed sCRT user (windows v6.7.3-x64)
I've got a bunch of hosts that I log in to that are basically clones of each other and I have a logon script that I want to share between them (not really a script, just a single command that runs 'screen -D -R' )

Problem is, each host has a different hostname so when I log in as root, I get prompts like

root@mary:~ $
root@bob:~ $
root@xavier: ~$

...etc etc...

what I'd like to do is be able to set a wildcard for the "expect" area something like

root@*:~ $

or better yet use a RegEx:

root@[a-z]+:~ \$

Is this possible somehow? If not could you please consider adding this capability to a future sCRT release?
thank you
Reply With Quote
  #2  
Old 11-21-2011, 10:44 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,439
Hello Luke,

I have added this thread to a feature request in our development database for wildcard and/or regular expression (RegEx) support for Logon Actions. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct e-mail notification, contact support@vandyke.com and include "Feature Request - Forum Thread #9081" in the subject line.

In the meantime, if the ~ $ is common (or possibly even $), you could use just the partial string for the Expect field.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 11-21-2011, 03:56 PM
Luke H Luke H is offline
Registered User
 
Join Date: Nov 2011
Posts: 4
Ok thank you, yes regex would of course be the best, most flexible option. Hopefully we'll see this in a future release. For now, I will try to cut down the search string to something that is common to all the hosts in this group. thanks.
Reply With Quote
  #4  
Old 05-27-2014, 11:31 AM
mkarimian mkarimian is offline
Registered User
 
Join Date: May 2014
Posts: 1
Hi,

Is it enabled on any release of Secure CRT now? If yes, please let me know which version and how it exactly works.

Thanks in advance,
Mehdi
Reply With Quote
  #5  
Old 05-27-2014, 12:52 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,439
Hello Mehdi,

The ability to use regular expressions (or wildcards) in Logon Actions has not yet been implemented. The prior request by Luke has been the only request so far.

Could you tell me more about what you are trying to accomplish?

Perhaps it can be accomplished in another way in the current release of SecureCRT (or the version you have installed).

What version of SecureCRT are you using?

On what platform?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #6  
Old 10-27-2016, 11:45 PM
danpez danpez is offline
Registered User
 
Join Date: Oct 2016
Posts: 1
Is this a feature yet?

Hi Guys,

Has this been incorporated yet? When you have many network devices all with different hostnames, it doesn't work. Seems overkill to have to write a script when the app could support this basic functionality.

The other option would be for SecureCRTs Auto login to recognize just using a ">" in the expect statement instead of any chars before it. That way, each time you log in to a Cisco device, you can have > then send enable. With the following this currently does not work:

ogin: admin
assword: *****
> enable
assword: *****

Surely just this should be relatively easy to do and not require the wildcard?
Reply With Quote
  #7  
Old 10-28-2016, 08:51 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,439
Hi danpez,

No, there is no change to the status of the feature request. If/When there is, we will post here.

I assume what you posted means your Logon Actions are configured as shown:

Code:
Expect             Send
ogin:              admin
assword:           *****
>                  enable
assword:           *****
If so, in what way does it not work?

Do you get through the initial logon as expected?

But then never see the enable command sent?

What is sometimes overlooked (and the reason a single character can sometimes produce unwanted results) is that SecureCRT does not know context. So it does not know "wait only for a > used as a prompt". So any intervening text between your initial logon that includes that character is going to cause the send portion of your Logon Actions configuration to be sent.

For example, if in the terminal window the interaction is:

Code:
Login: admin
Password: MyPassword
Notice: This is a monitored server
    >>>>>> All violators will be prosecuted <<<<<<
You have been warned
Then comes the > prompt character where you want to send command enable, too late, it fired on the very first > above.

There are ways, via scripting, to detect that no more output is coming from the remote (and thus you can assume you *are* at the > prompt), so if you would like to handle it that way, let us know.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #8  
Old 09-21-2020, 02:08 PM
bbates bbates is offline
Registered User
 
Join Date: Sep 2020
Posts: 1
Is this a feature yet?

Like everyone else that has asked, where is this feature? It has been almost 9 years since the original requester submitted it and 4 years since the last person asked about it. I'd like to use regular expressions or at least a single wildcard. I don't want to send my text until after the last character has been sent from the remote server. However, the few characters right before it can be anything, and that last character shows up multiple times long before it's last occurrence. Thus if I use the single character, the text sent is sent long before it should and causes issues. I tried using multiple text lines to be checked, but it seems to send carriage even if I don't want it to send anything at all. A true 'Expect' script processing would be more general. Thanks.
Reply With Quote
  #9  
Old 09-23-2020, 06:55 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,591
Thanks for following up on this. To date, there have only been five requests for adding regular expression support to Logon action send/expect strings. The criteria for implementing requests includes:

- Number and frequency of requests
- Amount of work to implement

There is a request for supporting regular expressions in the WaitForString script function. There are quite a few request for this and if it were implemented, it could be used in a Logon script, which I believe would provide the functionality that you're looking for.

I have added your forum post to that request so that we can let you know if it gets implemented.

Maureen
Reply With Quote
Reply


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

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 12:19 AM.