views:

103

answers:

4

How to identify which server side script language was used with a web site? Asp.Net? PHP? RoR? Java? or other?

For example, Which server side script language was used with stackoverflow.com?

A: 

You cannot know this for sure unless they tell you.

SO uses ASP.NET MVC.

Mike Graham
+2  A: 

There's no guaranteed way to know what language is used on any site - sometimes it's obvious due to things like file extensions (.php, .cfm, et cetera), but in many other cases it's not.

Since server-side languages are processed on the server, the only thing that your browser necessarily receives is the results, which can be the same from many different languages.

Amber
And sometimes it's obvious and wrong, such as Urban Dictionary, where all the pages have .php extensions but the site is RoR.
Mike Graham
@Mike: is it wrong on purpose, or are they using RoR as a backend and PHP as a front end?
Anthony
Well, it's one way to potentially deter amateur script kiddies...
Amber
A: 

This is not something all servers want you to know. So unless they have the extension, you're not going to know for sure.

If you view the response headers, you may be able to make a fair guess. For instance, if it's Apache running on Solaris, it's not as likely to be ASP.

One interesting thing I learned to today is that some Microsoft (IIS) servers accept a HTTP Header translate, which can be set to F, and this will return code instead of HTML. So if you have the time, the will, and the balls, you could use a non-browser HTTP client (like curl on PHP) and set that header to see what comes back. If it's not HTML, it's probably ASP/.NET.

Anthony
A: 

You can have a look at the HTTP headers.

For example, Apache with mod_php under Ubuntu returns this:

X-Powered-By:PHP/5.2.10-2ubuntu6.3

Also, I have a small Python app that is served by Paste behind Apache, and the server returns this:

Server:PasteWSGIServer/0.5 Python/2.6.4

Of course, the server can return whatever it wants. You can't rely on this information.

Antoine Leclair