What tactics can I use to prevent users from knowing what language the website is written in?

So, if you are writing a website using Java and JSP and you do not want users to know what language you entered it in. What methods would you use?

+3
source share
6 answers

If you use some kind of framework, for example, Struts2, you will have an extension (* .action or whatever) associated with the dispatcher servlet. The dispatcher "forwards" the request to the JSP, which is located in the WEB-INF directory. Users only see the URL that was directed to the servlet and return the HTML. They cannot say what a template language is. Since you can choose whatever you like to map servlets to, you can do something or even incorrectly direct them to something like ".php" or ".asp".

Of course, you can have some JSPs right in the web application directory, and not in WEB-INF. You can give them another extension and tell the container to treat them as a JSP by creating <jsp-property-group>with an element url-patternthat indicates a fake extension in web.xml.

, , , . , , - cookie , "jsessionid". , Servlet, .

+5

, . - , , .

+4

, , , (jsp, aspx, asp ..). , URL- . , , , .

+2

1) , . Remap. ASP.NET PHP.

2) , , , , , , . , , - , .

+1

HTTP, . , .

+1

Apache .php PHP script :

AddHandler php5-script .php

Change it to .asp and Apache recognizes .asp files as PHP scripts. Change it, say .blarg, and Apache recognizes .blarg files as PHP scripts.

0
source

Source: https://habr.com/ru/post/1706652/


All Articles