Automated Website Rendering β’ HTML Snapshot β’ Screenshot Verification β’ Localhost Hosting
NPHISHER is a Python-based web snapshot utility built with Playwright.
It launches a headless Chromium browser, loads an authorized target website, renders the page, triggers lazy-loaded content, saves the resulting HTML, creates a full-page screenshot, and finally hosts the generated snapshot locally.
The main implementation is:
π NPHISHER.py
Important: Despite the filename, this project should only be used for authorized website testing, development, UI research, CTF/lab environments, and archiving. Do not use it to impersonate services or collect credentials.
- π Automated Chromium rendering
- π Supports HTTP and HTTPS URLs
- π Saves the rendered HTML snapshot
- πΈ Creates a full-page screenshot
- π Scrolls the page to trigger lazy-loaded content
- π Automatically creates the output directory
- π₯οΈ Built-in localhost HTTP server
- β‘ Asynchronous Playwright automation
- π Useful for UI testing and visual verification
site-cloner/
β
βββ NPHISHER.py
βββ requirements.txt
βββ README.md
β
βββ cloned_exact_site/
βββ index.html
βββ screenshot.png
The cloned_exact_site directory is created automatically when the script runs.
- Python 3.10+
- Playwright
- Chromium browser installed through Playwright
git clone https://github.com/niraj-cmd/site-cloner.git
cd site-clonerpip install -r requirements.txtplaywright install chromiumStart the script:
python NPHISHER.pyYou will be prompted for a URL:
=== 100% VISUAL ACCURACY SITE COPIER & LOCAL HOST ===
Enter the full website URL to clone:
Enter an authorized URL, for example:
https://example.com
The program then:
Target URL
β
βΌ
Playwright / Chromium
β
βΌ
Render webpage
β
βΌ
Trigger lazy-loaded content
β
βββββββββββββββββ
βΌ βΌ
index.html screenshot.png
β β
βββββββββ¬ββββββββ
βΌ
Local HTTP Server
β
βΌ
http://localhost:8080
After the script finishes:
cloned_exact_site/
βββ index.html
βββ screenshot.png
Contains the HTML generated from the rendered page.
Contains a full-page screenshot captured by Playwright for visual verification.
NPHISHER automatically starts a local HTTP server on port 8080.
Open:
http://localhost:8080
The terminal will display:
[Server] Active! Open your browser and go to:
http://localhost:8080
Stop the server with:
Ctrl + C
The default port is:
start_local_host(port=8080)To use another port:
start_local_host(port=3000)Then visit:
http://localhost:3000
The program checks that the supplied URL starts with:
http://
or:
https://
Playwright starts Chromium in headless mode.
The target page is loaded using:
wait_until="networkidle"with a 60-second timeout.
The script scrolls to the bottom of the page and waits briefly before returning to the top.
This can cause lazy-loaded page elements to render.
The final rendered DOM is retrieved using Playwright and written to:
cloned_exact_site/index.html
A full-page screenshot is generated:
cloned_exact_site/screenshot.png
Python's built-in HTTP server serves the generated directory.
This project captures the rendered HTML, not necessarily a completely self-contained offline copy.
External resources may still be referenced from their original locations, including:
- CSS
- JavaScript
- Images
- Fonts
- APIs
- CDN resources
Therefore, some websites may not function correctly when hosted locally.
Server-side functionality is also not copied by this script.
For testing, use:
- Your own website
- Local development applications
- Authorized staging environments
- CTF/lab applications
- Intentionally vulnerable training applications
For example:
http://localhost:9000
You can create a simple local test server with:
python -m http.server 9000Then run:
python NPHISHER.pyand enter:
http://localhost:9000
This tool is intended for authorized security research, development, testing, education, and website archiving.
Do not use it to:
- Impersonate legitimate services
- Deploy phishing pages
- Collect usernames or passwords
- Harvest authentication information
- Deceive users
- Bypass authentication
- Reproduce websites without authorization
Only snapshot websites that you own or have explicit permission to test.
Run:
pip install -r requirements.txtRun:
playwright install chromiumChange:
start_local_host(port=8080)to:
start_local_host(port=8081)Check:
- URL is valid
- Internet connection is available
- Website is reachable
- Target permits access
- Page does not require unavailable authentication/session state
The current implementation saves the rendered HTML but does not download every external resource into the output directory. External assets may therefore continue to depend on the original website.
If you distribute this project publicly, consider adding an appropriate open-source license such as MIT.
Niraj Ashtaputre
GitHub:
Repository:
https://github.com/niraj-cmd/site-cloner
NPHISHER is designed as a learning and research project for:
Web Automation
β
βββ Playwright
βββ Chromium
βββ HTML Rendering
βββ Screenshot Testing
βββ Local Web Hosting
Built for authorized testing, learning, and security research.