You can set vhost in apache, so that you can build independent websites with multiple domain names on one host.
I have a requirement, which is to find the vhost list on the host given the public IP address of the host.
The solution I am currently thinking of is to capture packets with tcpdump and analyze the vhost field in the http protocol. However, if this process is programmed, it will still require a lot of work to implement. I just want to know if there are any ready-made tools that can achieve it.
Or is there any other good solution that can be implemented?
If you just want to know the host corresponding to the IP.
dig -x x.x.x.x +short
I just tried it, this method doesn’t seem to work
With the +short parameter, the description is not displayed
Without the +short parameter, the dns server information is displayed