Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
pagesource — CLI to download websites' actual JS/CSS/assets (not flattened HTML) | Kitploit
Tools/GitHubGitHub/timf34/pagesource
General Purpose UtilitiesReconnaissanceInformation GatheringWeb SecurityUtilities & FrameworksCrawler
GitHubtimf34/pagesource

pagesource

CLI to download websites' actual JS/CSS/assets (not flattened HTML)

View Repository
360317 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Website

pagesource

A Python CLI tool that captures all resources loaded by a webpage (like browser DevTools Sources tab) and saves them with the original directory structure.

Explainer diagram

Installation

root@kitploit:~
pip install pagesource

# IMPORTANT: Install Playwright browser after package installation
playwright install chromium

Usage

Basic Usage

root@kitploit:~
# Capture all resources from a webpage
pagesource https://example.com

This will save all resources to ./pagesource_output/ with the directory structure preserved.

Options

root@kitploit:~
# Specify custom output directory
pagesource https://example.com -o ./my-output

# Wait extra time for JavaScript content (useful for SPAs)
pagesource https://example.com --wait 5

# Include external resources (CDN assets, third-party scripts)
pagesource https://example.com --include-external

# Combine options
pagesource https://example.com -o ./output --wait 3 --include-external

CLI Reference

root@kitploit:~
pagesource <url> [OPTIONS]

Arguments:
  url                     URL of the webpage to capture resources from

Options:
  -o, --output PATH       Output directory (default: ./pagesource_output)
  -w, --wait INTEGER      Additional seconds to wait after page load
  -e, --include-external  Include external resources (CDN, third-party)
  -v, --version           Show version and exit
  --help                  Show help message

Output Structure

Resources are saved preserving the URL path structure:

root@kitploit:~
pagesource_output/
└── example.com/
    ├── index.html
    ├── assets/
    │   ├── css/
    │   │   └── style.css
    │   └── js/
    │       └── app.js
    └── images/
        └── logo.png

If --include-external is used, external resources are saved in their own host directories:

root@kitploit:~
pagesource_output/
├── example.com/
│   └── ...
├── cdn.example.com/
│   └── libs/
│       └── library.js
└── fonts.googleapis.com/
    └── css/
        └── font.css

Features

  • Captures all network resources loaded by the page (HTML, CSS, JS, images, fonts, etc.)
  • Preserves original directory structure
  • Handles query strings (strips them from filenames)
  • Infers file extensions from Content-Type when missing
  • Handles duplicate filenames
  • Sanitizes paths for filesystem safety
  • Optional wait time for JavaScript-heavy pages

Requirements

  • Python 3.10+
  • Playwright (with Chromium browser)

License

MIT

Download Tool