VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   can't telnet to winxp logging? (https://forums.vandyke.com/showthread.php?t=2488)

foggycactus 09-29-2007 03:44 AM

can't telnet to winxp logging?
 
hi,
For some reason when I try to close the log file in script it generates an empty file.
I am using the following code:

Set b = crt.session.ConnectInTab("/telnet 192.168.16.10 23")
b.Screen.Send vbCr
b.Screen.Send "Administrator"&vbCr
b.Screen.Send vbCr

{do something else............}

b.activate
b.screen.Synchronous = True
b.Session.LogFileName = "D:\1.log"
b.Session.Log True,True

b.screen.waitforstring ">",1
b.Screen.Send vbCr
b.Screen.Send("ftp 200.200.200.120"&vbCr)
b.Screen.Send("test"&vbCr)
b.Screen.Send("test"&vbCr)

b.screen.WaitForString "ftp>",2
b.Screen.Send("get "&downfile&vbCr)
b.screen.WaitForString "ftp>",2
b.Screen.Send("get "&upfile&vbCr)
b.screen.WaitForString "ftp>",20
b.Screen.Send("by"&vbCr)

b.screen.waitforstring ">",10
b.Screen.Send vbCr
crt.sleep 20000
b.Session.Log False
b.screen.Synchronous = False

can anyone help me?thanks for your help.

tnygren 09-29-2007 09:39 AM

Hi Foggycactus,

I just had a couple of questions.

Is this SecureCRT or CRT?

Which version is installed?

This can be found by selecting 'About <product>' from the 'Help' menu.

If the same series of steps is run manually in the terminal window, does the log file have information in it or is it still empty?

foggycactus 09-29-2007 07:49 PM

hi,tnygren
it's SecureCRT Version 5.5.2(build 475)
sorry,I don't know how to set log file while it run manually in the terminal window,but when I telnet to router,it's not empty,the code is blow:
Set a = crt.session.ConnectInTab("/telnet 192.168.16.1")
a.activate
a.Session.LogFileName = CurrentPath &"\ftptest_"&t&".log"
a.Session.Log True

a.Screen.Send("Set interface ethernet/1 rxBPS "&maxdown&vbCr)
a.Screen.WaitForString "hiper%",1
a.Screen.Send("set interface ethernet/1 txBPS "&maxup&vbCr)
a.Screen.WaitForString "hiper%",1
a.Screen.Send("set cbt mDRRquantumTx "&mindown&vbCr)
a.Screen.WaitForString "hiper%",1
a.Screen.Send("set cbt mDRRquantum "&minup&vbCr)
a.Screen.WaitForString "hiper%",1
a.Screen.Send("write"&vbCr)
a.Screen.Send("sh r"&vbCr)
a.Screen.Send vbCr
crt.sleep 1000
a.Session.Log False

tnygren 10-01-2007 02:02 PM

Hi Foggycactus,

Logging can be enabled manually by selecting the 'Log Session' option from the 'File' menu and selecting a log file name and path.

Once started, just perform the same steps that the script performs.

To stop the logging manually, just select the 'Log Session' option again.

Is a log file created when these steps are used?

foggycactus 10-09-2007 08:06 PM

:mad: I've done it,but there's only a few words in log file:
Welcome to Microsoft Telnet Service

login: Administrator


factly,the operational process displayed on CRT is below:

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================
C:\Documents and Settings\Administrator>ftp 1.1.1.1
^C
C:\Documents and Settings\Administrator>ftp 200.200.200.30
^C
C:\Documents and Settings\Administrator>ftp 192.168.16.10
Connected to 192.168.16.10.
220 Serv-U FTP Server v6.0 for WinSock ready...
User (192.168.16.10:(none)): test
331 User name okay, need password.
Password:
230 User logged in, proceed.
ftp> ls
200 PORT Command successful.
150 Opening ASCII mode data connection for /bin/ls.
1000m
10M.txt


If I select the 'Log Session' option and 'Trace Option',sometimes the log file is same as foregoing file,some times these words will discover in log file:
SecureCRT - Version 5.5.2 (build 475)
SENT do SUPPRESS GO AHEAD
SENT will TERMINAL TYPE
RCVD will ECHO
SENT do ECHO
RCVD will SUPPRESS GO AHEAD
RCVD do NEW ENVIRON
SENT wont NEW ENVIRON
RCVD do NAWS
SENT will NAWS
RCVD do BINARY
SENT will BINARY
RCVD will BINARY
SENT do BINARY
RCVD do TERMINAL TYPE
Welcome to Microsoft Telnet Service

login: Adminin starto    rator
password: * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = W e l c o m e t o M i c r o s o f t T e l n e t S e r v e r . * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =C : \ D o c u m e n t s a n d S e t t i n g s \ A d m i n i s t r a t o r > f t p 1 9 2 . 1 6 .  8 . 1 6 . 1 0 C o n n e c t e d t o 1 9 2 . 1 6 8 . 1 6 . 1 0 . 2 2 0 S e r v - U F T P S e r v e r v 6 . 0 f o r W i n S o c k r e a d y . . . U s e r ( 1 9 2 . 1 6 8 . 1 6 . 1 0 : ( n o n e ) ) : t e s t 3 3 1 U s e r n a m e o k a y , n e e d p a s s w o r d . P a s s w o r d : 2 3 0 U s e r l o g g e d i n , p r o c e e d . f t p > f t p > l s R e p l y f r o m 1 9 2 . 1 6 8 . 1 6 . 1 0 : b y t e s = 3 2 t i m e < 1 m s T T L = 1 2 8 R e p l y f r o m 1 9 2 . 1 6 8 . 1 6 . 1 0 : b y t e s = 3 2 t i m e < 1 m s T T L = 1 2 8 R e p l y f r o m 1 9 2 . 1 6 8 . 1 6 . 1 0 : b y t e s = 3 2 t i m e < 1 m s T T L = 1 2 8 P i n g s t a t i s t i c s f o r 1 9 2 . 1 6 8 . 1 6 . 1 0 :  P a c k e t s : S e n t = 4 , R e c e i v e d = 4 , L o s t = 0 ( 0 % l o s s ) , A p p r o x i m a t e r o u n d t r i p t i m e s i n m i l l i - s e c o n d s :  M i n i m u m = 0 m s , M a x i m u m = 0 m s , A v e r a g e = 0 m s C : \ D o c u m e n t s a n d S e t t i n g s \ A d m i n i s t r a t o r > f t p 1 9 2 . 1 6 8 . 1 6 . 1 0 C o n n e c t e d t o 1 9 2 . 1 6 8 . 1 6 . 1 0 . 2 2 0 S e r v - U F T P S e r v e r v 6 . 0 f o r W i n S o c k r e a d y . . . U s e r ( 1 9 2 . 1 6 8 . 1 6 . 1 0 : ( n o n e ) ) : t e s t 3 3 1 U s e r n a m e o k a y , n e e d p a s s w o r d . P a s s w o r d : 2 3 0 U s e r l o g g e d i n , p r o c e e d . f t p > f t p > l s 2 0 0 P O R T C o m m a n d s u c c e s s f u l . 1 5 0 O p e n i n g A S C I I m o d e d a t a c o n n e c t i o n f o r / b i n / l s . 1 0 0 0 m 1 0 M . t x t 1 2 8 K . t x t 1 2 8 M . r a r 1 2 M . r a r 1 4 M . r a r 1 M . t x t 2 5 6 K . t x t 2 M . t x t 3 0 M . t x t 3 M . r a r 3 M . t x t 5 1 2 K . t x t 5 4 M . r a r 6 4 K . t x t 6 M . r a r 9 2 M . r a r N T U S E R . D A T i p . t x t n t u s e r . d a t . L O G n t u s e r . i n i q q 2 0 0 7 _ 1 9 M . e x e u p d o w n . t x t u p d o w n 2 . t x t 2 2 6 T r a n s f e r c o m p l e t e . f t p : 收 到 2 3 9 字 节 , 用 时 0 . 0 0 S e c o n d s 2 3 9 0 0 0 . 0 0 K b y t e s / s e c . f t p > b y P i n g s t a t i s t i c s f o r 1 9 2 . 1 6 8 . 1 6 . 1 0 :  P a c k e t s : S e n t = 4 , R e c e i v e d = 4 , L o s t = 0 ( 0 % l o s s ) , A p p r o x i m a t e r o u n d t r i p t i m e s i n m i l l i - s e c o n d s :  M i n i m u m = 0 m s , M a x i m u m = 0 m s , A v e r a g e = 0 m s C : \ D o c u m e n t s a n d S e t t i n g s \ A d m i n i s t r a t o r > f t p 1 9 2 . 1 6 8 . 1 6 . 1 0 C o n n e c t e d t o 1 9 2 . 1 6 8 . 1 6 . 1 0 . 2 2 0 S e r v - U F T P S e r v e r v 6 . 0 f o r W i n S o c k r e a d y . . . U s e r ( 1 9 2 . 1 6 8 . 1 6 . 1 0 : ( n o n e ) ) : t e s t 3 3 1 U s e r n a m e o k a y , n e e d p a s s w o r d . P a s s w o r d : 2 3 0 U s e r l o g g e d i n , p r o c e e d . f t p > f t p > l s 0 0 P O R T C o m m a n d s u c c e s s f u l 1 5 0 O p e n i n g A S C I I m o d e d a t a c o n n e c t i o n f o r / b i n / l s . 1 0 0 0 m 1 0 M . t x t 2 8 K . t x t 2 8 M . r a r 2 M . r a r 4 M . r a r M . t x t 2 5 6 K . t x t 2 M . t x t 3 0 M . t x t 3 M . r a r 3 5 1 2 K . t x t 5 4 M . r a r 6 4 K . t x t 6 M . r a r 9 2 N T U S E R . D A T i p . t x t n t u s e r . d a t . L O G n t u s e r . i n i q q 2 0 0 7 _ 1 9 M . e x e u p d o w n . t x t u p d o w n 2 . t x t 2 2 6 T r a n s f e r c o m p l e t e . f t p : 收 到 2 3 9 字 节 , 用 时 0 . 0 0 S e c o n d s 2 3 9 0 0 0 . 0 0 K b y t e s / s e c . f t p > b y 1 G o o d b y e ! C : \ D o c u m e n t s a n d S e t t i n g s \ A d m i n i s t r a t o r > 

jjh 10-11-2007 05:43 PM

Hello foggycactus

It looks like the problem you are running into is that
SecureCRT is only able to log a line of data when it
receives a carriage return, but the telnet server is only
sending cursor positioning sequences and not carriage
returns.

I have created an entry for you in our feature request
database for SecureCRT to have the ability to log all data
that comes to the screen - even when we are not receiving
the carriage returns. We will contact you should a version
of SecureCRT become available with that functionality.

Thank you
JJH

Maureen 10-15-2019 11:41 AM

Quote:

Originally Posted by jjh (Post 10489)
I have created an entry for you in our feature request
database for SecureCRT to have the ability to log all data
that comes to the screen - even when we are not receiving
the carriage returns. We will contact you should a version
of SecureCRT become available with that functionality.

Support for logging all data has been added to a pre-beta version of SecureCRT. Please email me at Maureen.Jett@vandyke.com if you would like to try it.

Maureen


All times are GMT -6. The time now is 12:49 AM.