Username from CGI

is there any way to get the username and username of the remote client via CGI in perl? I tried printing the ENV hash in a CGI script, but I could not get this information

+3
source share
3 answers

No. This information is not transmitted via HTTP and may not exist at all (for example, my phone does not require me to log in with a username, this is a single-user device).

You can get the IP address of the computer, the request came from (which can be a proxy server), and also use to get the DNS (or other network protocol) name, but it's about as close as you can get.

+3
source

remote_host remote_addr. , " ". http headers (, , / , ).

, remote_host DNS. - , , (, ip).

+2

, , , . IP- $ENV{'REMOTE_ADDR'}. , Sockets IO::Socket, API ( , C-) ; , Windows, NetBios 137, .

This method, however, has legal force in the gray area and may be classified in some countries as an attempt to gain unauthorized access to information ...

However, the user, simply accessing your page, reveals only the IP, useragent, referer and other information included in the HTTP headers.

If you need more information, you can do your own research, I gave you the basics ...

0
source

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


All Articles