LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-20-2018, 08:39 AM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Rep: Reputation: 51
Question Ever seen HTTP error 403 for old user agent values?


Since many years ago, I eventually use wget with a custom user agent option - with a nonsense value or not.

Today, for a fairly complex start page of a not too big bussiness, I got a 403 error! Strange... I changed the user agent to a "better" one, more close to current browsers versions, and it worked. I downloaded index.html (for the "/" I asked) that way.

Terminal output showing two wget commands describing the last paragraph:

Code:
$  wget1 'https://[domain]/' # old user agent
--2018-09-20 10:02:56--  https://[domain]/
Resolvendo [domain] ([domain])... [ipv6a], [ipv6b], [ipv4a], ...
Conectando-se a [domain] ([domain])|[ipv6a]|:443... conectado.
A requisição HTTP foi enviada, aguardando resposta... 403 Forbidden
2018-09-20 10:02:56 ERRO 403: Forbidden.


$    wget2 'https://[domain]/'   # fairly common user agent
--2018-09-20 10:03:28--  https://[domain]/
Resolvendo [domain] ([domain])... [ipv6a], [ipv62b], [ipv4b], ...
Conectando-se a [domain] ([domain])|[ipv6a]|:443... conectado.
A requisição HTTP foi enviada, aguardando resposta... 200 OK
Tamanho: não especificada [text/html]
Salvando em: “index.html”

index.html              [   <=>              ] 423,87K   710KB/s    in 0,6s    

2018-09-20 10:03:30 (710 KB/s) - “index.html” salvo [434047]

$   alias|grep wget

alias wget='wget --no-check-certificate'
alias wget2='wget -U "************************************"'
alias wget1='wget -U "******************************"'

$
Have you ever seen this?

Last edited by dedec0; 09-20-2018 at 09:50 AM.
 
Old 09-20-2018, 10:45 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Have you ever seen this?
Yes.
I'm also using this trick to block access to anyone that uses the UA (see this), in order to do some code execution.

Regards
 
Old 09-20-2018, 11:04 AM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
So, with the old UA sending, am I using something that people trying to remotely execute things do? This is bad, very bad, because that is far from everything I ever do. The most "complicated" thing I usually try is to save things that annoying websites show, but use "fancy" tricks to block them being saved.
 
Old 09-20-2018, 12:09 PM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Which user agent are you mimicking? It could well be that the site in question just refuses connections from old user agents that it no longer supports.
 
Old 09-20-2018, 12:31 PM   #5
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
The old user agent is 'Internet Explorer 6'. I just wanted the same HTML... I think that websites that sent different pages for different browsers have serious basic problems, and I usually do not like them.
 
Old 09-20-2018, 01:32 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
One of the most knowledgeable people I know will display a page that says "I won't show you anything in an IE browser" on his website. It's the main reason I discovered Firefox.

It's interesting that the site you asked about is just throwing an error instead of telling you why. That, I agree, is rather rude. [but is is their site; their rules -- so it goes]
 
Old 09-20-2018, 01:39 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by dedec0 View Post
The old user agent is 'Internet Explorer 6'. I just wanted the same HTML... I think that websites that sent different pages for different browsers have serious basic problems, and I usually do not like them.
The problem is that websites sometimes have to send different HTML to different browsers due to incompatibilities in how they interpret HTML and CSS, for example, a problem that was much more marked in the past. Internet Explorer 6 is extremely old and was in fact considered to be one of the most problematic of all browsers when it came to not interpreting the standards correctly. On top of that, hardly anyone uses Internet Explorer 6 any more.

So, the site in question cannot produce the same HTML for all the browsers out there. That's the reason that it has obviously decided not to send HTML at all to some old deprecated standard-incompatible browsers for which they would have to modify their code.
 
Old 09-20-2018, 01:41 PM   #8
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by scasey View Post
One of the most knowledgeable people I know will display a page that says "I won't show you anything in an IE browser" on his website. It's the main reason I discovered Firefox.
hahahaha... >,<
And must that be updated to talk about Edge too? Or Edge is acceptable?

About the rest you wrote. It is their site. It did not bug me much, except that it wants to make me click on dozens of images to see them in their full size. A script to parse all the images, transform them in their big sister image was (luckily, could be harder) fairly easy to do).
 
Old 09-20-2018, 01:41 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by scasey View Post
One of the most knowledgeable people I know will display a page that says "I won't show you anything in an IE browser" on his website. It's the main reason I discovered Firefox.

It's interesting that the site you asked about is just throwing an error instead of telling you why. That, I agree, is rather rude. [but is is their site; their rules -- so it goes]
Perhaps, but having had to code websites to handle Internet Explorer 6 and chums in the past, I can understand their actions.
 
Old 09-20-2018, 01:44 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by dedec0 View Post
hahahaha... >,<
And must that be updated to talk about Edge too? Or Edge is acceptable?

About the rest you wrote. It is their site. It did not bug me much, except that it wants to make me click on dozens of images to see them in their full size. A script to parse all the images, transform them in their big sister image was (luckily, could be harder) fairly easy to do).
Much better these days.

https://html5test.com/results/desktop.html

Note that this is only comparing html5 results, not previous versions of html.
 
Old 09-20-2018, 02:08 PM   #11
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by hydrurga View Post
Perhaps, but having had to code websites to handle Internet Explorer 6 and chums in the past, I can understand their actions. :)
There are many pages that could be reduced, with *all* their important things being showed only with HTML 3.2. A huger number of them can be expressed in HTML 4.01 + CSS 1 or 2 (if I remember correctly), including aspects for mobiles.

HTML 5 and the DRM things I hear and heard going around are not something I like very much. I like old browsers, and systems that work with them. They are just very fine, and there is no need to change either for the rest of our lives.
 
Old 09-20-2018, 02:22 PM   #12
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by dedec0 View Post
And must that be updated to talk about Edge too? Or Edge is acceptable?
Apparently not updated -- I get the same page in Edge as in Firefox. Even the current IE works now.
 
Old 09-20-2018, 02:25 PM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by dedec0 View Post
There are many pages that could be reduced, with *all* their important things being showed only with HTML 3.2. A huger number of them can be expressed in HTML 4.01 + CSS 1 or 2 (if I remember correctly), including aspects for mobiles.

HTML 5 and the DRM things I hear and heard going around are not something I like very much. I like old browsers, and systems that work with them. They are just very fine, and there is no need to change either for the rest of our lives.
With all due respect, dedec0, you've obviously never constructed websites, not to any great extent anyway and not over the last few decades. Html5 is excellent progress on previous incarnations of HTML, as is CSS3 an important step forward from previous incarnations of CSS. Or would you prefer, to take just one example, positioning things on the screen by using tables which were never designed for that purpose?

But, I can see that I won't be able to persuade you otherwise, so I won't bother posting links to pages that discuss why web design is much easier, and much more powerful, than it was several years ago.

In saying that, we agree on DRM, and I admit that, having started coding in the 1980s, I am in favour of information-rich sites as they generally used to be rather than the sound-bite sites with huge buttons and lots of blank space that are in vogue these days - but that is a separate issue from the technology that is being used to build the sites.
 
3 members found this post helpful.
Old 09-20-2018, 02:39 PM   #14
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
@hydrurga's #13:

My contact with HTML, CSS and webdesign in general were limited, indeed. But I have many complaints in many websites today... and most of my complaints (at least) can be solved with a fairly small bit of HTML 4 and possibly a bit of CSS too. And a fair amount of them could be arranged (fairly easily) to be HTML3 only, if needed! HTML4+CSS already condemned the "tables to format" thing, so this is not something new in HTML5 - as I guess and think you know; I found this part of your #13 post strange to read.

The pointers to discussions will be welcome. But I would prefer that they are easy to read, going step by step to add details and to deepen ideas, and that they do not make it hard for people with less specific or deep backgrounds in the area (like me) to understand and (possibly) learn something.
 
Old 09-20-2018, 03:03 PM   #15
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by dedec0 View Post
Have you ever seen this?
Afraid I have and more. I got one up on my LQBlog that "asked permission" to upload a shell.

I routinely used to filter out old Useragents. and curl/wget/every lwp_
An Intro to bad bots
is a pretty good read, if you're growing suspicious.

Peace out!
John out.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wget - using --user-agent option still results in 403/forbidden error tensigh Linux - Software 14 01-21-2013 12:48 PM
Http error 403 when vhosts enabled skalman93 Slackware 2 03-11-2009 09:35 AM
Http error 403 when vhosts enabled skalman93 Slackware 1 03-10-2009 04:15 PM
apache related problem (HTTP Error 403 - Forbidden ) spandau Linux - Networking 29 09-01-2005 06:06 PM
HTTP 403 (Forbidden) error lothario Fedora 6 02-08-2005 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration