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
domains-from-csp — A script to extract domain names from Content Security Policy(CSP) headers | Kitploit
Tools/GitHubGitHub/0xbharath/domains-from-csp
OSINT (Open Source Intelligence)ReconnaissanceNetwork MappingInformation GatheringWeb SecurityPenetration TestingSubdomain EnumerationDNS Analysis
GitHub0xbharath/domains-from-csp

domains-from-csp

A script to extract domain names from Content Security Policy(CSP) headers

View Repository
1133077 years 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

domains-from-csp

A Python script to parse domain names from CSP header

  • A script to extract domain names from Content Security Policy(CSP) headers
  • The output is print to stdout for now

Demo

script-in-action

Screenshots

3rd party package dependency

requests

click

Setup

  • Clone this repo
root@kitploit:~
$ git clone [email protected]:yamakira/censys-enumeration.git
  • Install dependencies
root@kitploit:~
$ pipenv install
  • Check help menu
root@kitploit:~
$ python csp_parser.py --help
                                                                                                   2 ↵
Usage: csp_parser.py [OPTIONS] URL

Options:
  -r, --resolve / --no-resolve  Enable/Disable DNS resolution
  --help                        Show this message and exit.

Usage

  • Parse the CSP header for domain names but don't do DNS resolution
root@kitploit:~
$ python csp_parser.py target_url
  • Parse the CSP header for domain names and also do DNS resolution
root@kitploit:~
$ python csp_parser.py target_url --resolve
root@kitploit:~
$ python csp_parser.py target_url -r
Download Tool