[thelist] Perl Net::Telnet 64 character limit ?

Michael Archer miar70 at yahoo.co.uk
Wed Feb 27 18:38:48 CST 2002


Hi,

I am using Net::Telnet (3.02) to login into a remote
machine (Redhat 6.2) and start a process. The problem
is the command line is very long and what I see is
that a ^M is added to the input stream at character
63. The command is then basically garbaled and does
not get executed.

Is this a fixed limit, related to block size and is
there a way round it ?

Thanks Michael

code snippet
  $host = new Net::Telnet (Timeout => 10,
                      Prompt => "$prompt",
                      Dump_Log => "/tmp/dump.log",
                      Input_Log => "/tmp/input.log",
                      Output_Log => "/tmp/output.log",
                      );

  $host->open($hostname);
  $host->login($usr, $pwd);

dump log
< 0x00000: 2f 74 72 61  66 66 69 63  67 65 6e 5f  6c
6f 67 2d  /trafficgen_log-
< 0x00010: 33 2e 34 2e  31 20 2d 6e  20 22 43 61  62
38 2d 31  3.4.1 -n "Cab8-1
< 0x00020: 2e 74 78 74  22 20 2d 66  20 22 35 30  70
63 4d 6f  .txt" -f "50pcMo
< 0x00030: 64 5f 73 70  5f 4e 6f 44  68 63 70 5f  31
0d 00 3c  d_sp_NoDhcp_1..<
< 0x00040: 5f 6c 6f 67  2d 33 2e 34  2e 31 20 2d  6e
20 22 43  _log-3.4.1 -n "C
< 0x00050: 61 62 38 2d  31 2e 74 78  74 22 20 2d  66
20 22 35  ab8-1.txt" -f "5
< 0x00060: 30 70 63 4d  6f 64 5f 73  70 5f 4e 6f  44
68 63 70  0pcMod_sp_NoDhcp
< 0x00070: 5f 31 6f 20  20 20 20 20  20 20 20 20  20
20 20 20  _1o
< 0x00080: 20 20 20 20  20 20 20 20  20 20 20 20  08
08 08 08              ....
< 0x00090: 08 08 08 08  08 08 08 08  08 08 08 08  08
08 08 08  ................
< 0x000a0: 08 08 08 08  08 66 32 2e  74 78 74 22  20
2d 69 20  .....f2.txt" -i
< 0x000b0: 36 30 20 2d  6c 20 22 2f  74 6d 70 2f  74
65 0d 00  60 -l "/tmp/te..
< 0x000c0: 3c 20 2d 66  20 22 35 30  70 63 4d 6f  64
5f 73 70  < -f "50pcMod_sp
< 0x000d0: 5f 4e 6f 44  68 63 70 5f  31 6f 66 32  2e
74 78 74  _NoDhcp_1of2.txt
< 0x000e0: 22 20 2d 69  20 36 30 20  2d 6c 20 22  2f
74 6d 70  " -i 60 -l "/tmp
< 0x000f0: 2f 74 65 73  20 20 20 20  20 20 20 20  20
20 20 20  /tes
< 0x00100: 20 20 20 20  20 20 20 20  20 20 20 20  20
08 08 08               ...
< 0x00110: 08 08 08 08  08 08 08 08  08 08 08 08  08
08 08 08  ................
< 0x00120: 08 08 08 08  08 08 74 73  74 61 74 5f  73
67 73 6e  ......tstat_sgsn
< 0x00130: 2d 38 2d 31  5f 57 65 64  5f 46 65 62  5f
32 37 0d  -8-1_Wed_Feb_27.
< 0x00140: 00 3c 32 2e  74 78 74 22  20 2d 69 20  36
30 20 2d  .<2.txt" -i 60 -
< 0x00150: 6c 20 22 2f  74 6d 70 2f  74 65 73 74  73
74 61 74  l "/tmp/teststat
< 0x00160: 5f 73 67 73  6e 2d 38 2d  31 5f 57 65  64
5f 46 65  _sgsn-8-1_Wed_Fe
< 0x00170: 62 5f 32 37  5f 20 20 20  20 20 20 20  20
20 20 20  b_27_
< 0x00180: 20 20 20 20  20 20 20 20  20 20 20 20  20
20 08 08                ..
< 0x00190: 08 08 08 08  08 08 08 08  08 08 08 08  08
08 08 08  ................
< 0x001a0: 08 08 08 08  08 08 08 31  39 3a 31 37  3a
30 30 5f  .......19:17:00_
< 0x001b0: 32 30 30 32  2e 6c 6f 67  22 20 26 0d  0a
5b 31 5d  2002.log" &..[1]
< 0x001c0: 20 31 33 32  30 36 0d 0a  72 6f 6f 74  40
73 67 73   13206..root at sgs
< 0x001d0: 6e 2d 38 2d  31 23 20
        n-8-1#


______________________________________________________________________
Find, Connect, Date! http://personals.yahoo.ca



More information about the thelist mailing list