Wget "waiting for response"



xanifer

New Member
Joined
Mar 1, 2023
Messages
15
Reaction score
12
Credits
103
Is the address correct? I don't see anything at that address
 
OP
S

sofasurfer

Member
Joined
May 24, 2022
Messages
97
Reaction score
30
Credits
796

Attachments

  • Screenshot from 2023-03-05 22-50-05.png
    Screenshot from 2023-03-05 22-50-05.png
    314.6 KB · Views: 30

xanifer

New Member
Joined
Mar 1, 2023
Messages
15
Reaction score
12
Credits
103
use
Code:
wget -U 'Mozilla/5.0' https://www.autozone.com/znetrgs/repair_guide_content/en_us/images/0996b43f/80/24/52/16/large/0996b43f80245216.gif

It passes Mozilla/5.0 as a header to the page and for me allowed it to download.
 

xanifer

New Member
Joined
Mar 1, 2023
Messages
15
Reaction score
12
Credits
103
I tried posting a solution but it is awaiting moderator approval so i'll just send this instead. This passes Mozilla/5.0 as a header to the page and for me allowed it to download.
wget Autozone Schematic.jpg
 
OP
S

sofasurfer

Member
Joined
May 24, 2022
Messages
97
Reaction score
30
Credits
796
That did it, THANKS.
Now, if its not to much trouble, do you have an explaination for "This passes Mozilla/5.0 as a header to the page"? What does this do? If its to complex thats ok, I'll be looking it up.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
8,628
Reaction score
7,587
Credits
35,291
but it is awaiting moderator approval so i'll just send this instead.

You get that if you post a URL before you have a half a dozen Posts under your belt - spam protection. I have approved it now.

Welcome @xanifer

Chris Turner
wizardfromoz
 

xanifer

New Member
Joined
Mar 1, 2023
Messages
15
Reaction score
12
Credits
103
from what I understand, when you send an HTTP request/response you send information to the server such as operating system, type of connection, etc. and in this case the server requires to know what browser you are using in order to download the file. the -U "browser" tells it, in this case, that you are using Mozila/5.0. if you run
Code:
wget -S address
you can see the header information of the HTTP request/response.
 

JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,704
Reaction score
2,471
Credits
13,677
That did it, THANKS.
Now, if its not to much trouble, do you have an explaination for "This passes Mozilla/5.0 as a header to the page"? What does this do? If its to complex thats ok, I'll be looking it up.
The server was probably set up to reject, or ignore http requests with no user-agent, which is why you got the "waiting for a response" message.

By passing "Mozilla/5.0" via wget's -U (user-agent) option - it effectively tells the server that the request is coming from a mozilla browser. So you're spoofing the connection to make it look like it's a browser that's connecting. Then the server will accept the request and respond.

:Edit:
I should have read the entire thread before posting, looks like @xanifer already answered that question! Oops! :/ Ha ha!
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Latest posts

Top