From a23e877b74c01e5e846edc4ca309466d23f07ee4 Mon Sep 17 00:00:00 2001 From: Leonardo Taccari Date: Sat, 15 Jun 2019 18:39:20 +0200 Subject: [PATCH 2/2] Add trailing CRLF in all client requests. --- cmdline.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdline.txt b/cmdline.txt index d344f28..1deb41a 100644 --- a/cmdline.txt +++ b/cmdline.txt @@ -10,7 +10,7 @@ request string and then netcat to send it to the remote server. A request of the file "/tutorials/cmdline.txt" will looks like this : - printf "/tutorials/cmdline.txt" | nc somedomain.com 70 + printf "/tutorials/cmdline.txt\r\n" | nc somedomain.com 70 You will get the server answer directly into your output. Be careful if you ask binary files, it will be displayed on your screen, this is @@ -21,7 +21,7 @@ another software (or using tee for both at the same time). The following example will download a music file, save it on the filesystem and play it with mpv while downloading. - printf "/some_music.ogg" | tee saved_music.ogg | mpv - + printf "/some_music.ogg\r\n" | tee saved_music.ogg | mpv - You may have seen that the data type is not part of the request string, this is because it is only useful for the client to decide how -- 2.22.0