python - Any way to issue telnet commands remotely ander double telnet session? -


what need:

telnet 1.1.1.1 (no password or login required) #connected telnet localhost 1234 command_1 command_2 command_3 exit exit 

is there way write on bash or python ?

you can pass input telnet using pipe. @ shell:

$ echo "echo -e 'command_1\ncommand_2\ncommand_3' | telnet localhost 1234" | telnet 1.1.1.1 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -