Using the socket module to obtain server information
In this section, you will learn the basics of obtaining banners from servers with the socket
module that provides an easy way to do a request and get a response related to information we can use in a pentesting process. For more details on the socket
module, visit Chapter 3, Socket Programming. Here, we will only focus on using this module to extract information from servers.
Extracting server banners with Python
Banners display information related to the web server name and the server version. Some exhibit the backend technologies used (PHP, Java, or Python) and its version.
The production version may have public or non-public failures, so it's always a good practice to test the banners that return the servers we've exposed publicly, to see whether they expose some kind of information we don't want to be public. In this way, we could check whether a server is exposing certain information that we don&apos...