0

I'm using telnetlib python to configure my cisco router , i want to "auto" pass a message of "press a key to continue.." because it gets stuck .Is there a command to do that ?

Image of the issue

Community
  • 1
  • 1
Bad-3
  • 25
  • 6
  • Once you create telnet instance tn, use ```tn.write('\n')``` or any other char to simulate a key. I guess it will do the job. – drd Mar 09 '20 at 14:00
  • i tried it but i get no result .. i used tn.write(b'\n') because it should be with byte format .. that's what it displays when i write the command : Telnet(10.62.5.101.23):send b'\n' ,it gets stuck until timed out . – Bad-3 Mar 09 '20 at 21:07
  • may be add '\n\r' ? try the combinations – drd Mar 10 '20 at 05:13
  • tn.write('\r\n') – drd Mar 10 '20 at 08:38
  • the same result : Telnet(10.62.5.101.23) : send b'\n\r' .. than timed out – Bad-3 Mar 10 '20 at 10:59
  • use it like, first \r and then \n ```tn.write('\r\n')``` – drd Mar 11 '20 at 06:45
  • still not working .. the same issue : Telnet(10.62.5.101.23): send b'\n\r'..than timed out (by the way ,i should add (b) in every command i wrote) – Bad-3 Mar 13 '20 at 08:30

0 Answers0