I am executing a few commands on a remote machine which runs linux over a telnet session using telnet lib. When I give the following :
tn.write("<binary_name>")
time.sleep(10)
tn.write("cat <path_of_output_file>")
rd_buf=tn.read_very_eager()
print(rd_buf)
it gives the output of the binary and the output of cat
command. While I only want the output of the cat
command. I have only worked with read_very_eager
and read_until
. How do I restrict my buffer variable to hold only the contents of the cat
command?