There are many reasons one may need to create a passable copy of an existing webpage. Judgments aside…
First open the terminal and create a new folder for the project. This folder will ultimately contain an index.html, localhost.pem certificate file for SSL, and a folder full of the scripts, images and contents from the copied website.
Next use the browser of your choice and go to the website to copy.
Using the browser to copy the page is simple. Select some central part of the webpage other than an image or link, then right click and select ‘save as’.

The browser will prompt for a location to save a local copy of this page. Browse to the folder created for the project, then rename the suggested file name to ‘index.html’. This will create an html file and a new subfolder.

For those wondering about the copied site, there are a few considerations. The index.html file and the associated folder contain a static version of the original website. This static version will have links that point to the authentic site. While it will look similar is style and format, it will not work correctly on its own. Ideally, this is useful when attempting to intercept redirected network traffic, and a familiar landing page would be helpful.
When hosting webpages, the listening port number needs to be considered. Port 80 is generally used for unencrypted connections using HTTP. Port 443 is generally used for encrypted connections using TLS and HTTPS. While any port can be used, it changes the format of link to use. For example, a server on IP 192.168.1.13 and port number 1337 would be accessed this way with HTTP:http://192.168.1.13:1337
and this way with HTTPS:https://192.168.13:1337
When no port number is provided, HTTP assumes port 80, and HTTPS assumes port 443. Using these established port numbers eliminate the need for odd URLs.
There needs to be a web server to host the page. This can be accomplished quickly with Python.
Use Python to host the webpage on port 80. This will not provide SSL.
Using Python 3.x:python -m http.server 80
Using Python 2.x:python -m SimpleHTTPServer 80
To view the copied site, open the browser to your IP address. http://192.168.1.1
3
The previous example does not provide encryption. To enable encryption using HTTPS with Python, an OpenSSL certificate is required. Consider three options. Use a provided signed certificate, use a service like Let’s Encrypt to create a signed certificate, or use a self signed certificate.
Use OpenSSL to create a self signed certificate. This creates an openSSL certificate file called, localhost.pem.openssl req -new -x509 -keyout localhost.pem -out localhost.pem -days 365 -nodes
After creating the pem file, use the following Python script to host the content from the current folder. In this example, there would be a certificate file, an index.html file, and a subfolder full of the other scripts, images, and content.
import http.server, ssl
server_address = ('localhost', 443)
httpd = http.server.HTTPServer(server_address, http.server.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket(httpd.socket,
server_side=True,
certfile='localhost.pem',
ssl_version=ssl.PROTOCOL_TLS)httpd.serve_forever()
Access this site in the same way as before, but with HTTPS.
https://192.168.1.13
Voila