Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If this is a problem related only to wget, but not other browsers, you may be able to spoof the site by using the wget '-U' option, giving it a user-agent description of another browser.
To see what a working browser sends as a user-agent header, you can run netcat on your localhost, and have a browser try to fetch a page from it:
Code:
nc -l -p 8000 -v
Now, in your browser, go to 'http://localhost:8000'. Observe the user-agent header received by netcat. Cut and paste the string into the wget -U argument.
--- rod.
If this is a problem related only to wget, but not other browsers, you may be able to spoof the site by using the wget '-U' option, giving it a user-agent description of another browser.
To see what a working browser sends as a user-agent header, you can run netcat on your localhost, and have a browser try to fetch a page from it:
Code:
nc -l -p 8000 -v
Now, in your browser, go to 'http://localhost:8000'. Observe the user-agent header received by netcat. Cut and paste the string into the wget -U argument.
--- rod.
I did the same as advised by you, but i am still getting ERROR:403
i used the user agent as-- Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
help needed.
Well, there was one specific site that wouldn't accept the entire user agreement, like the one u posted. I tried simply
Code:
wget -U firefox http://xxx.xxx.com/
and, lol, surprisingly, it worked! you should try that if you're still stuck. Or maybe i set the user agent as "mozilla" instead of "firefox", can't remember. Just remember, the user agent you're trying to use has to be able to access the website in the first place.
Well, there was one specific site that wouldn't accept the entire user agreement, like the one u posted. I tried simply
Code:
wget -U firefox http://xxx.xxx.com/
and, lol, surprisingly, it worked! you should try that if you're still stuck. Or maybe i set the user agent as "mozilla" instead of "firefox", can't remember. Just remember, the user agent you're trying to use has to be able to access the website in the first place.
Ty, i tried your suggestion, but i am still not able to access the site thru Wget, though the same is working thru my browser, firefox 2.0
'Just wanted to say THANKS- I've been having this problems and using -U Mozilla works great.
(I wrote a quick script to update my web site with curl if the version on my disk differs from a cached copy- much nicer to run a command than all these strange gooey programs...)
-r
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.