Downloading File Using Telnet
Clash Royale CLAN TAG#URR8PPP
I'm trying to download a file, https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe or https://www.7-zip.org/a/7z1806-x64.exe, without using curl
or wget
; rather, I want to download the file by using telnet
as follows.
(echo 'GET /~sgtatham/putty/latest/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
This does not work; when I use cat
the file contents are as follows.
HTTP/1.1 302 Found
Date: Sun, 17 Feb 2019 18:40:22 GMT
Server: Apache
Location: https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe
Content-Length: 301
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe">here</a>.</p>
<hr>
<address>Apache Server at the.earth.li Port 80</address>
</body></html>
linux download telnet
|
show 1 more comment
I'm trying to download a file, https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe or https://www.7-zip.org/a/7z1806-x64.exe, without using curl
or wget
; rather, I want to download the file by using telnet
as follows.
(echo 'GET /~sgtatham/putty/latest/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
This does not work; when I use cat
the file contents are as follows.
HTTP/1.1 302 Found
Date: Sun, 17 Feb 2019 18:40:22 GMT
Server: Apache
Location: https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe
Content-Length: 301
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe">here</a>.</p>
<hr>
<address>Apache Server at the.earth.li Port 80</address>
</body></html>
linux download telnet
1
In the reply from the server, you see that the document has moved to a new address. It also tells you what the new address is.
– Kusalananda
Feb 17 at 18:53
after following the new address, you’ll also have to remove the http header from the response
– Nephanth
Feb 17 at 18:56
2
You are going to have to be very good at hand-writing TLS handshakes to do that with telnet from an HTTPS URL. I think you're out of luck.
– Michael Homer
Feb 17 at 18:57
forget what I said, the command "(echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe " seems to just work without even having to remove headers
– Nephanth
Feb 17 at 19:02
1
If you have openssl installed,openssl s_client -host the.earth.li -port 443 -crlf
will do the job. Otherwise you may want to put a copy somewhere HTTP-accessible.
– Michael Homer
Feb 17 at 19:14
|
show 1 more comment
I'm trying to download a file, https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe or https://www.7-zip.org/a/7z1806-x64.exe, without using curl
or wget
; rather, I want to download the file by using telnet
as follows.
(echo 'GET /~sgtatham/putty/latest/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
This does not work; when I use cat
the file contents are as follows.
HTTP/1.1 302 Found
Date: Sun, 17 Feb 2019 18:40:22 GMT
Server: Apache
Location: https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe
Content-Length: 301
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe">here</a>.</p>
<hr>
<address>Apache Server at the.earth.li Port 80</address>
</body></html>
linux download telnet
I'm trying to download a file, https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe or https://www.7-zip.org/a/7z1806-x64.exe, without using curl
or wget
; rather, I want to download the file by using telnet
as follows.
(echo 'GET /~sgtatham/putty/latest/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
This does not work; when I use cat
the file contents are as follows.
HTTP/1.1 302 Found
Date: Sun, 17 Feb 2019 18:40:22 GMT
Server: Apache
Location: https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe
Content-Length: 301
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe">here</a>.</p>
<hr>
<address>Apache Server at the.earth.li Port 80</address>
</body></html>
linux download telnet
linux download telnet
edited Feb 17 at 21:42
Christopher
10.7k33149
10.7k33149
asked Feb 17 at 18:51
Qassam MahmoudQassam Mahmoud
183
183
1
In the reply from the server, you see that the document has moved to a new address. It also tells you what the new address is.
– Kusalananda
Feb 17 at 18:53
after following the new address, you’ll also have to remove the http header from the response
– Nephanth
Feb 17 at 18:56
2
You are going to have to be very good at hand-writing TLS handshakes to do that with telnet from an HTTPS URL. I think you're out of luck.
– Michael Homer
Feb 17 at 18:57
forget what I said, the command "(echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe " seems to just work without even having to remove headers
– Nephanth
Feb 17 at 19:02
1
If you have openssl installed,openssl s_client -host the.earth.li -port 443 -crlf
will do the job. Otherwise you may want to put a copy somewhere HTTP-accessible.
– Michael Homer
Feb 17 at 19:14
|
show 1 more comment
1
In the reply from the server, you see that the document has moved to a new address. It also tells you what the new address is.
– Kusalananda
Feb 17 at 18:53
after following the new address, you’ll also have to remove the http header from the response
– Nephanth
Feb 17 at 18:56
2
You are going to have to be very good at hand-writing TLS handshakes to do that with telnet from an HTTPS URL. I think you're out of luck.
– Michael Homer
Feb 17 at 18:57
forget what I said, the command "(echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe " seems to just work without even having to remove headers
– Nephanth
Feb 17 at 19:02
1
If you have openssl installed,openssl s_client -host the.earth.li -port 443 -crlf
will do the job. Otherwise you may want to put a copy somewhere HTTP-accessible.
– Michael Homer
Feb 17 at 19:14
1
1
In the reply from the server, you see that the document has moved to a new address. It also tells you what the new address is.
– Kusalananda
Feb 17 at 18:53
In the reply from the server, you see that the document has moved to a new address. It also tells you what the new address is.
– Kusalananda
Feb 17 at 18:53
after following the new address, you’ll also have to remove the http header from the response
– Nephanth
Feb 17 at 18:56
after following the new address, you’ll also have to remove the http header from the response
– Nephanth
Feb 17 at 18:56
2
2
You are going to have to be very good at hand-writing TLS handshakes to do that with telnet from an HTTPS URL. I think you're out of luck.
– Michael Homer
Feb 17 at 18:57
You are going to have to be very good at hand-writing TLS handshakes to do that with telnet from an HTTPS URL. I think you're out of luck.
– Michael Homer
Feb 17 at 18:57
forget what I said, the command "(echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe " seems to just work without even having to remove headers
– Nephanth
Feb 17 at 19:02
forget what I said, the command "(echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe " seems to just work without even having to remove headers
– Nephanth
Feb 17 at 19:02
1
1
If you have openssl installed,
openssl s_client -host the.earth.li -port 443 -crlf
will do the job. Otherwise you may want to put a copy somewhere HTTP-accessible.– Michael Homer
Feb 17 at 19:14
If you have openssl installed,
openssl s_client -host the.earth.li -port 443 -crlf
will do the job. Otherwise you may want to put a copy somewhere HTTP-accessible.– Michael Homer
Feb 17 at 19:14
|
show 1 more comment
1 Answer
1
active
oldest
votes
From the reply you can see that the "document has moved" to "https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe", so you should just change the link in your command (change "latest" to "0.70").
Your browser does this automatically. The command should be: (echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501218%2fdownloading-file-using-telnet%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
From the reply you can see that the "document has moved" to "https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe", so you should just change the link in your command (change "latest" to "0.70").
Your browser does this automatically. The command should be: (echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
add a comment |
From the reply you can see that the "document has moved" to "https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe", so you should just change the link in your command (change "latest" to "0.70").
Your browser does this automatically. The command should be: (echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
add a comment |
From the reply you can see that the "document has moved" to "https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe", so you should just change the link in your command (change "latest" to "0.70").
Your browser does this automatically. The command should be: (echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
From the reply you can see that the "document has moved" to "https://the.earth.li/~sgtatham/putty/0.70/w64/putty.exe", so you should just change the link in your command (change "latest" to "0.70").
Your browser does this automatically. The command should be: (echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe
answered Feb 17 at 21:35
Daniel AtanasovDaniel Atanasov
544
544
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501218%2fdownloading-file-using-telnet%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
In the reply from the server, you see that the document has moved to a new address. It also tells you what the new address is.
– Kusalananda
Feb 17 at 18:53
after following the new address, you’ll also have to remove the http header from the response
– Nephanth
Feb 17 at 18:56
2
You are going to have to be very good at hand-writing TLS handshakes to do that with telnet from an HTTPS URL. I think you're out of luck.
– Michael Homer
Feb 17 at 18:57
forget what I said, the command "(echo 'GET /~sgtatham/putty/0.70/w64/putty.exe'; echo ""; sleep 1; ) | telnet the.earth.li 80 > s.exe " seems to just work without even having to remove headers
– Nephanth
Feb 17 at 19:02
1
If you have openssl installed,
openssl s_client -host the.earth.li -port 443 -crlf
will do the job. Otherwise you may want to put a copy somewhere HTTP-accessible.– Michael Homer
Feb 17 at 19:14