Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私が必要なものは何:
telnet 1.1.1.1 (no password or login required) #connected telnet localhost 1234 command_1 command_2 command_3 exit exit
bash または python でそれを書く方法はありますか?
パイプを使用して入力を telnet に渡すことができます。あなたのシェルで:
$ echo "echo -e 'command_1\ncommand_2\ncommand_3' | telnet localhost 1234" | telnet 1.1.1.1