I am trying to use telnetlib to send commands to a device. The following is the command I am using:
tn = telnetlib.Telnet("10.62.48.96")
tn.write('c:/Test/Minte/TE.exe c:/data/test/bin/Test.dll >> c:/test/test.log \r\n')
print "Read",tn.read_until('cmd.exe ', 90)
The response I am getting is printing only until Test.dll and its nothing after that. I am doubting if write
function can send commands with more than one space.
I know the command is not getting executed because test.log is not getting generated at the destination path.
Response:
C:\windows\system32>c:/Test/Minte/TE.exe c:/data/test/bin/Test.dll←[4;71H