#1
|
|||
|
|||
Trace script execution
Hi,
Im developing a script for a customer (read file with hosts, execut commands from another file) and while developing remote from the VPN works great. However, as we go and test the script in the LAN it works 1 out of 3 times. No change in files or anything. Is there a way to trace the script execution and see whats going on? Also sometimes it looks like maybe the characters are coming faster than the script can read with WaitforString since the string comes but it just gets stuck waiting. Is this possible? Thanks Mario |
#2
|
|||
|
|||
Hello Mario,
There are many unknowns. ![]() What version of SecureCRT are you using? On what platform? When you say it works 1 out of 3 times, are you saying you get an error for those two failure cases? Or does the script just not complete execution two times? If so, is Cancel available from the Script menu? If so and you select it, what is the error? Quote:
![]() The above description sounds like a synchronous issue. Did you set synchronous to True? See information about the importance of Synchronous in section 4.2 of the scripting manual here. The topic header is: Avoid "Missing" Data with Screen.Synchronous = True
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hi,
Sorry. more details below. You can find the script in the link at the end. Im using securert 6.1.1 on win7 64bits. Don't know the details of the other PCs I tested in but they were all win7. Synchronous has been true since the beginning. I recently I also put IgnoreEscape = True. The kind of errors I get are: The word "Username:" comes in but the script does not act on it and just keeps waiting. Other error I got was on the if in line 69 after sending strPassword, the script sends the commands even though the credentials were incorrect (I get another "Username:" prompt and not the "#" prompt. One note is the server is a Windows server telnet server used as jump server which only works with secureCRT. There is something wrong with that as it does not keep history lines. Link to script |
#4
|
|||
|
|||
Hello Mario,
It will take me some time to look over your script. Please note that SecureCRT v6.1.1 is not considered compatible with Windows 7. The first version of SecureCRT to support Windows 7 was v6.5.x. You can check your upgrade eligibility here.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
I just tried it with the latest version 7 in trial and I get the same behavior.
But now Im seriously starting to think its actually a server problem. I did packet captures and traffic comes with some seriously strange characters. Since its telnet it would be all cleartext and I have done many captures where you clearly see what was exchanged. The picture below show traffic captured when one of the errors occured. The SecureCRT window shows me "Username:" but clearly the word Username has not come from the server. Its like it sends a command to the terminal or something. [IMG]C:\Users\mpinho\Documents\TEMP\capture-securecrt.PNG[/IMG] Only after the time to enter username expires we get traffic from the server with the characters "Username" and once again a lot of strange characters. [IMG]C:\Users\mpinho\Documents\TEMP\capture-securecrt2.PNG[/IMG] |
#6
|
|||
|
|||
Hello Mario,
Your images did not post, but we probably won't need them. The behavior you describe makes me think there is a configuration option that may benefit you. In the Connection / Telnet category of SecureCRT's Session Options, is Force character at a time mode enabled? If not and you enable it, do you see different results?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#7
|
|||
|
|||
Hi,
Was disabled. I enabled it but got the same results. |
#8
|
|||
|
|||
Hello Mario,
I think it's time we saw those screenshots that failed to post. ![]() Could you attach those to an email sent to support@vandyke.com? Please also reference "Attn Brenda - Forum Thread 11965" in the subject line. Please include your SecureCRT serial number so if we find the solution is in some intermediate version between what you were using and current version we can determine what version your license is actually eligible to be used with. I have some other suggestions to capture troubleshooting info, but I will wait to receive your email.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#9
|
|||
|
|||
E-mail sent.
Mario |
![]() |
Tags |
trace , waitforstring |
Thread Tools | |
Display Modes | Rate This Thread |
|
|