Of course I need write some Telnet code in perl but i have some problems. My system support diffrent types of prompt with different functionality, so:
1. login prompt:
This computer resource is private property. Unauthorized access, misuse, and misappropriation of resources is prohibited by law. hapWibbSc2 login: root Password: Last login: Tue Jun 11 12:04:37 on ttyS0 root@hapWibbSc2:~#
2. 'linux' kind prompt root@hapWibbSc2:~#
3. agent prompt:
root@hapWibbSc2:~# cli Starting Agent CLI hapWibbSc2#
How to detect in which prompt am I, because there is different types of command in every.
And second problem when I grabbing out put of command sometime if output is longer it print "--More--" waiting for <space> key from user to print rest how to decect is and send <space> and grab rest of output.
i.e.
...pciConflictResolutionMode preview sendSortedEutraNeighbors true sen +dSortedCdma2000Neighbors true TinterFreqAnrMeasDuration 100 TreportStrongestCellsForSonEhrpd 1 +00 TreportStrongestCellsForSonOnex 100 sonAppLogEn able true anrModeEUtran disabled anrModeEhrpd disabled anrModeOnex dis +abled nrtMaxSizeEUtran 134 nrtMaxSizeEhrpd 134 nrt MaxSizeOnex 134 anrScoreOnexMin 5 anrScoreOnexMax 10 anrSco --More-- reOnexThresholdMax 20
Anyhelp will be grate!
In reply to Net::Telnet different prompts by emcek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |